Sizing and TCO

Appendix E · The web service model, in full

A web service and the data it keeps, on a fleet of Linux hosts, sized from a stated busy hour and costed over five years. No product is named and none is implied: what is on this page is a structure, and the numbers in it are placeholders for yours.

This is the model the chapters build a few nodes at a time, shown whole on this page. Most of the model is accounting identity and physics: requests times CPU time per request, watts times hours times price, capital plus running cost over a horizon. For that part, ch01 tells you that sampling the inputs is sufficient. But the model carries one measured constant and six ceilings, and either one makes a model conditional. scripts/verify-models.py classifies this model conditional and holds it to stricter rules. The answer is not guaranteed to be right even if every input is. A measured constant like a compression ratio belongs to one codec and one body of data, so a ratio right for measured data can be wrong for yours. A ceiling marks where the system stops acting as a chain of multiplications: a fleet asked for more than it can serve does not slow down in proportion. Appendix F is the book’s second model and shows what one looks like when a whole chain of it has not been measured.

The graph

Try it

The same model, as an interactive page: inputs with a range get sliders; the slider’s range is for exploration, not the distribution used in the tornado below. Some inputs have no range and no slider, such as engineers, full-time equivalent, the tornado’s top bar. Moving a slider recomputes the graph immediately; clicking any node shows its dependencies and uncertainty. Resample runs the book’s own sampler in your browser with the inputs you have moved held at their values.

Colour codes the kind of box: input, derived quantity, the one measured constant, or ceiling. An input’s border tells you what it is claiming: solid for a fact, dashed for a vendor’s claim, dotted for an assumption. A bar down the left edge of an input (you decide in the legend) marks one you choose, such as hosts in the fleet. Lines run left to right, from cause to effect. Every box sits immediately before the first box that uses it.

The node labels are small at page width; find the names on the interactive page or in the formula and provenance tables below. The graph is wide at the left and narrow at the right: many quantities collapse into a handful of answers, which is what makes a single wrong input hard to spot downstream. Three separate chains reach a single meeting point: the request rate, the working set, and the data on disk each produce a host count — hosts for requests, hosts for memory, and hosts for storage. These meet at hosts the model recommends, which takes the largest. Hosts the model recommends feeds nothing else in the graph; the fleet the model prices is hosts in the fleet, which you decide. Which of the three chains sets the answer is the subject of ch10.

Every formula

The graph above, as text: every derived quantity and every ceiling, with the formula the file gives it and the chapter that added it. The table is rendered from the model file, so it cannot disagree with it. Each row shows the label and in backticks the name the file uses; formulas refer to nodes by those names.

A ceiling’s row starts with limit on, as its box in the graph does, separating it from the quantity it watches when the two share a label such as utilisation, counting coordination, which has a derived row and a limit on row. Inputs have no row; they appear only inside formulas. To find an input’s source, look it up in the provenance table under Where the inputs came from; it lists every input under the same name it has in formulas. For example, service_demand in the formula for cores busy at the busy hour is CPU time per request in the provenance table.

QuantityFormulaUnitIntroduced in
horizon periods (horizon_periods)horizon / one_yearch02
peak request rate at horizon (peak_request_rate)peak_request_rate_t0 * annual_growth ** horizon_periodsrequest/secondch02
records held at horizon (stored_data)stored_data_t0 * annual_growth ** horizon_periodsTBch02
memory the service can use, per host (ram_for_service)ram_per_host * (1 - os_reserve)TB/hostch03
mean request rate at horizon (mean_request_rate)peak_request_rate / peak_to_meanrequest/secondch04
cores in the fleet (cores)hosts * cores_per_hostcorech05
cores busy at the busy hour (busy_cores)peak_request_rate * service_demandcorech05
utilisation (utilisation)busy_cores / coresch05
service time (service_seconds)service_demand * one_request / one_coresecondch05
requests in flight, if none waited (in_flight_unqueued)peak_request_rate * service_secondsrequestch05
effective utilisation (effective_utilisation)min(utilisation, utilisation_cap)ch06
residence time (residence_time)service_seconds / (1 - effective_utilisation)secondch06
time spent queueing (waiting_time)residence_time - service_secondssecondch06
requests in the system (concurrency)peak_request_rate * residence_timerequestch06
limit on utilisation at the busy hour (queueing_headroom)
utilisation against a limit of 1, keeping queueing_margin below it
ch06
host count (host_count)hosts / one_hostch07
throughput of one host alone (single_host_throughput)cores_per_host / service_demandrequest/second/hostch07
throughput if scaling were free (linear_throughput)hosts * single_host_throughputrequest/secondch07
achievable throughput (achievable_throughput)
linear_throughput / (1 + contention * (host_count - 1) + crosstalk * host_count * (host_count - 1))
request/secondch07
scaling efficiency (scaling_efficiency)achievable_throughput / linear_throughputch07
limit on fraction of the fleet doing nothing useful (scaling_loss)
1 - scaling_efficiency against a limit of 1, keeping 0.5 below it
ch07
where adding hosts stops helping (peak_hosts)one_host * sqrt((1 - contention) / crosstalk)hostch07
fraction of the peak already built (headroom_to_peak)host_count / (peak_hosts / one_host)ch07
utilisation, counting coordination (utilisation_including_coordination)
peak_request_rate / achievable_throughputch07
how much the queueing view understated it (optimism)utilisation_including_coordination / utilisationch07
limit on utilisation, counting coordination (coordination_headroom)
utilisation_including_coordination against a limit of 1, keeping queueing_margin below it
ch07
working set at horizon (working_set)stored_data * hot_fractionTBch08
memory the service can use, whole fleet (fleet_ram)hosts * ram_for_serviceTBch08
limit on working set against memory (cache_fill)
working_set / fleet_ram against a limit of 1, keeping cache_margin below it
ch08
raw bytes per stored byte (raw_per_stored)replication_factor * index_overhead / record_compressionch09
raw disk needed at horizon (raw_data)stored_data * raw_per_storedTBch09
hosts for storage (hosts_for_storage)ceil(raw_data / (disk_per_host * (1 - disk_margin)))hostch09
installed disk (installed_disk)hosts * disk_per_hostTBch09
limit on disk fill at horizon (disk_fill)
raw_data / installed_disk against a limit of 1, keeping disk_margin below it
ch09
hosts for requests (hosts_for_requests)ceil(busy_cores / (cores_per_host * (1 - queueing_margin)))hostch10
hosts for memory (hosts_for_memory)ceil(working_set / (ram_for_service * (1 - cache_margin)))hostch10
hosts the model recommends (hosts_recommended)max(hosts_for_requests, hosts_for_memory, hosts_for_storage)hostch10
hosts after one is lost (hosts_after_failure)hosts - one_hosthostch11
survivors’ utilisation (utilisation_after_failure)busy_cores / (hosts_after_failure * cores_per_host)ch11
limit on utilisation with one host down (failure_headroom)
utilisation_after_failure against a limit of 1, keeping queueing_margin below it
ch11
host capex (host_capex)hosts * host_priceUSDch18
network capex (network_capex)hosts * network_price_per_hostUSDch18
capex (capex)host_capex + network_capexUSDch18
facility power (facility_power)hosts * host_power * puekWch18
annual energy (annual_energy)facility_power * hours_per_yearkWh / yearch18
annual energy cost (annual_energy_cost)annual_energy * electricity_priceUSD / yearch18
annual licences (annual_licences)cores * licence_per_core + hosts * licence_per_hostUSD / yearch18
annual support (annual_support)capex * support_rateUSD / yearch18
annual staff cost (annual_staff_cost)staff_fte * fully_loaded_salaryUSD / yearch18
annual opex (annual_opex)
annual_energy_cost + annual_licences + annual_support + annual_staff_cost
USD / yearch18
lifecycle opex (lifecycle_opex)annual_opex * horizonUSDch18
total cost of ownership (tco)capex + lifecycle_opex + migration_costUSDch18
mean request rate over the horizon (average_request_rate)
(peak_request_rate_t0 / peak_to_mean + mean_request_rate) / 2
request/secondch18
requests over horizon (requests_over_horizon)average_request_rate * seconds_per_year * horizonrequestch18
cost per million requests (cost_per_million_requests)tco / requests_over_horizonUSD/megarequestch18
average stored (average_stored)(stored_data_t0 + stored_data) / 2TBch18
cost per stored TB per month (cost_per_stored_tb_month)tco / average_stored / horizonUSD / TB / monthch18

Source — models/web_service/model.yaml and its build order

The outputs

OutputPoint estimate90% intervalUnit
hosts the model recommends5420 to 230host
hosts in the fleet54fixedhost
total cost of ownership$2,002,083$1,508,230 to $2,923,724USD
cost per million requests$1.82$0.55 to $5.98USD/megarequest
cost per stored TB per month$839.64$305.33 to $2,108USD / TB / month
capex$421,214$272,130 to $658,773USD
annual opex$316,174$227,660 to $484,257USD / year
annual energy206,269159,636 to 269,269kWh / year
utilisation at the busy hour0.6440.156 to 2.48
utilisation with one host down0.6560.159 to 2.53
working set against memory0.7460.194 to 2.67
disk fill at horizon0.6700.213 to 2.12
fraction of the fleet doing nothing useful0.3210.213 to 0.457
utilisation, counting coordination0.9480.233 to 3.81
residence time0.03670.0128 to 0.857second
time spent queueing0.02360.0021 to 0.839second
requests in the system1,562160 to 107,336request
requests in flight, if none waited556135 to 2,147request
how much the queueing view understated it1.471.27 to 1.84
fraction of the peak already built0.3280.186 to 0.584

Source — web_service-reference · the model to explore; each input with a range has a slider

Where each ceiling sits

CeilingAt the planHeadroomAllowedLimitVerdictOver allowedOver limit
working set against memory0.7525%0.751.00ok49%35%
utilisation, counting coordination0.9530%0.701.00into the margin65%48%
disk fill at horizon0.6725%0.751.00ok44%29%
utilisation with one host down0.6630%0.701.00ok47%30%
utilisation at the busy hour0.6430%0.701.00ok46%30%
fraction of the fleet doing nothing useful0.3250%0.501.00ok1%0%

Source — web_service-reference · the model to explore; each input with a range has a slider

At the plan shows the quantity the ceiling watches, calculated at every input’s point estimate, for hosts in the fleet; Allowed is the limit minus the headroom the model declares. Verdict judges the plan: ok at or below the allowed line, into the margin past allowed but before the limit, over past it. Over allowed and Over limit show futures the model drew. Each is the share of futures where the quantity crosses that line, so a percentage says how often that happens, not how far the quantity goes beyond it.

One row has a verdict other than ok: utilisation, counting coordination, which reads into the margin. It counts work the hosts do for each other, so it is always higher than plain utilisation. None of the three chains setting hosts the model recommends counts this work; the fleet bought on that recommendation keeps its margin on plain utilisation and spends it on coordination. Its Over limit column shows the largest share in the table. A design under its hard limit and inside its declared margin has not failed; it has spent the reserve it was keeping for a failure it has not yet encountered (ch11).

What moves the answer

InputKindtotal cost of ownership at its p10at its p90Swing
engineers, full-time equivalentinput$1,732,449$2,360,530$628,081
licence per coreinput$1,829,283$2,347,683$518,400
fully loaded salaryinput$1,805,056$2,258,646$453,590
host priceinput$1,827,097$2,256,332$429,235
support rateinput$1,945,271$2,074,320$129,049
electricity priceinput$1,951,956$2,080,874$128,918
network price per hostinput$1,969,541$2,046,600$77,059
host powerinput$1,979,689$2,028,960$49,271
PUEinput$1,987,942$2,020,882$32,940

Source — web_service-reference · the model to explore; each input with a range has a slider

Each bar moves one input from its p10 to its p90, with every other input held at its point estimate. The p10 and p90 come from the distribution the model draws that input from, not from the slider’s range on the interactive page. The ordering tells you which input to go and measure first (ch19). It is one input at a time, so an input whose effect appears only with another can still move the answer a long way.

Every bar is a cost input, and the demand side is not here at all. No request rate, no growth rate, no records held. That is not an omission in the chart. The total prices the fleet that was bought, and the fleet is hosts, hosts in the fleet: a number you decide, which the model does not derive. More data does not buy more hosts by itself. It makes the fleet you have too small, and the model says so through the disk and cache ceilings, not through the bill. On the interactive page, drag records held, day one: hosts the model recommends and those two ceilings move, and the five-year total stays where it is. On that page, click any input in the graph; the Details panel shows it with a Reaches section naming the outputs it can move and, under “Cannot move”, the ones it cannot.

For demand to move the five-year total, you have to re-decide the fleet, which is what the second scenario below does.

The answer as a distribution

This is the cost per million requests, not the five-year total. The reference fleet was bought at the point estimates and held fixed in every future, so its cost moves only a little from future to future: prices and running costs shift. The number of requests moves a great deal, following the busy-hour rate, peak-to-mean ratio and growth rate. Cost per million is the total divided by requests, so when demand comes high the same cost spreads over many requests and each is cheap; when demand comes low, each is expensive. The outputs table above shows the unit cost’s range, against its own middle value, is far wider than the total’s. The distribution carries all these futures; a single number carries none.

Where the inputs came from

InputProvenanceSource
○annual growth factor
annual_growth
assumption
ch04 — lognormal because growth compounds and the factor cannot be zero or less. One future in ten grows by less than 12% a year, and one in ten by more than 60%; outside that range you would be surprised. One factor for requests and for records, because users drive both. It is a share a year, not an amount, which is the model’s assumption about how this service grows.
○cache margin
cache_margin
assumption
ch08 — how much of the fleet’s memory is kept free of the working set, for its own daily swing and for the process heaps. Declared once, the ceiling on the working set checks against it (ch08), and from ch10 so does the chain that sizes the fleet for memory, so the two cannot drift apart.
○contention
contention
assumption
ch07 — an assumption: it has not been fitted for this service; a fit from throughput measured at three fleet sizes, one a single host, would replace it. Triangular, because a fit gives a central value and a range rather than a shape. Its maximum is the end to distrust: a serial fraction can always be worse than the one you measured.
◐cores per host
cores_per_host
vendor claim
spec sheet: physical cores. A hyperthread is not a core, and a sheet that counts threads doubles this number without doubling the work a host does
○crosstalk
crosstalk
assumption
ch07 — an assumption, not fitted for this service, though the same measurement as contention’s would replace it: a fit from throughput at three fleet sizes, one a single host. It is the harder of the two to fit because it shows only in how the curve bends at larger fleets, and the three measured sizes usually sit at the small end. Lognormal, because it is wide and cannot be negative, and because a shape should not assert a hard upper limit on a quantity this weakly known.
○disk margin
disk_margin
assumption
ch11 — room to re-replicate a dead host’s records onto the survivors, plus what a filesystem needs to keep allocating well. Declared once and used by the chain and by the ceiling
◐disk per host
disk_per_host
vendor claim
spec sheet: one local drive. Decimal TB, not TiB — appendix D, and it is a 10% difference
○electricity price
electricity_price
assumption
all-in delivered rate including transmission. Lognormal: it cannot go negative and its history is multiplicative
○fully loaded salary
fully_loaded_salary
assumption
salary, employer costs, tooling and overhead. Lognormal because pay is right-skewed and cannot go negative; the p90 is a senior engineer in an expensive city
○horizon
horizon
assumptionthe refresh cycle this fleet is bought against
◐host power
host_power
vendor claim
typical draw under load, per host as configured. Triangular, and one of the few inputs here whose bounds are physical rather than editorial: a host cannot draw less than it idles at, or more than its supply will give it
◐host price
host_price
vendor claim
chassis, CPU, memory, drives and boot media, as configured. Lognormal like any price, and wide because a host is a configuration rather than a commodity
○hosts in the fleet
hosts
assumption
The sizing decision, taken the usual way: the host count the model recommends (from ch10), worked out with every input at its point estimate. Change this number and watch the ceilings move; that is ch12’s exercise.
○share of records touched in a busy hour
hot_fraction
assumption
ch08 — the working set as a share of everything held. Triangular; nobody measures this and everybody has an opinion, and the maximum is a service whose users all look at the same week’s data
●hours per year
hours_per_year
fact
by definition, 365.25 x 24. The quarter-day is six hours a year; leaving it out would understate every hourly cost by under a tenth of a per cent—the same share every year, not growing with the horizon. It is smaller than this model’s other errors, and free to get right.
○index overhead
index_overhead
assumption
indexes, the write-ahead log and journals as a multiplier on stored bytes. Triangular, and the bounds are for a service with a few indexes per table — a search-heavy one is off the top of this range
◐licence per core
licence_per_core
vendor claim
the platform software’s per-core licence, as quoted. Lognormal: a price, and a wide one, because it is the line item most often negotiated. It is what makes the core count a cost as well as a capacity (ch15)
◐licence per host
licence_per_host
vendor claim
The design the plan was built on is licensed per core, with no per-host charge. When a design licenses per host, that figure goes here and zero in licence_per_core, allowing the two to be compared like for like.
○one-off cost of moving to this design
migration_cost
assumption
The design the plan was built on runs on that platform already, so there is nothing to migrate. A challenger’s scenario overrides this with the team’s own estimate of the move, marked as an assumption.
○network price per host
network_price_per_host
assumption
switch ports, optics and cabling, amortised per host. Triangular rather than lognormal, although it is a price: it is a bill of materials divided by a host count somebody chose, so the bounds are the plausible designs rather than a market
●one core
one_core
factdefinition
●one host
one_host
factdefinition
●one request
one_request
factdefinition
●one year
one_year
factdefinition
○os reserve
os_reserve
assumption
the share of memory the kernel, the agents and the page cache floor keep before the service sees any. Triangular: a floor, a usual figure, and a host with too many agents on it
○peak request rate, day one
peak_request_rate_t0
assumption
ch04 — the busy hour, not the daily mean. Triangular, because this is an engineer’s lowest, most likely and highest values; claiming more precision would be invention.
○peak-to-mean ratio
peak_to_mean
assumption
ch04 — the busy hour against the daily mean. Triangular, and it is a property of your traffic that belongs to the estate target: nothing here can measure it
○PUE
pue
assumption
ch16 — facility overhead. A multiplier on IT load, and the single number a colocation contract is most likely to disagree with you about. Triangular: the minimum is a good building, the maximum is a poor one, and below one is impossible
○queueing margin
queueing_margin
assumption
ch06 — the share of the fleet kept idle at the busy hour. The ceiling lets utilisation go up to one minus this margin, and no further. Declared once, it is used by the ceiling that checks utilisation at the busy hour (ch06), the ceiling on utilisation counting coordination (ch07), the chain that sizes the fleet for requests (from ch10) and the ceiling with one host lost (ch11), so they cannot drift apart.
◐ram per host
ram_per_host
vendor claim
spec sheet: the modules fitted. The sheet says 64 GB and means GiB — appendix D — and the operating system will report less than either, which is os_reserve’s job
○replication factor
replication_factor
assumption
three copies of every record, so that a host can die and take its disks with it. A different durability scheme substitutes its own factor here and the rest of the model is unchanged, which is the point of it being a node
●seconds per year
seconds_per_year
factby definition, 365.25 x 86,400
○CPU time per request
service_demand
assumption
The lowest, likeliest and highest values are this book’s own choice for the running example: not measured on any machine, not taken from any product. It is held as an assumption because no reference machine is declared in rig/machine.yml; make measure-rig on a declared machine replaces it with a measured one. It is triangular, with three values, because it has not been measured. Once it is, it becomes a normal spread around the measurement, which is a change of claim and not only of numbers (ch13).
○engineers, full-time equivalent
staff_fte
assumption
Engineers this fleet occupies, full-time equivalent. Triangular, and the shape cannot express what happens: people are not divisible, so the real spread moves in whole people.
○records held, day one
stored_data_t0
assumption
The service owners estimate what the service holds today: its database and the objects users have uploaded, before replication, indexes or compression. It has not been counted yet, and counting it would turn the estimate into a fact.
◐support rate
support_rate
vendor claim
annual support as a fraction of capital cost. Triangular because it is negotiated inside a band the market sets rather than drawn from one: the spread is what different buyers get, not what varies from year to year
○utilisation the model will admit to
utilisation_cap
assumptionwhere this model stops being about queues (ch06)
37 inputs6 facts, 8 vendor claims, 23 assumptions

Source — web_service-reference · the model to explore; each input with a range has a slider

ConstantValueStandard errorUnitMeasured against
record compression ratio
record_compression
3.58± 0.0009python zlib (DEFLATE level 6)

Source — records-compression · bench.measure.application_records — JSON user profiles, orders and events in a 20/50/30 mixture, 128-bit identifiers, seeds 0-7 · python zlib (DEFLATE level 6)

Every input the model has is listed in the first table, with its kind (fact, vendor claim or assumption) and the source the model file gives for it. The name in backticks is the one the formulas use, so an input you meet in the formula table can be looked up here.

The model has one measured constant: record compression ratio (record_compression). The row names the implementation that measured it. The line under the table names the corpus, a synthetic mixture of application records this repository generates, and links the stamped result, which lists the conditions the number holds under. A compression ratio belongs to one codec and one body of data. The method transfers; the number does not.

One condition shapes how you use the number: the records were compressed as one continuous stream. A database compresses page by page and sees less repetition across records than a stream does, so the ratio is an upper bound on what a store achieves, not an estimate. The model divides by it: raw_per_stored = replication_factor * index_overhead / record_compression. A ratio that is too high gives too little raw disk, so raw disk needed at horizon, hosts for storage, and disk fill at horizon all come out optimistic: a real store needs more disk than the chain says. Nothing in this repository measures how much more. To get the ratio for your own data, replace the generator the stamped result names, bench.measure.application_records, with a generator that reads your own records. Then run make measure to take the constant again, and make models to carry it through the model. Appendix H shows how to follow a constant back to its stamped result and re-derive it.

Two scenarios, side by side

OutputReference scenarioSized for the growth we might get, not the growth we expect
hosts the model recommends54
20 to 230
54
20 to 230
hosts in the fleet54131
total cost of ownership$2,002,083
$1,508,230 to $2,923,724
$3,646,206
$2,781,458 to $5,393,738
cost per million requests$1.82
$0.55 to $5.98
$3.32
$1.02 to $10.96
cost per stored TB per month$839.64
$305.33 to $2,108
$1,529
$561.50 to $3,859
capex$421,214
$272,130 to $658,773
$1,021,835
$660,167 to $1,598,135
annual opex$316,174
$227,660 to $484,257
$524,874
$386,622 to $822,825
annual energy206,269
159,636 to 269,269
500,394
387,264 to 653,228
utilisation at the busy hour0.644
0.156 to 2.48
0.265
0.0643 to 1.02
utilisation with one host down0.656
0.159 to 2.53
0.267
0.0648 to 1.03
working set against memory0.746
0.194 to 2.67
0.307
0.0798 to 1.10
disk fill at horizon0.670
0.213 to 2.12
0.276
0.0879 to 0.874
fraction of the fleet doing nothing useful0.321
0.213 to 0.457
0.604
0.464 to 0.753
utilisation, counting coordination0.948
0.233 to 3.81
0.671
0.163 to 2.90
utilisation0.644
0.156 to 2.48
0.265
0.0643 to 1.02
residence time0.0367
0.0128 to 0.857
0.0178
0.0110 to 0.619
time spent queueing0.0236
0.0021 to 0.839
0.0047
0.0008 to 0.606
requests in the system1,562
160 to 107,336
757
144 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
2.53
1.86 to 4.05
fraction of the peak already built0.328
0.186 to 0.584
0.797
0.450 to 1.42
working set against memory — over its limit35%6%
utilisation, counting coordination — over its limit48%34%
disk fill at horizon — over its limit29%3%
utilisation with one host down — over its limit30%5%
utilisation at the busy hour — over its limit30%5%
fraction of the fleet doing nothing useful — over its limit0%0%

Source — web_service-reference and web_service-sized_for_growth · the model to explore; each input with a range has a slider

The left column buys the fleet the model recommends at the point estimates. The right column buys the fleet the p90 growth case would need — growth that is plausible but not expected. Only hosts in the fleet differs between them; hosts the model recommends is the same in both because the recommendation does not depend on the fleet you buy. The difference in capital is a number, and so is the difference in how often each ceiling goes over its limit. The right column costs more, and four ceilings about load and space (utilisation at the busy hour, utilisation with one host down, working set against memory, disk fill at horizon) are over their limits in far fewer of its futures.

More hosts means more coordination between them. Fraction of the fleet doing nothing useful rises, and in the right column’s plan it is past that ceiling’s allowed line. Fraction of the peak already built reaches past one at the top of the right column’s range; past it, each host added lowers throughput. Utilisation, counting coordination stays over its limit in a large share of the right column’s futures and falls far less than the load and space ceilings do. How much the queueing view understated it is larger in the right: the bigger fleet loses more to coordination than plain utilisation shows. Choosing between the two is a judgement that you or whoever signs the plan must make and defend, which is ch21 · A TCO for a finance audience.

What this cannot tell you

Whether the fleet is the right one. The model prices hosts, and hosts is a decision. Every figure on this page is conditional on it, and nothing here argues for the number. The reference scenario takes the recommendation at the point estimates, which is how the decision is usually taken and is not the same as it being right. The ceilings say whether that fleet survives the model’s futures; they cannot say whether a different fleet would have been a better buy. That comparison is a second scenario and a judgement, which is ch21.

What the structure leaves out. The chains here are demand, memory and disk, and they meet only at hosts the model recommends. Nothing connects a request to the record it writes, so the model cannot work out whether traffic and data grow together. It assumes they do, through a single input, annual growth factor, that multiplies both the busy-hour request rate and the records held. That is a stronger assumption than a correlation: a correlation would let the two tend to grow together while differing in any one future, but a shared factor makes them grow at the same rate in every future the model draws. The model’s two declared correlations are about other inputs: busy-hour request rate with CPU time per request, and host price with network price per host. There is no tier that fails differently from the others, no request that costs more than its neighbour, and no second site. Sampling the inputs harder will not find any of that: an omission is not a wide interval, it is a chain that was never drawn (ch20).

Whether five years is the right horizon. It is a decision too, and it sets how much of the total is capital and how much is running cost. A different horizon does not just scale the answer; it changes which half of the bill the argument is about (ch15).

Running it yourself

python3 -m bench.run_models --model web_service     # evaluate, sample, stamp
python3 scripts/verify-models.py                    # units, provenance, ceilings, shape
python3 scripts/render-figures.py                   # re-render every figure above
python3 -m pytest tests/test_models.py              # the reference outputs, asserted

Every figure on this page came from bench.run_models. verify-models.py refuses a model that does not typecheck, and tests/test_models.py is what stops any of it changing silently.

By Chris Snow, in collaboration with Claude (Anthropic) · Prose and figures: CC BY-NC 4.0 · Code and models: Apache 2.0