Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the best way to determine the hardware requirements for an application

What methods do you use to determine what kind of hardware you need for a server?

I often find it very hard to predict what kind of hardware you will need for a web based application with a database.

Do you have any good methods or recommendations on how to best pick hardware to use?

like image 392
John Sonmez Avatar asked Dec 18 '08 22:12

John Sonmez


1 Answers

This is sort of the basic question of capacity planning. You start by defining a workload model, which describes what you expect to get in terms of traffic. This can be as simple as "I expect 20 page hits a minute maximum."

Then you need to think about burst loads. Failing any other data, you can assume that interarrival times are exponentially distributed, which means that if you have a page request at time t0, you're as likely to have the next arrival tnext a very short time after t0 as a long time. (That's a gross oversimplification, but will do for a one-page answer.)

So let's say the average interarrival time is λ. because the time distribution is exponential, we know that we can approximate the interarrival time distribution with a normal, with one standard deviation (1σ) equal to √λ. So, we know that

  • about 32 percent of the time, two pages will be requested less that λ- √λ seconds apart.
  • about 5 percent of the time, two pages will be requested less that λ- 2√λ seconds apart.
  • less than 1 percent of the time, two pages will be requested less that λ- 3√λ seconds apart.

Decide what you're willing to accept, and test to make sure your web system can sustain that rate.

like image 179
Charlie Martin Avatar answered Oct 31 '22 22:10

Charlie Martin