How should I calculate Ramp-up time in Jmeter

As per you test case and duration settings, I think, you are making confusion with the Threads and Requests.

In short: You must use Ramp-up as 240 seconds for this scenario.

Let me describe you in details:

Ramp up is the time in which all the users arrive on your tested application server.

Requests are simulated by samplers but threads are the simulation of users.

Please note- The total number of requests are related to throughput, Whereas the number of active threads performing the same activity is related to concurrency.

From your requirements, I assume you want to measure the throughput which is related to the requests/second not the users per second. To achieve this, you can use a Constant Throughput Timer at your test plan level.

Constant Throughput timer allows you maintain throughput of your server (requests/sec). Here requests are samplers. Threads are users/clients which are requesting server using samplers.

You can achieve this by using both Thread Group or Ultimate Thread Group.

As far as I know, it doesn’t matter which type of Thread group you are using with Constant Throughput timer, at the end of the test in the results, you will get your desired Throughput which you mentioned in Constant Throughput Timer i.e. if you have mentioned 1200/min in Constant Throughput Timer with “Calculate Throughput based on” value as “All active threads” and there are 3 requests (samplers) in your thread group then JMeter will manage the requests in a way that it will generate only 6.6 requests/sec for each sampler i.e. 1200/min is divided among 3 requests, it doesn’t matter whether you are using Ultimate Thread Group or the Thread Group; Throughput timer works in same way for all types of thread groups.

Now as per your requirement: (Using Thread Group):

No. of Threads : 1200

Ramp-up Time - 240 (Since you want 5 users per second, 1200/5= 240)

Loop count - Forever

Scheduler (Duration) - 780 Seconds [13 Minutes]

IMPORTANT:

Thread Group configurations will be the same which you have already mentioned. Number of threads will be the client load which you want to put(in you case it's 1200), duration : (240+300+240), loop : forever, ramp-up : 240 yes when you ramp up i.e. in the first minute generally you get more requests as threads are starting so it is normal behavior. To test your scenario run for exactly 5 minutes, you should test for 13 minutes. Exclude first 4 min and last 4 min of the test as that is warm up time for your test as well as server and last 4 min are warm down period.

Now as per your requirement: (Using Ultimate Thread Group):

Start Thread Count: 1200
Initial delay, sec: 0
Startup, sec: 240 (I assume you want 5 users come to your application for requesting expected samples per second)
Hold Load for: 300 sec (Since you required 5 minutes to test for 1200 users)
Shutdown Time, sec: 240

You can set just like this:

enter image description here

Don’t get confuse the Thread number with the number of requests, each thread will create multiple requests for seconds in field Hold Load for.

Leave a Comment