The Square Root Staffing Law
More than just for staffing, the law also tells you how many more servers you need to meet increased demand.
Join the DZone community and get the full member experience.
Join For Freethe square root staffing law is a rule of thumb derived from queueing theory, useful for getting an estimate of the capacity you might need to serve an increased amount of traffic.
the square root staffing law is designed to help with capacity planning in what’s called the qed regime, which tries to balance efficiency with quality of service. capacity planning is a set of tradeoffs: for best quality of service, you must provision lots of spare capacity (headroom), but that’s wasteful. for best efficiency, you minimize idle capacity, but then quality of service becomes terrible.
the qed regime poses the following scenario: assuming that your current quality of service is acceptable, and you want to maintain it, how much must you increase capacity to serve increased demand?
the picture above illustrates this. suppose you currently have 10 servers (the green circle) and your peak utilization is 25% (the blue circle), so you have 75% idle capacity (the green area). you predict that you’ll need to serve 3x the current peak load for, say, black friday. how many more servers do you need?
the answer is less than a linear increase to 30 servers (the red dashed line). it’s 21, in fact (the orange circle). this answer comes from the rule of thumb that to hold quality of service constant, you must increase the headroom by the square root of the load increase.
if you’d like to experiment interactively with this capacity planning tool, i built a desmos calculator for you. you can drag the circles around to see how parameters such as utilization affect the amount of idle capacity you’ll need to provision.
the square root rule is an approximation, but it’s a decent one, and its bounds are well understood. to learn more about this, please read my book the essential guide to queueing theory , which contains further reference material you might also find helpful.
you might also be interested in learning about the universal scalability law , which is a great tool for capacity planning as well.
Published at DZone with permission of B Jones, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments