Search code examples
jmeterperformance-testing

Find out if a server can handle 100 users in one minute using JMeter


I am testing an API endpoint. I would like to know if the server can handle 100 users in one minute.

This is the thread configuration that I am currently using.

My question is:

  • did I configure the threads, ramp-up period, and duration parameter correctly?
  • How much ramp up period is ideal, against the number of threads?

enter image description here


Solution

  • I would recommend either decreasing the ramp-up or increasing the test duration because with your current settings you will have 100 users online only during the last second of the test

    So set "Duration" to 120 seconds so during first minute your threads would be ramping up followed by another minute of 100 online users or go for something like:

    • 30 seconds of ramp-up
    • 180 seconds of duration

    You may find i.e. Ultimate Thread Group easier to use, it's default workload pattern seems to match your scenario:

    enter image description here

    and you will be able to play with ramp-up, ramp-down and time to hold the load and see the anticipated threads count in the chart.

    You can install Ultimate Thread Group as a part of "Custom Thread Groups" bundle using JMeter Plugins Manager

    The whole point of ramp-up is that your should be increasing the load gradually so you could correlate the increasing load with other metrics (throughout, response times, errors, etc.)

    As per JMeter Documentation:

    The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.

    Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).

    Start with Ramp-up = number of threads and adjust up or down as needed.