Search code examples
jmeterjmeter-plugins

Jmeter: What is the difference between [Thread: 50, Ramp-Period: 0, Loop: 1] and [Thread: 1, Ramp-Period: 0, Loop: 50] in Jmeter?


What is the difference between [Thread: 50, Ramp-Period: 0, Loop: 1] and [Thread: 1, Ramp-Period: 0, Loop: 50] Both are same?


Solution

  • They are NOT the same

    JMeter acts as follows:

    • It starts number of threads (virtual users) within the time frame defined in ramp-up period.
    • Threads start executing samplers upside-down (or according to the Logic Controllers)
    • When there are no samplers to execute and loops to iterate - threads are being shut down.

    See Elements of a Test Plan - Thread Group chapter for more information

    1. [Thread: 50, Ramp-Period: 0, Loop: 1] - JMeter will start 50 threads which will execute samplers 1 time
    2. [Thread: 1, Ramp-Period: 0, Loop: 50] - JMeter will start 1 thread which will execute samplers 50 times

    Actual concurrency is a big question mark as it strongly dependent on what threads need to do and how many loops are there.

    • If you need to simulate 50 virtual users - provide enough loops
    • If you need to simulate 50 requests per second load:

      • provide enough loops
      • provide enough threads (at least twice as more)
      • use Constant Throughput Timer to set desired requests per minute rate