0
votes

I have a problem with JMeter that I can't figure out.

I have 3 requests in one thread group. Each request needs to be executed 5000 times in 5 minutes which means I need to execute 15 000 requests in 5 minutes altogether.

The thread group is set up like this:

Number of threads (users): 50
Ramp-up period: 1
Loop count: forever
Duration (seconds): 300

Each request has a Constant throughput Timer:

Target throughput: 1000.0
Calculate Throughput based on: all active threads in current thread group

And the results after the test run is complete are around 2000-3000 requests and that is too low. I can't figure out which settings are wrong.

Tests are ran in non-GUI mode on an Azure virtual machine with a Intel Xeon E5-2673 @2.3 GHz with 16 cores and 32gb of RAM and the server is more than capable of executing more requests since the response time is about 1 second so hardware should not pose a problem. JMeter heap memory is set to 12 GB.

Any help is appreciated!

4
are you able to solve the issue? - 4m01

4 Answers

0
votes

I have 3 requests in one thread group. Each request needs to be executed 5000 times in 5 minutes which means I need to execute 15 000 requests in 5 minutes altogether.

That means you have to execute thread group for 5000 times in 5 mins => 300 seconds. If you execute thread group that much of time, you will automatically generate 15k requests.

From Documentation:-

Loop Count Number of times to perform the test case. Alternatively, "forever" can be selected causing the test to run until manually stopped.

When you set loop count: forever or any value in loop count for that matter, it means you want next set of users(threads) [which you have defined as 50 now], only when you are done with the first set 50 users request (150 requests as each thread group as 3 requests). Now, this 50 users request may take unexpected time and your next set will be returned only after this 50 users are done.

So to solve the problem at hand, you should have the following configuration for the thread group :

Number of threads (users): 5000
Ramp-up period: 300
Loop count: 1

So this means after every second around 17 Threads would be on-boarded.

0
votes

To achieve your desired value configure the following

Number of threads (users): 50 / 60
Ramp-up period: 30
Loop count: forever
Duration (seconds): 300

It is good practice to give some ramp up time. Also Constant Throughput Timer works on minute level and your desired throughput should be

Target throughput (in minutes): 3000.0
Calculate Throughput based on: all active threads in current thread group

So now, in 1 minute, JMeter will try to send 3000 requests and in 5 minutes, request count will be more or less around 15000.

0
votes

Here are a few recommendations to tackle tests like this:

  1. Use Ultimate Thread Group to create the threads required to run your tests.
  2. Increase the total number of threads to 150-200 - Depending on the response time of your requests, 50 threads may be busy and you are not able to scale beyond certain throughput.
  3. Add throughput shaping timer under Ultimate thread group, to maintain the throughput of 50RPS for 5 minutes(300 Seconds).

The combination of Ultimate Thread Group and Throughput Shaping Timer will allow you to have granular control over your requests and RPS you want to achieve.

Set Ulitmate Thread Group and Throughput Shaping Timer as below.

JMeter Script Structure Ultimate Thread Group Config Throughput Shaping Timer Config

Put all your requests below Throughput Shaping Timer and you should be able to achieve the expected load.

0
votes

Try to use Stepping thread group. It will allow you to send 50 user per second upto 300 second.

Download jar from below link.

https://jmeter-plugins.org/wiki/SteppingThreadGroup/