1
votes

I'm having trouble achieving the desired 'requests per second' using a combination of 'bzm - Concurrency Thread Group' and 'Constant Throughput Timer' in JMeter.

Structure

My test is structured as follows:

Thread Group 1

  • Constant Throughput Timer

  • HTTP Request

Thread Group 2

  • Constant Throughput Timer
  • HTTP Request

Thread Group 3

  • Constant Throughput Timer
  • HTTP Request

Thread Group 4

  • Constant Throughput Timer
  • HTTP Request

Numbers

I am wanting to achieve 160 concurrent users for each of the Thread Groups.

Thread Group 1 I am aiming to make 350 requests per second, the others are aiming for 160 requests per second.

The Thread Groups have 160 as the 'Target Concurrency'. Constant Throughput Timer has 21000 for Thread Group 1 (350 rps*60 = 21000 per minute). Constant Throughput Timer has 9600 for the others (160 rps*60= 9600 per minute).

All of them have 'Calculate Throughput based on: this thread only'

I'm currently only getting a throughput of around 80 rps for Thread Groups 2-4 and less than 10 for Thread Group 1.

I've allowed JMeter to use 4GB of RAM and I'm not using all of this during the test. When I remove all Throughput Timers, I can achieve up to 14k rps.

Am I missing something? Is there a better way to achieve my desired throughput?

1

1 Answers

1
votes

The reasons of not achieving desired number of requests per second could be in:

  1. You simply don't have enough threads in thread group
  2. JMeter cannot send requests fast enough due to lack of resources on its side
  3. Application under test cannot respond fast enough

With regards to point 1 be aware that Constant Throughput Timer can only pause threads in order to limit JMeter's throughput to the desired number of requests per minute.

Given you use Concurrency Thread Group it makes more sense to switch to Throughput Shaping Timer which can be connected to the Concurrency Thread Group via feedback loop so JMeter will be able to kick off extra threads to achieve the desired RPS rate.

You can install Throughput Shaping Timer using JMeter Plugins Manager

JMeter Plugins Manager Throughput Shaping Timer

With regards to point 2: make sure you're following JMeter Best Practices and monitoring baseline OS health metrics on machine where JMeter is running, if there is lack of CPU or RAM you might need to consider Distributed Testing

With regards to point 3: the same approach as for point 2 + use profiling tools to see where application spends the most of time