Dhruv Bhatnagar
Dhruv Bhatnagar

Reputation: 141

In Jmeter throughput is higher than the no. of threads I've mentioned

Iv set thread: 50 ramp up- 50 Loop- 1

Throughput comes out- 52.2/min

What does it states?

Upvotes: 0

Views: 1580

Answers (2)

Dmitri T
Dmitri T

Reputation: 168002

JMeter acts as follows:

  1. All Threads defined in Thread Group are started during ramp-up period specified.
  2. Each Thread starts executing samplers upside down (or according to Logic Controllers) as fast as it can
  3. When Thread has no more samplers to execute and loops to iterate it's being shut down.

So if your application under test responds fast enough it may happen that JMeter Thread can be executed several times per second. Or vice versa, if application response time is high it might be the case that sampler will be executed several times per minute only.

As per Calculator.getRate() method JavaDoc:

Returns the throughput associated to this sampler in requests per second. May be slightly skewed because it takes the timestamps of the first and last samples as the total time passed, and the test may actually have started before that start time and ended after that end time.

If you need to produce the load exactly 50 requests per minute - I would suggest going for Constant Throughput Timer which can pause the JMeter Threads in order to reach the target throughput. Remember 2 things:

  1. Constant Throughput Timer is precise enough on minute level, make sure your test lasts long enough so it could be successfully applied
  2. Constant Throughput Timer can only pause threads, it won't kick off additional threads if current amount is not enough to generate the load, make sure you provide enough Threads.

Upvotes: 1

Adnan
Adnan

Reputation: 2547

Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.

The formula is

Throughput =(number of requests) / (total time).

You are confused between The Users Or No Of Threads & Requests send by those Users.

Ramp-up Period: How long JMeter should take to get all the threads started. If there are 10 threads and a ramp-up time of 100 seconds, then each thread will begin 10 seconds after the previous thread started, for a total time of 100 seconds to get the test fully up to speed.

This documentation of Thread Group and Glossary will help.

Upvotes: 1

Related Questions