gbhakta
gbhakta

Reputation: 223

How to setup ramp up time in Jmeter for 500 concurrent users?

We want to demonstrate that our REST API for a customer can handle 500 concurrent requests. In order to implement this, what is the best way to setup ramp up time ?

  1. Is it 500 requests in 1 sec ?
  2. 2500 requests in 5 seconds ?
  3. Any other option ?

With first option, the app and webservers will be flooded. With second option How should i go about setting this up ?

Appreciate any inputs on this.

Upvotes: 2

Views: 8110

Answers (1)

Dmitri T
Dmitri T

Reputation: 168082

Actually performance testing has many different faces, for example:

  • Load Testing: the process of verifying whether the application under test can handle anticipated load, if you expect 500 users - set 500 threads under Thread Group and configure Ramp-Up period so the load would increase gradually. According to JMeter documentation:

    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.

    So if you have 500 seconds ramp-up time all 500 users will be online in ~8 minutes, after that you can leave test running for some time (i.e. another 500 seconds) and then again gradually (500 more seconds) decrease the load to zero.

    This way you will be able to correlate increasing response time (or increasing number of errors) with the increasing load and vice versa.

  • Soak Testing: basically the same as above, but leave the test running overnight or over the weekend to see how does your application survives the prolonged load. This way you will be able to detect for example memory leaks

  • Stress Testing: again the same as load testing but don't limit the maximum load to 500 users, gradually increase the load until your application breaks to see how many maximum users it can serve. Then you might also want to gradually descrease the load to see whether it recovers when the load comes back to normal

  • Spike Testing: this doesn't assume any ramp-up, this way you will test how your application handles 500 users arriving at once

See Why ‘Normal’ Load Testing Isn’t Enough article for more detailed explanation on various performance testing types and why you need to consider all of them.

Upvotes: 9

Related Questions