Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
827 views
in Technique[技术] by (71.8m points)

performance - How should I calculate Ramp-up time in Jmeter

There are many questions/answers available here to understand Ramp up time but I want to get something in detail for my test case.

Test Case : Expecting 1200 users per 5 minutes on the home page. So it will be like 5 users/second.

I have set following thread properties :

No. of Threads : 1200

Ramp-up Time - ? [I am not sure what to set]

Loop count - Forever

Scheduler - 300 Seconds[5 Minutes]

Can anyone please help me to set ramp up time for my test case? I am running the test on my local machine.

I want to check that how many users server can handle in 5 minutes. Our expectation is 1200 users.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...