how to simulate 1000 concurrent user using jmeter - performance

Is that possible to simulate 1000 to 10000 user to jmeter?
If so how?
in 1 thread group only test 1k user:
Thread user = 1000,
Ramp up = 10 ,is this means it will test 1000 user in 10sec?,
Loopcount = 1, is there a disadvantage if I put 10 here ,is this means 1000x10 user = it will simulate 10k user?
Is 1 thread group can simulate 1000 concurrent user?

I could have written it as comment, but it went out of characters.
definitions given by #Quality-Expert are correct but his understanding of your test setup is wrong.
10 loop count doesnt mean 1000*10
It means at a given moment only 1000 concurrent users will be present but they will perform same action 10 times. It doesn't mean 10000 users.
Rampup is 10 doesnt mean 1000 users for 10 seconds
It means 100 users will come online in 1 second and next 100 users will online in next second i.e. in 2 seconds 200 users will come online and this is how 1000 users will come online in 10 seconds.
If you dont provide any test duration test will end their itself, it wont continue after threads have finished their task. If you want to load test with 1000 users then provide some test duration i.e. 10 mintues. Thus test will run with 1000 concurrent users for 10 min. Rampup is just warm up time for system under load test so that it wont face sudden load of 1000 users.
About 10000 load, use need to use distributed set of machines/client of Jmeter which will generate that load or use cloud load testing tools.

Number of Threads- The maximum number of users you want to run.
Ramp-Up Period - Defines how long it takes for JMeter to ramp up from zero users to X number of threads. It is in terms of seconds.
Loop Count - Defines how many times you want each user to run your script.
Other thing is that No. of user depends on your machine CPU , RAM , Physical memory. As far as I know using normal system you can user 250-500 max. users.
If you want to do testing like 1k,10k users then you will have to use cloud systems like Neoload.
As per your given example , you are right about if you put thread user = 1000 & ramp up = 10 then it will run test till 10 seconds for 1000 users.
Let me know if you have still any confusion.

Answer for the above question in below screen, in Jmeter manual its different which says threads/ramp-up period= user per seconds

Related

JMeter - Keep current Threats Active

I want to ask a question regarding of how to perform my load test scenarios. I have multiple threat groups that each one executes a scenario (get,post,put requests) with a different number of threats on each scenario. Each scenario takes an X (unknown) of time to be execute always depending of how many requests it has. What i want is to run them all together and hold the load (keep threats active) for a specific amount of time.
Let me give an example:
Threat Group 1 - v. users 75
Threat Group 2 - v. users 50
Threat Group 3 - v. users 30
I want to execute all threat groups together and keep the load for 30 mins. The problem that i have its lets say that threat group 1 it takes only 2 mins to be executed, threat group 2 takes only 3 minutes and threat group 3 takes only 1 minute. I can not have the Infinite option tick as i have only specific number of data that i can use. For the first scenario i have 75 users (data) that if they execute the scenario once they can not execute it again thus i need 75 more (data) which i dont have.
Is there any way to do that? Is it feasible to keep threats alive in each threat group for specific amount of time? Or something that will execute the requests in a specific amount of time that will cover the whole duration? (30 mins)
Setting up the parameters in threat groups like the picture below when each scenario ends it shuts down its threats so i will never have lets say 30 v users to run in parallel for a specific amount of time.
The below graph shows that Scenario 1 (pink) ended its threats faster than Scenario 2 (ref). Here the settings are the following:
Threats in each scenario 5
Ramp-up 10 secs
Duration 90 secs
If I understand correctly you are constrainded by data and you have one data point for one loop per user . So I will try to manipulate rampup and set it to 1800 and loop = 1 for every thread group. Uncheck "specify thread lifetime". Jmeter will run new thread e.g for TG_1 every 1800/75 second. Whole test will run 1800sec + time for loop for last thread. If have to tink if this load profile is appropriate for your application.
As I can understand your query, you have data for say 75 users, the data cannot be repeated. And you need to hold the load for 30 minutes.
In simple words, I can say that you cannot hold the load for this much time unless you have more data, or you can repeat data.
If 75 users are taking only 1 minute or even 5 minutes, this means that you have not added human reaction time. To add that, you can simply use timers. Which will delay the execution of sampler.
If your first thread group executes 75 requests in 2 minutes and you want it to be executed in 30 minutes the only way of achieving this is making JMeter 15x times slower. JMeter provides a variety of Timers and each of them allows introducing delays between requests mainly to simulate real user "think time"
75 requests in 2 minutes is approx 37 requests per minute and if you need to make it 15x times slower you need to execute ~2.4 requests per minute.
So you can add i.e. Constant Throughput Timer to your first thread group and configure it like:
this way you will get 72 requests in 30 minutes.
Similarly you can slow down 2 remaining thread groups
Try with Ultimate Thread group plugin
Use different ultimate thread group and change the threads as per your requirement but keep other parameters same as shown below.
So, your threads will vary but other condition probably will remain same. Like Initial delay, startup time, holdloadfor sec and shutdown.
You can use plugin manager to download the jpgc#stardard set for all the plugin provided by jpgc. Then, you will get option to add jpgc ultimate thread group from Threads(Users) or from the same place we add normal/standard threadgroup.

Loop count and Ramp Up period in JMeter

I have created a set and just confused with the Loop Count and Ramp Up period.
I have a test set with the following parameters.
Threads = 30
Ramp Up Period = 30
Loop Count = 100
As per the page on
quora.
I suppose:
a) If Loop count is Zero, then each of the 30 threads will be starting every second. As per the shared the web page, I guess 30/30 * 100 ie 100 threads/requests will be hitting the server every second. Please correct me if I am wrong.
b) As per the above parameters, there will be a total of 30 * 100 threads/requests. Does this mean all the 3000 threads/requests will be sent within 30 seconds [ Ramp Up period ]
Assuming you have 30 users and 30 seconds ramp-up
JMeter will start each virtual user each second
Each virtual user will start executing samplers upside down (or according to the logic controllers, if any) as fast as it can (if you don't use timers) so the delivered load can be either more or less than 30 requests/second, it depends on how fast JMeter is executing requests and on your application response time as JMeter will wait for response from previous sampler before starting new one
When virtual user finishes executing all the samplers defined in test plan it will start over and do point 2 for 99 more iterations
When virtual user won't have more samplers to execute and loops to iterate it will shut down
A couple of tips:
You can use Server Hits Per Second listener to see how many requests per second you are actually making given your test plan configuration
You can control the number of requests per second via Constant Throughput Timer
Consider upgrading to JMeter 3.2 as newer JMeter versions normally contain new features, performance improvements and bug fixes
according to jmeter manual ramp up is:
How long JMeter should take to get all the threads started.
If there are 10 threads and a ramp-up time of 100 seconds, then each
thread will begin 10 seconds after the previous thread started, for a
total time of 100 seconds to get the test fully up to speed.
So if your goal is to reach 3000 request within 30 seconds the above wont do, it might take more than that depending on how much it takes to finish the requests you are sending.
If you are looking for Throughput you can add an aggregate report listener which calculates the throughput for you and depending on the results you can configure your thread properties to reach your goal.
Reference :
Jmeter user manual

Test Duration when we execute JMeter Test with 1 user and more

I have concerns about the duration of executing JMeter Test Scenario.
In fact, if we execute a manual test with 1 user in 1 hour, we will find the same duration or little more with 3 user.
But, with JMeter test the duration with 1 user will be multiplied by the number of users.
During my scripting with this tool, I've noticed that JMeter always wait for the response of the request to pass to another request. It's like we have 1 user doing the work of multiple users.
Does any body have explanations about this issue?
Can we configure JMeter to perform like we have x users working in // ?
Depends how you are simulating users..
Each thread will wait for a response, but users are represented by different threads, and threads do not wait for each other to complete samples, they are independent.
If you are using threads in thread group to represent users (which is the intended usage), the threads will start concurrently and run independently, so you should see the 3 users complete in an hour, as with manual tests. If this is not happening, then you should check the resources used on the client running jmeter during single thread and multi thread runs. Or perhaps the bottleneck may be in the transport (ie bandwidth). All you have determined so far is that the bottleneck is prior to the server, you need to determine where it is.
It is also possible you have created a thread group for each simulated user. If this is the case you can set the groups to run consecutive or concurrent. The setting for this is on the Test Plan element at the very top of the tree. You want concurrent, so untick 'Run Thread Groups Consecutively'.
So it comes down to how you are simulating users.
In ideal world if you test your site with 1 user all set of actions completes in 1 hour. If you add another 100 users - still one hour, 1000 users - 1 hour.
In real world server response time increases with the number of concurrent threads. But it isn't something like
1 user - average response time 10ms
2 users - 20 ms
3 users - 30 ms
But
1 user - 10 ms
2 users - 10 ms
3 users - 10 ms
10 users - 11 ms
The whole idea of the performance testing is to determine the upper limit of server load and identify bottlenecks and issues which happen under the load so you could state something like: using this hardware and this configuration the application is capable of serving 500 concurrent users without serious delays. In case of 1000 users response time will be more than 15 seconds.
In regards to threads, JMeter thread starts, executes samples one by one for defined amount of loops and exits. It is applicable for each thread which are independent. Basic throughput control can be done via ramp-up and loops count (see Thread Group documentation on details)
More advanced load scenario definition can be done using following Test Elements:
Ultimate Thread Group - which provides easy visual way of defining ramp-up, ramp-down and time to hold the load
Constant Throughput Timer - to set desired load rate in requests per minute
Synchronizing Timer - to pause all the test threads and release them at the same moment to produce a "spike"

how to set proper ramp-up time in jmeter?

I am new to jmeter, I want to create a report, I have following doubts:
I want to find out the maximum number of users that can be given in a thread for ramp-up time 1sec?
Ex: 5 simple Http Request
no of user : ?
Ramp up time = 1
Loop=1
How to set a proper ramp-up time depending on the number of user in a thread?
Ex: 5 simple Http Request
no of user : 100
Ramp up time = ?
Loop=1
I tried different combinations of ramp-up and number of users considering through put , but the results varies and not able to find out a relation with the ramp-up time and the number of users.
Please help to find a solution for it.
Thanks!
Ramp-up period is the time required for all threads representing virtual users to start.
JMeter starts with 1 user and kicks off another thread so all threads will start in ramp-up period time slot i.e.
10 users, 10 seconds ramp-up - start with 1 user, each second 1 user added
10 users, 20 seconds ramp-up - start with 1 user, each 2 seconds 1 user added
100 users, 50 seconds ramp-up - start with 1 user, each second 2 users added
Keep in mind that if the thread has finished its job and there are no loops defined it'll shut down. For JMeter greenhorns it's better to use Ultimate Thread Group (available via plugin) which provides easy-understandable and configurable load pattern definition.
Depending on what you're trying to achieve you can also use the following test elements:
Synchronizing Timer - to hold the threads until specified number will be reached and release them at the same moment
Constant Throughput Timer - to specify exact load in requests-per-second.
Hope this helps.

Jmeter report interpreting from loadosophia, Regarding Max virtual users in summary report

I've recently started working in Jmeter and I have run a test with 40 virtual users. I've also used loadosophia plugin that uploads results to loadosophia. But I've few doubts about numbers I've got in the summary report in loadosophia.
I've run with 40 virtual users with 3 seconds as ramp up period but in loadosophia report it shows Max virtual users=17 and Average virtual users = 6.5 but Transaction count is 40 which actually should be virtual users. Does this indicate there were maximum of 17 virtual users were concurrent ?
Test run duration it shows 3 seconds, but I can see Maximum response time is 5078 milliseconds which is(5.7 seconds) how can it be test can be completed in 3 seconds while it shows some requests took more than 5 seconds to send response? (I am assuming it is not considering ramp up period which I gave 3 seconds, Am I right?)
Thanks in advance.
Currently your scenario looks as:
Start with 1 user (which will immediately start test actions)
Each second add 13 users (each of them will start test actions as soon as the thread is started)
When thread finished it's job it exits.
So there is no way to say exactly what will be the load at the "peak" where all threads which are active at the moment are hitting the application under test.
Not too sure regarding loadosophia, but if you expect 40 concurrent virtual users the only way to reach this load is providing enough loops and adding a Constant Throughput Timer to orchestrate the load and limit (or ramp-up) it to the value, you set in timer.
Another option is using a Synchronizing Timer which allows to "release" threads when specified amount is reached.

Resources