Friday, October 19, 2012

Simple capacity planning

  1. identify actual usage rates, max and seasonality (e.g. business calendar). The "usage rates" here is a performance measure (e.g. throughput, processing rate, #simultaneous transactions, storage/memory, network bandwidth Mbps)
  2. you can determine growth rate based on business assumption (e.g. the marketing manager said that the users of our social-apps will grow 10000% in 2 years) or using forecasting technique (e.g. Holt-Winter to predict trend)
  3. determine the headroom gain by optimization / refactoring projects
  4. add 10-20% usage margin (since machines that run with 100% capacity will be unstable)
  5. measure server peak capacity using load test
  6. compute: capacity needed = usage max + grow - headroom gain + usage margin
  7. If the capacity needed is below server peak capacity, you need to buy a better hardware (scale up) or trying to tune or trying to scale out (clustering).
  8. If you choose to scale out, compute the number of server needed = capacity needed / server peak capacity.


  • Plan for 2-4 year, not too long since it's difficult to have good assumptions (e.g. growth rate) for long term. In 5 years you might have another marketing manager with different targets & growth assumptions.
  • The  number of server needed equation above is assuming that the cluster management work (load balancing etc) is negligible compared with the main works.
  • The  number of server needed equation above is assuming that the servers are in separated physical hardware.  If these servers are virtual machines in one physical server then 1+1 is not 2 anymore.
  • Understand which resources that need improvement (e.g. if network bandwidth is the problem adding more servers might not alleviate the problem).
  • If possible  try to scale-up first since it's easier, faster to implement and often cheaper than scale-out. But your vendor salesman might try to convince you that the scale-out upgrade packages is easier to integrate to your deployment environments and applications (just a matter of hiring his consultants), well as my wise grandma once said... always do fact checking to what the salesmen and politicians said.

Source: Steve's blogs

Any comments are welcome :)


The Art of Scalability by Abbott & Fisher

No comments: