简体   繁体   中英

How to correctly configure number of requests in JMeter?

My performance test strategy is to use JMeter to send 3 different requests to a linux server continually. They are Init, Calculate and Apply.

The number of active users of peak hour is 40 and the number of each request per hour is 200. The load test should be conducted with the peak usage with no less than one hour.

If my understanding is correct, running the test for two hours eventually there will be 1200 samples shown in the result table (200 requests * 3 * 2 hours). However, with the following configuration there are much more samples sent to the server.

Thread Group: 
- Number of threads: 200 
- Ramp-up time: 3600 seconds 
- Duration: 7200 seconds

I have also tried setting the number of threads 50, the result is still far more than my expectation.

May I know how to configure the JMeter correctly ?

Your configuration should be:

  • Number of threads : 40
  • Ramp-up time: Should be short in your case, its value tells in how much time threads will go from 0 to 40.
  • Duration is ok

Finally, as you want 200 requests per hour, which would be 600 for the 3 ones, it would be 10 per minute, you need to use Constant Throughput Timer inside a Test Action :

测试计划

Where Test Action is :

测试动作

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM