neha bedi
neha bedi

Reputation: 156

How does constant throughput timer in Jmeter works?

how does the delay between requests is computed. I have simple Jmeter script with following 4 components :

  1. thread group - number of threads set to 10, reset other fields have default values.

  2. Http Sampler - named as Thread - ${__threadNum} Req -${__counter(TRUE)} hitting URL- google.co.in

  3. Constant throughput Timer : Target throughput- 60, Calculate Throughput on -All Active threads.

  4. View result in table listener.

Summarized test results are below : Results

Please explain how the delay between the requests and number of requests to be created are computed . Please Explain other field values of " Calculate Throughput on ".

Also If i have ultimate Thread group instead of thread group, Have hold for load set to some value, so in that case how the number of requests to be sent during hold load time period are calculated?

Upvotes: 1

Views: 7689

Answers (2)

sivaramaraju
sivaramaraju

Reputation: 340

From JMeter Cookbook by Bayo Erinle, The goal of the Constant Throughput Timer component is to get your test plan samples as close as possible to a specified desired throughput. It achieves this by introducing variable pauses to the test plan in such a manner that will keep numbers as close as possible to the desired throughput. That said, throughput will be lowered if the server resources of the system under test can't handle the load. Also, other elements (for example, other timers, the number of specified threads, and so on) within the test plan can affect attaining the desired throughput.

Upvotes: 1

Dmitri T
Dmitri T

Reputation: 168002

Constant Throughput Timer pauses active threads to reach throughput level you define.

Remember 2 things:

  • Throughput Timer isn't able to create threads, it can only slow them down so make sure that you provide enough threads to reach desired target throughput
  • Throughput Timer is quite accurate on "minute" level, you need to "wait" for it to start working as expected for 60 seconds.

See How to use JMeter's Throughput Constant Timer for more details.

In some cases for some people it's more convenient to use Throughput Shaping Timer which comes with JMeter Plugins, you can configure target throughput providing multiple steps and seeing the impact on a graph.

Throughput Shaping Timer

Upvotes: 4

Related Questions