Learn
Lesson · Scaling Laws and Cost · What a machine buys

The Universal Scalability Law

Amdahl charges for work that cannot be shared. The Universal Scalability Law charges twice more: for contention on a shared resource, and for the cost of keeping every machine’s copy of the state consistent with every other’s. The second charge grows as N² while throughput grows as N, so the curve peaks and then falls.

C(N) = N/(1 + α(N − 1) + βN(N − 1)) α contention, β coherency β = 0 → C(N) → 1/α = 50× a plateau, Amdahl’s shape C(N+1) ≤ C(N) ⟺ β·N(N + 1) ≥ 1 − α the peak, over integers α = 1/50, β = 1/10000 → N* = 99 peak 495000/19651 = 25.19× √((1 − α)/β) = 98.9949 the same peak, rounded C(198) = 990000/44203 = 22.397× twice the fleet, 88.9% of the peak
Three terms, and the one that turns the curve over

Core ideas

What this lesson establishes

The new term is β. Everything surprising on this page follows from it being multiplied by N² while the thing it is divided into is only N.

1

Two penalties, not one

α is contention: a share of each request that has to queue for something only one machine can hold at a time. β is coherency: the cost of every machine agreeing with every other. With β = 0 the law is Amdahl in different clothing and its ceiling is 1/α. With β > 0 it is a different shape entirely.

2

Agreement is quadratic in the fleet

N machines have N(N − 1)/2 pairs, and a protocol in which each must reconcile with each pays in proportion to that count. The numerator of C(N) grows like N; the βN(N − 1) term in the denominator grows like N². One of those wins eventually, and it is not the numerator.

3

The peak is an integer, and it is found by comparing neighbours

You do not need calculus. C(N + 1) ≤ C(N) reduces exactly to β·N(N + 1) ≥ 1 − α, an inequality in integers with no root in it. The smallest N that satisfies it is the peak. √((1 − α)/β) is the same answer with a square root left in, and a square root is a decimal that has to be trusted rather than a count that can be checked.

The material

Three terms, one peak, and the descent on the other side

What each term charges for, the exact test that locates the peak, and why the closed form is printed beside that test rather than in place of it.

Definition · The Universal Scalability Law

For a system of N machines, the relative capacity is

C(N) = N/(1 + α(N − 1) + βN(N − 1)),

measured in multiples of what one machine delivers, where α ≥ 0 is the contention coefficient and β ≥ 0 the coherency coefficient. C(1) = 1 by construction. This course takes α and β as given; fitting them to measurements is regression and is not covered here.

Read the denominator as three charges. The 1 is the work itself. α(N − 1) is what the other N − 1 machines cost you in contention — linear, and by itself it produces a plateau at 1/α. βN(N − 1) is what every machine costs every other machine in keeping their state in agreement, and it is the only term that is quadratic.

Example · The dashed line, and the solid one

Take α = 1/50 and β = 0. Then C(N) = N/(1 + (N − 1)/50) climbs forever toward 1/α = 50× and never turns down: the familiar plateau. Now set β = 1/10000. At N = 10 the new term contributes 90/10000 = 0.009 against a denominator of about 1.19, which is nothing. At N = 200 it contributes 3.98 against a denominator of about 8.96, which is nearly half of it. The term that was invisible at ten machines is the dominant one at two hundred.

Where the curve turns over

Comparing C(N + 1) with C(N) is a single cross-multiplication, and almost everything in it cancels. What survives is a statement about N(N + 1) that can be tested with integer arithmetic at any size.

Theorem · The turnover test

For C(N) = N/(1 + α(N − 1) + βN(N − 1)) with β > 0,

C(N + 1) ≤ C(N) if and only if β·N(N + 1) ≥ 1 − α.

So the peak N* is the smallest positive integer N satisfying that inequality, and C is strictly increasing below it and strictly decreasing above it.

Both denominators are positive, so C(N + 1) ≤ C(N) is equivalent to (N + 1)(1 + α(N − 1) + βN(N − 1)) ≤ N(1 + αN + βN(N + 1)) after cross-multiplying.

The left side expands to (N + 1) + α(N² − 1) + βN(N² − 1) and the right side to N + αN² + βN³ + βN².

Subtracting the right side from the left leaves 1 + α(N² − 1) − αN² + βN³ − βN − βN³ − βN², which is 1 − α − βN − βN², that is 1 − α − βN(N + 1).

So C(N + 1) ≤ C(N) exactly when 1 − α − βN(N + 1) ≤ 0, which is β·N(N + 1) ≥ 1 − α. Since N(N + 1) is strictly increasing in N, the inequality fails below one integer and holds from it on, so there is a single turning point.

□

That inequality is N* = √((1 − α)/β) with the square root taken out of it. The two say the same thing; only one of them can be checked by multiplying two integers together. This course does the check and prints the root beside it, labelled as rounded, which is the convention “Compound Interest and Continuous Growth” on the Algebra path uses for the same reason.

Example · α = 1/50, β = 1/10000: the peak is 99 machines

The test is N(N + 1) ≥ (1 − α)/β = 9800. At N = 98, 98 × 99 = 9702, which is short — so the ninety-ninth machine still helps. At N = 99, 99 × 100 = 9900 ≥ 9800 — so the hundredth machine does not. The peak is N* = 99, exactly, by comparing two products of integers. The closed form gives √9800 = 98.9949, printed rounded, and it agrees.

C(99) = 99/(1 + 98/50 + 99·98/10000) = 99/(39302/10000) = 495000/19651 = 25.1896× C(98) = 10000/397 = 25.1889× C(100) = 10000/397 = 25.1889× so the hundredth machine gives back exactly what the ninety-ninth bought, and the hundred-and-first gives back more

C(98) and C(100) being the same exact fraction is not a coincidence of rounding — it is the curve being symmetric about its peak in this neighbourhood, and it is the clearest possible statement that machine one hundred was not merely unhelpful but actively cancelled machine ninety-nine.

The descent, in money

Past the peak the curve does not level off; it comes down. At N = 198 — twice the peak, and twice the bill — capacity is 990000/44203 = 22.397×, which is 88.9% of what the fleet delivered at ninety-nine machines. At N = 260 it is 20.133×. There exists a fleet size at which you are paying for two hundred and sixty machines and getting less than a hundred delivered.

The dangerous property of this shape is that its symptoms look like a capacity shortage. Throughput is below target and latency is up, so the fleet is grown, and throughput falls further. The only diagnosis that distinguishes it from ordinary saturation is the experiment nobody wants to run: remove machines and see whether throughput rises.

β > 0 is a fact about the protocol, not about the machines. Anything that makes every node agree with every other — a distributed lock, a replicated write that waits for all copies, a gossip mesh — puts a quadratic term in that denominator. “Replication and Consistency” is where those protocols are priced; this lesson is what their price does to the shape of the curve.

Interactive

The Universal Scalability Law

A peak, and a descent on the other side of it

The Universal Scalability Lawcontention flattens the curve; coherency turns it over
C(N) with both termsthe same α with β = 0the exact peak N*where another machine is worse

Method

Finding the peak of a scalability curve

Two integer products and a comparison. No differentiation, and no reading a maximum off a plot.

1

Compute the target (1 − α)/β

One division, done once. With α = 1/50 and β = 1/10000 it is 9800. Everything after this is comparing N(N + 1) against that one number.

2

Find the smallest N with N(N + 1) at or above it

Scan, or estimate and then check the two neighbours. 98 × 99 = 9702 is short; 99 × 100 = 9900 clears it; so N* = 99. Both products are integers, so the comparison is exact.

3

Evaluate C(N*) and the two neighbours

C(98), C(99), C(100) as fractions. The middle one must be the largest, and seeing C(98) = C(100) is the strongest evidence that you have the peak and not a point near it.

4

Print √((1 − α)/β) beside the integer and label it rounded

98.9949 here. It is a check on the arithmetic, and it must be presented as the gloss rather than as the answer: a machine count is a count, and 98.9949 machines is not one.

5

Evaluate well past the peak before you report anything

C(2N*) says how much capacity a fleet twice the size delivers — 22.397× against 25.19× here. Without that row the page shows a curve that flattens; with it, the reader sees it fall.

Peaks, plateaus and the difference

Score 0 / 0

α = 1/50, β = 1/10000: the peak located by integer comparison

The whole of the peak-finding is two multiplications and a comparison. The value at the peak is then one substitution.

target (1 − α)/β = (49/50)/(1/10000) = 9800 N = 98 98 × 99 = 9702 < 9800 machine 99 still helps N = 99 99 × 100 = 9900 ≥ 9800 machine 100 does not so N* = 99 C(99) = 99 / (1 + (1/50)(98) + (1/10000)(99)(98)) = 99 / (1 + 1.96 + 0.9702) = 99 / (39302/10000) = 495000/19651 = 25.1896× C(98) = 490000/19453 = 10000/397 = 25.1889× C(100) = 500000/19850 = 10000/397 = 25.1889× equal, exactly closed form √((1 − α)/β) = √9800 = 98.9949 (rounded) C(198) = 990000/44203 = 22.397× 88.9% of the peak, twice the bill β = 0 instead: C(N) → 1/α = 50× and never comes down

C(98) = C(100) exactly is the line that settles it. If the peak were somewhere else, those two would differ; they are equal because 99 sits between them, and the hundredth machine returned precisely what the ninety-ninth added.

The last two lines are the lesson. Twice the peak fleet delivers 88.9% of the peak’s throughput — and with the coherency term switched off the same contention α would have given a plateau at 50×, which is the curve a reader arriving from Amdahl expects to see.

For a faded attempt, keep α = 1/50 and set β = 1/2500. Compute the target, find N* by testing the two neighbouring products, evaluate C(N*), and predict before you compute it whether the peak throughput is higher or lower than 25.19×. Then check all four against the lab.

Common mistakes

1
Expecting a plateau and reading the peak as oneA reader who has only met Amdahl sees a curve that flattens and concludes that further machines are merely wasted. Here they are harmful: C(198) is below C(99), so the second hundred machines took capacity away and were paid for. The plateau is the β = 0 curve, and it is drawn dashed on the same axes so the two shapes can be told apart.
2
Rounding the closed form and calling it the answer√((1 − α)/β) = 98.9949 rounds to 99, which happens to be right here and is not guaranteed anywhere. The claim the page makes is β·N(N + 1) ≥ 1 − α tested at integers, which is two multiplications and a comparison and can be redone by hand. The root is printed as a gloss and labelled as rounded.
3
Treating β as a property of the hardwareβ is a property of the protocol: what has to agree with what, and how often. Faster machines and a faster network change how long each exchange takes, not how many exchanges the design requires, so they move the curve up without moving the peak much. Removing the need for agreement is what moves the peak.

Check your understanding

✓
Finish when you can locate a peak by comparing two integer products, and say what is on the far side of it.

You should be able to compute (1 − α)/β, find N* by testing N(N + 1) at two neighbouring integers, evaluate C(N*) and its neighbours as exact fractions, and state what C(2N*) is — in multiples of one machine and as a share of the peak.

Note: Both scaling laws so far answer “what does another machine buy?” in throughput. The rest of this course asks what it costs, and the first two questions are about shape rather than size: how big a batch should be, and whether capacity is better bought as many small machines or one large one. “Vertical vs Horizontal” uses this same contention term with β set to zero, so the two pages cannot disagree about what a fleet delivers.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.