I have a question regarding Jmeter thread group section - jmeter

In Jmeter Thread group section, if I am adding 3000 threads with a ramp-up time of 15000 secs, does that mean all 3000 users will be active till 15000 secs ends?
How many simultaneous users are on my website in that case?

Every 5 seconds a thread will be created until end of 15000 secs.
Simultaneous users depends on test plan execution, if only 1 loop and 1 request that finished in less than 5 seconds then you will have only 1 simultaneous user.
If loop is inifinite you will have 3000 simultaneous users after 15000 secs

It mainly depends
on the number of iterations you define in the Thread Group
number of Samplers
your application response time
Your "3000 threads with a ramp up time of 15000 secs" configuration means that JMeter starts a new thread (virtual user) each 5 seconds.
Once started thread starts executing Samplers upside down (or according to the Logic Controllers)
When there are no more Samplers to execute and loops to iterate - the sampler gets shut down
So depending on the number of loops and response time you can have from 0 to 3000 users.
In order to check the actual concurrency you can use i.e. Active Threads Over Time and Server Hits Per Second plugins (they can be installed using JMeter Plugins Manager)

Yes. Time taken per user to activate = Ramp up time / No. of threads, in your case 15000/3000 = 5 sec per user.
as you can see 1 user will be added per 5 second and eventually you will have all 3000 users active by the end of 15000 sec, given your first or any other user does not complete iteration and shut itself before last user gets chance to start ( last user starts at 15000th sec here)
Note : To achieve a load of 3000 users by the end of 15000sec, you can set LoopCount to "infinite" but this will cause increase in number of total samplers and you may end up iterating your script way more than 3000 times.

Related

How to provide jmeter thread group , Ramp up peridod and Loop count?

I'm new to jmeter I have the following scenario. I want the jmeter to hit the given url, I have 13 such url in a csv file.
I want to hit the url at the rate of 2 requests per second for a given time period of 60 seconds.
In this case how should I specify my thread group, Ramp-up period and Loop count.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user. But I'm not sure how to specify when we have 13 such urls.
Atleast any link for the given scenario is appreciated.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user
not necessarily, JMeter waits for response from the previous Sampler prior to executing the next one, the configuration means that JMeter will start 1 user each second, it doesn't guarantee 1 request per second.
The easiest way of achieving X requests per second throughput is using Throughput Shaping Timer
Make sure to supply the sufficient number of Threads, i.e. if your application response time is 1000ms - 2 threads should be enough, if it's 2000 ms - you will need at least 2 threads, etc.
There is a special thread group: Concurrency Thread Group which can be connected to the Throughput Shaping Timer via Feedback Function so it will automatically kick off extra virtual users if the current amount will not be enough in order to conduct the required load.

Elapsed time of test in jmeter is not accurate

I am curious why the elapsed time of the current running test in JMeter is not accurate?
I set my thread group to the following specs:
Number of threads - 2;
Ramp-up period - 1;
Loop count - 60
I suppose that means that every second 2 users will perform some actions and the step will be repeated 60 times. Which means it will take 60 seconds to complete the test.
But the elapsed time of the current running test shows 25 seconds. Why it's less than 60 seconds? How can it be that my test is completed so fast?
JMeter acts as follows:
Each thread (virtual user) starts executing Samplers upside down (or according to the logic controllers) as fast as it can
When there are no more Samplers to execute (or loops to iterate) the Thread is being shut down
Your configuration means that 2 users will execute samplers 60 times, the elapsed time depends on:
how fast JMeter can send the requests
how fast your application can respond
If you're looking for a configuration where 2 threads are executing samplers for 60 seconds - amend your Thread Group setup as follows:
If you have troubles in setting up the workload model it might be easier to use a Custom Thread Group for example Ultimate Thread Group which provides extreme flexibility when it comes to ramp-up, ramp-down, time to hold the load definition, etc.
These "custom thread groups" can be installed using JMeter Plugins Manager
The requests inside your test will be executed 60 times using 2 concurrent users
For example if you have 1 request which takes 1 second it will take around 30 seconds:
Total 60 requests * 1 seconds (time per request) / 2 (concurrent) users = 30 seconds

How to set 1000 threads which needs to completed in 1 minute(60 sec) by using stepping thread group in jmeter?

I am having a requirement to perform a load testing for api's with 1000 request per minute. i have setup a stepping thread group as displayed below :
In above image you can see that i have configured the parameters as 20 threads per second ,so it will take 50 seconds to reach 1000 threads. but still graph shows 2 min and 31 sec to completed the 1000 request.so please help me to set it.
Please help me to configure it properly , my exact requirement is as displayed below :
1) 1000 threads
2) In 1 minute it needs to be completed.
Change stepping thread group settings to hold 60 seconds 1000 threads:
1000 threads (virtual users) will produce 1000 requests in one minute only under specific condition: response time must be 16.6 milliseconds.
If response time will be higher - JMeter will execute less requests
If response time will be lower - JMeter will execute more requests
If you want JMeter to conduct the load at rate of 1000 requests per minute it's better to consider Concurrency Thread Group and Throughput Shaping Timer combination
Throughput Shaping Timer configuration:
Concurrency Thread Group configuration:

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

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.

Resources