Why incremental load and ramping up the threads is considered a best practice?

573 Views Asked by At

I was looking into performance testing and wanted to ask why ramping up slowly and then running under max load and then slowly ramping down is considered a better paradigm .And test team spends a lot of time achieving a perfect graph for the same. Though its completly subjective but why this approach is always preferred compared to starting all thread at once.

1

There are 1 best solutions below

1
On BEST ANSWER

Starting all threads at once (or, more accurately, going from zero traffic to max traffic in an instant) will "shock" the target system and can render some web acceleration functionality useless. For example, caching on both server and client side might not happen initially if all clients start at once. If you ramp up slowly, caches are able to populate and once you reach max traffic/VUs, cache misses might be rare.

Applications also need to increase the amount of resources they use to serve a larger number of clients - allocate memory, file descriptors etc - and if you go from 0 to 1,000,000 clients in no time at all, the server side will have a lot of instant resource allocation to do, while if you ramp up slowly, resource allocation will not be a problem.

If you're running some kind of auto-scaling that is of course also an issue - unrealistically fast ramp-up times will make it hard for the auto-scaling to keep up, and so cause problems for the target system that it will not experience in a real situation.

There are circumstances when going from 0 to max VUs/traffic does makes sense, and that is when you're expecting that kind of thing to happen to your site. You might be testing your ability to stand up to a denial-of-service attack, or you might run a site that experiences extremely bursty traffic (e.g. an online auction site or perhaps an event site releasing tickets to a popular event at a specific time).