2

For testing out some webservices, how do I estimate the Peak Load per second if I know the average number of hits I know the site is going to get in a day or get in a year.

Likewise, if I know the Peak load, i.e. peak number of hits the webservice is going to get per second, then how do I calculate the average load from this figure? Are there any statistical methods for calculating this?

I need these for designing the stress testing of the service.

2

I believe that peak load follows general Pareto principle, at least basing on my experience during "peak" periods application served 80% of requests during 1-2 hours time frame and remaining 20% of requests were more or less equally distributed between remaining 20 hours in a day.

So:

1

This is an indirect answer to your question, because I think you may be asking the wrong question. I am not sure that either of the things you are asking for - a statistical way to determine peak load in 1 second from average load in a day, and vice versa - are necessarily that important when it comes to performance and load testing.

It is hard to determine a peak load based only on the average load. Depending on the service, there may be promotions or special events that push the peak load up way way beyond what is normal or average. What I have found through performance testing many different applications is that estimations of peak load are often wrong, and trying to guess at it is really pretty hit or miss. If you have an application that is already in use and have production data for that application, that is usually the best indicator of future load, however even that can change dramatically if there is press about the site, or some event that pushes more users than expected to the site for a short period of time.

As a rule of thumb, I typically estimate to the best of my ability what the peak load will be (for a 1 hour period) and test with that, then I test with 5X that load, then I ramp up from that and go until the site is no longer functional to find the upper bounds of what kind of load the site can take. So long as your site continues to function, even if it slows down, you are usually in pretty good shape, but doing 5X load or more usually uncovers other issues that cause servers to topple over or crash, and those are critical to fix if you ever expect to encounter spikes in usage.

In addition, determining peak load in a second, or even a minute is not really important because your simulation should have varying delays between executions, so if you run at "peak load" for an hour or more, you will get a good realistic variance of load per second over the course of your run.

If all I had was average load for an hour, I would start with an estimate of 10X that for peak, but again, there are SO many variables to take into consideration, it really will be more specific to your web site or application and require some thought about how it is intended to be used.

  • No, I am looking for the answer to my question - i.e. statistical methods. – user93353 Mar 26 '15 at 17:05
  • Good luck, I'm not sure that such a thing exists, there are a lot of variables to take into consideration that could make drastic differences to the calculation. – Sam Woods Mar 26 '15 at 20:21
  • I think, but I am not sure, that Poisson's distribution is used to calculate this. – user93353 Mar 27 '15 at 3:21
1

The only way you can do this is if you make an educated guess about the distribution of your data.

Otherwise you're asking the impossible: Given an aggregated measure of center (the average) return an outlier (the peak).

If you want to guess that your data is a normal distribution, then you should be able to derive the top nth percentile and use that as your peak (if you also know the standard deviation in addition to the average).

Unless your organization is expecting you to verify your system can withstand a black swan, this should be a completely rational way to choose your peak.

  • I had the same reaction. He's only asking for an estimate, and there are studies that show internet traffic following a Poisson distribution. My employer's traffic is multi-modal. I don't know enough math to say whether it possible to translate a Poisson distribution's mean into its peak. That might be a question for math.stackexchange.com. – user246 Apr 1 '15 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.