Sizing and TCO

ch16 · Power first

Builds on ch12 and ch15.

The question

What changes when watts are the binding constraint rather than money?

Everything so far has sized a system from demand, then priced what it sized. Here the sizing runs the other way. A rack has a power allocation. The allocation is not negotiable. The number of machines follows from it.

The material

Sizing backwards

When power binds, the chain inverts. You start with an allocation at the wall. You divide out what the building spends on itself. You divide by what a machine draws. Then you round down.

That rounding is the only one in this book that goes that way. Every other constraint is a demand to be satisfied, so it rounds up. This one is a supply that cannot be exceeded. Problem 16.1 is that inversion. People get the facility multiplier backwards: an inefficient building buys you fewer machines, not more.

Here is the same fleet on two axes:

Facility power and five-year cost against host count, with the allocation as a wallWatts: a wall020406080hosts in the fleet5 kW10 kW15 kW20 kW25 kW30 kW35 kWallocation 16 kWfits: 36 hosts, 15.7 kWdemand asked for 54: 23.5 kWone more crosses itMoney: a slope020406080hosts in the fleet$1M$2Mfits: 36 hosts, $1,617,743demand asked for 54: $2,002,083no wall: a price can be argued with

On the left, watts against hosts, and a wall: what the building will supply, the largest whole number of hosts that stays under it, and the next one, which does not. On the right, the same hosts against what they cost over the horizon. It is a slope, and there is nothing across it to stop anybody. That is the difference between a constraint and a price, and the rest of this chapter is about what happens to the fleet the wall leaves you.

What a power budget does to a fleet sized for demand

OutputReference scenarioSized from the power budget inwards
hosts the model recommends54
20 to 230
54
20 to 230
hosts in the fleet5436
five-year total cost of ownership$2,002,083
$1,508,230 to $2,923,724
$1,617,743
$1,189,939 to $2,388,434
cost per million requests$1.82
$0.55 to $5.98
$1.47
$0.44 to $4.84
cost per stored TB per month$839.64
$305.33 to $2,108
$678.46
$244.15 to $1,707
capex$421,214
$272,130 to $658,773
$280,810
$181,420 to $439,182
annual opex$316,174
$227,660 to $484,257
$267,387
$186,962 to $413,526
annual energy206,269
159,636 to 269,269
137,513
106,424 to 179,513
utilisation at the busy hour0.644
0.156 to 2.48
0.966
0.234 to 3.73
utilisation with one host down0.656
0.159 to 2.53
0.993
0.241 to 3.83
working set against memory0.746
0.194 to 2.67
1.12
0.290 to 4.01
disk fill at horizon0.670
0.213 to 2.12
1.00
0.320 to 3.18
fraction of the fleet doing nothing useful0.321
0.213 to 0.457
0.224
0.139 to 0.337
utilisation, counting coordination0.948
0.233 to 3.81
1.25
0.305 to 4.91
utilisation0.644
0.156 to 2.48
0.966
0.234 to 3.73
residence time0.0367
0.0128 to 0.857
0.383
0.0145 to 0.877
time spent queueing0.0236
0.0021 to 0.839
0.370
0.0035 to 0.859
requests in the system1,562
160 to 107,336
16,296
176 to 107,336
requests in flight, if none waited556
135 to 2,147
556
135 to 2,147
how much the queueing view understated it1.47
1.27 to 1.84
1.29
1.16 to 1.51
fraction of the peak already built0.328
0.186 to 0.584
0.219
0.124 to 0.389
working set against memory — over its limit35%55%
utilisation, counting coordination — over its limit48%61%
disk fill at horizon — over its limit29%51%
utilisation with one host down — over its limit30%49%
utilisation at the busy hour — over its limit30%48%
fraction of the fleet doing nothing useful — over its limit0%0%

Source — web_service-reference and web_service-power_first · every input on a slider

The left column is the fleet ch12 recommended. The right is what fits in the allocation.

It is smaller. Everything downstream is smaller with it: less capital, less running cost, a lower total. Read those rows alone and the power-constrained design looks like a saving.

Then read the ceilings:

CeilingAt the planHeadroomAllowedLimitVerdictOver allowedOver limit
working set against memory1.1225%0.751.00over68%55%
utilisation, counting coordination1.2530%0.701.00over75%61%
disk fill at horizon1.0025%0.751.00over66%51%
utilisation with one host down0.9930%0.701.00into the margin66%49%
utilisation at the busy hour0.9730%0.701.00into the margin64%48%
fraction of the fleet doing nothing useful0.2250%0.501.00ok0%0%

Source — web_service-power_first · every input on a slider

None of them is comfortable, and they are uncomfortable in different ways. Three are over their hard limit at the point estimate:

That is not an unlucky percentile. It is the expected case, and the model puts each of the three over in a large share of the futures it thinks plausible. The two queueing ceilings are still under their limit. But they have spent the whole margin that was keeping them there. That is what the verdict column means by into the margin rather than ok.

So the honest output of this chapter is not a fleet. It is the statement that this workload does not fit in this power envelope, with the numbers to say so.

That is a useful answer, and a spreadsheet does not produce it. Sized from a power budget, a spreadsheet gives a host count and stops. The host count is real. The fleet it describes cannot do the job it would be bought for.

Four ways out of a power budget that does not fit

Once the model says the workload does not fit, there are four things you can do. The model prices three of them.

Get more power. The expensive one, and often the slowest. A power allocation is a building’s property, and sometimes a substation’s.

Use less per machine. Fewer, denser machines change watts per machine and capacity per machine together. The model will say whether the trade is favourable.

Improve the building. ch15’s facility multiplier is a division. Problem 16.2 is that division, and the framing is the point: a multiplier quoted as a small surcharge is a substantial share of the bill. Halving the overhead is equivalent to finding machines that draw materially less, and it is often cheaper.

Want less. Shed the least valuable requests at the busy hour. Keep fewer records. Accept a longer tail. Nobody proposes this in a sizing meeting, and it is frequently the right answer.

Why power is not a price like the others

Every other cost in ch15 is a price: negotiable, comparable, subject to a discount. Energy is physics with a price attached.

InputKindannual energy at its p10at its p90Swing
host powerinput172,746246,50273,756
PUEinput185,101234,41149,310
annual growth factorinput206,269206,2690
contentioninput206,269206,2690
crosstalkinput206,269206,2690
electricity priceinput206,269206,2690
fully loaded salaryinput206,269206,2690
host priceinput206,269206,2690

Source — web_service-reference · every input on a slider

Four things move the energy bill: a count of machines, a draw per machine, a building multiplier and a tariff. Three of the four are properties of hardware and buildings, not of contracts. The one that is a price is set by a market nobody in the room influences.

Energy is also the only cost line that is a constraint at the same time. Nobody is told they may not spend more on hosts. People are regularly told the rack has no more power.

A note on carbon

The model does not carry a carbon figure. The omission is deliberate.

Converting energy to emissions needs a grid intensity. That varies by region, by hour, and by whatever contractual instruments an organisation has bought. Those instruments are an accounting decision, not a physical one. This book produces the kilowatt-hours, which is the part it can defend. Multiplying them is somebody else’s judgement, and the multiplier is where all the disagreement is.

Energy price and carbon price move together (ch14). A model that added a carbon line and drew it independently would understate the range of the total.

Key takeaways

  • When power binds, the chain runs backwards and rounds down. Start at the wall, divide out what the building spends on itself, divide by what a machine draws, and take the whole number below.

  • A fleet that fits the allocation can fail to do the job. Sized to the power budget, the running example is over three hard limits at the point estimate and has spent the margin on the other two.

  • The honest output is a statement that the workload does not fit, with the numbers to say so. A spreadsheet sized from a power budget gives a host count and stops.

  • There are four ways out, and the model prices three of them. More power, less per machine, a better building, or wanting less. The last is rarely proposed and often right.

  • Energy is the one cost that is also a constraint. Nobody is told they may not spend more on hosts. People are regularly told the rack has no more power.

What this cannot tell you

What your allocation is. Contracted power, breaker capacity, cooling capacity and what the facility will let you draw sustainably are four different numbers. They are not usually the same one. This chapter takes one number. Getting the right one is a conversation with whoever runs the building.

What a machine draws. The model uses a typical figure under load, marked as a vendor’s claim. Draw varies with workload, with ambient temperature, and with how busy the processors are. The number that matters for an allocation is a sustained peak, not a typical figure.

Anything about the shape of the draw. Power is billed on energy and constrained on peak. A fleet that idles overnight and saturates at noon has an energy bill of one shape and a capacity problem of another. This model has only the average.

Whether the building’s multiplier is stable. It varies with outside temperature and with how full the facility is. The figure quoted in a contract is usually an annual average under favourable assumptions.

What to do about it. The model prices three of the four responses above. Which to choose is a decision, and ch21 is about putting one to somebody.

Problems

Three, in tests/power_first/. The first two have tests. The last does not, and says why.

16.1 — Sizing backwards. From an allocation to a machine count. Get the multiplier the right way up, and round the way a supply rounds rather than the way a demand does.

tests/power_first/stubs.py · hosts_that_fityours to edit
def hosts_that_fit(budget_kw: float, watts_per_host: float, pue: float) -> int:
    """Problem 16.1 - sizing runs the other way when power is the constraint.

    ``budget_kw`` is the power allocation, at the wall. ``watts_per_host`` is what one machine
    draws. ``pue`` is the facility multiplier - what the building spends on cooling and losses for
    every watt the machines use.

    Return how many whole machines fit in the allocation.

    Two things to get right. The multiplier applies to the machines' draw and not the other way
    round, so a rack full of efficient machines in an inefficient building buys you fewer of them,
    not more. And you round **down** - every other rounding in this book goes up, because every
    other constraint is a demand to be satisfied, and this one is a supply that cannot be
    exceeded.
    """
    raise NotImplementedError("problem 16.1")

The same check at a desk: python3 -m pytest tests/power_first/test_problem_1_budget.py -m problem

16.2 — A ratio quoted, a fraction paid. One line, worth having in your head. A building that sounds a little inefficient is spending a substantial share of the bill on itself. The two framings land very differently in a conversation about money.

tests/power_first/stubs.py · pue_premiumyours to edit
def pue_premium(pue: float) -> float:
    """Problem 16.2 - what the building costs, as a fraction of the bill.

    Return the share of the electricity bill that goes to the facility rather than to the
    machines, as a number between zero and one.

    It is one line and it is worth having in your head, because a facility multiplier is quoted as
    a ratio and paid as a fraction, and the two feel different. A building quoted as half again
    over the machines is spending a third of the bill on itself.
    """
    raise NotImplementedError("problem 16.2")

The same check at a desk: python3 -m pytest tests/power_first/test_problem_2_pue.py -m problem

16.3 — What you are actually allowed to draw. No test: the numbers are held by people, not by this repository.

Find out your real power allocation, and find out who knows it. Contracted supply, breaker capacity, cooling capacity and what the machines currently draw are four different numbers. The smallest is the one that sizes you.

Expect this to be hard. In most organisations the people who plan capacity and the people who hold the power contract have never been in the same meeting. The constraint that binds first is owned by neither.

A good answer has four numbers, or has fewer and names who would have to be asked for the rest. If you already knew all four without asking anybody, you are in an unusual organisation, and the rest of this chapter is easier for you than for most readers.

Where to go next

ch17 turns a total into a number somebody outside the team can compare against something. That is where a power-constrained design either justifies itself or does not.

ch14 is why an energy price and a carbon price should not be drawn independently.