Home > Software engineering >  Loadtesting:How to calculate total time for execution and ramp time for 10k rpm
Loadtesting:How to calculate total time for execution and ramp time for 10k rpm

Time:02-01

i have to loadtest apis with 10k rpm,what should be the ramp up time and execution time.

10k rpm = 10k/60=166 req/sec i.e 166 concurrent users

but don't know to calculate exact ramptime time and execution time.

currently standard set is 60min execution and 15 min ramp up in the org

CodePudding user response:

10k rpm = 10k/60=166 req/sec i.e 166 concurrent users

166 concurrent users don't necessarily mean 166 requests per second, moreover it will happen only if response time for each Sampler will be 1 second sharp.

If response time will be 2 seconds - you will have 83 requests per second

If response time will be 0.5 seconds - you will have 332 requests per second

So you need to supply sufficient amount of threads and add a relevant Timer like Constant Throughput Timer or Throughput Shaping Timer to slow down JMeter throughput to the desired value. The latter one can be connected with the Concurrency Thread Group so JMeter would be able to kick off extra threads if the current amount is not sufficient to conduct the required load.

And the system under test need to be able to respond fast enough because JMeter waits for the response from the previous request before starting a new one.

With regards to ramp-up, there are no exact numbers recommendations, the only approach you can follow is increasing the load gradually so you would be able to correlate the increasing load with increasing throughput, response time, number of errors and so on.

If you don't have better ideas you can go for the quote from the JMeter user manual:

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.

CodePudding user response:

It completely depends on what exactly needs to be achieved

Things to consider:

  • Test execution duration and ramp up/ramp down of users, needs to evaluated based on the AUT(Application under Test) Real user utilization in Production.(Capture the number of users active at particular point of time in system)
  • Watch out for pattern of users entering/exiting the system.
  • Calculate User load/ RPM using Little's Law.

Some of the common test Types includes.

  • Baseline Test (Initial testing conducted with very minimal load to test the stability of the application)
  • Load Test (To evaluate applications performance under gradually increasing User load with expected concurrent number of users
  • Stress Test (Testing beyond normal conditions, increasing the user load until the Response time exceeds acceptable criteria. Usually done to find the breakpoint of the application, responsiveness of the application for higher volume traffic
  • Endurance Test ( To test for a longer durations, by applying varying loads.)
  • Related