StackGrab

Chapter 1 of 5

Why orders of magnitude matter

Early in a design you rarely have exact numbers. You do not know the hardware, the traffic curve or the final data size. What you need is a way to rule designs in or out before you spend a week building the wrong one. Back-of-envelope math gives you that: rough numbers, found quickly, accurate to within a factor of ten.

A rough answer is enough because the interesting gaps are enormous. An operation that takes a nanosecond and one that takes a hundred milliseconds are separated by about eight powers of ten. If you confuse the two, your design will be wrong by a factor of a hundred million, and no amount of careful tuning later will save it.

A hand-drawn estimate on a paper napkin, with a few rough arithmetic sums and arrows.
Back-of-envelope math: rough numbers, quickly, to rule designs in or out.

Every number in this lesson is approximate. Real values vary with the machine, the network and the load. We use round powers of ten so the arithmetic stays in your head.

Chapter 1: Why orders of magnitude matter