How do I Correlate the Number of (Concurrent) Users with Hits/s (per second)?

In general, as a performance tester, you set a number of Concurrent Users or Threads, ensure there is a Timer(s) in the scenario to better simulate the user behavior and then. press "Start"

Selecting the correct number of Concurrent Users is pretty easy. However, when you have a certain amount of hits/s (Hits per second aka RPS - requests per second) to reach, it might not be as trivial. So, you need to ask yourself, 

Where and how do I get started?

It's actually pretty simple. First of all, what does Hits/s stand for? Hits per second are the Average number of samples initiated per second. Next, when reviewing BlazeMeter's 'Timeline Report' tab and observing the Hits/s value - if you set the Graph option value as <1 minute>, the value displayed will represent the Average Hits/s value for that 1 minute.Screen_Shot_2017-08-09_at_10.48.03_PM.png

In the instance that has a simple test with a single thread, a HTTP Request will be executed, and set to wait for 1 second over and over. This means for each thread, you will get 1 HIT/s (if everything goes off without a hitch).

Here, you'll find the Formula for Hits/s Calculation:

1 sample, 1 thread, 1 second delay + (assume for) a 2 second response time to load the page = 3 seconds Total delay between requests = Thread will execute 20 times per 1 minute = 0.33 Hits/s

*i.e.:.of 1 sample, 1 thread, 1 second delay and a very short response time of the server (between 0.25ms to 0ms).

If I have 1K Concurrent Users, what does that say about my Hits/s?

Now that you know what Hits/s means - how many Hits/s will a 1K Concurrent-User test provide? You won't know until you try, but what you can do is run a free Test with low Concurrency (Sign up for a Free-tier account) in order to better understand the amount of Hits/s after initiated, and, then, you will simply multiply it to achieve the number of desired Hits/s.

NOTE: Increasing the load to the server also increases the Requests that must be handled per second -> and raises the chance for bottlenecks -> this then raises response times -> Result: Hits/s ratio decreases.
As an example: 1 sample, 60 threads, 25 second timer between each sample and 5 seconds response time = each thread runs twice per minute so (2X60X1)/60 = Value of 2 Hits/s *See Formula for Hit/s Calculation Above

Can we control the number of Hits/s?

The good news is JMeter lets you control the throughput using 2 Controllers:

1. Constant Throughput Timer - You can set the amount of Throughput (samples per minute) by adding a timer after the request to slowdown the script, so it fits the throughput value.

2. Throughput Controller - You can set the Max number of executions, OR the Percentage of executions of the sample (i.e. either execute this 100 times OR 30% of the time). And with a little extra configuration, you can control the values of the Constant Throughput Timer and the Throughput Controller while the test is running.

Learn how with BlazeMeter's fantastic feature- Real Time Test Control
Now you know what Hits/s is and how to control it - Happy Testing!

Have more questions? Submit a request


Please sign in to leave a comment.