Appendix E · The web service model, in full
What this holds
| Purpose | The running example, through every toolkit output |
| Model | models/web_service/model.yaml |
| Built from | web_service-reference, web_service-sized_for_growth |
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.
| Quantity | Formula | Unit | Introduced in |
|---|---|---|---|
horizon periods (horizon_periods) | horizon / one_year | ch02 | |
peak request rate at horizon (peak_request_rate) | peak_request_rate_t0 * annual_growth ** horizon_periods | request/second | ch02 |
records held at horizon (stored_data) | stored_data_t0 * annual_growth ** horizon_periods | TB | ch02 |
memory the service can use, per host (ram_for_service) | ram_per_host * (1 - os_reserve) | TB/host | ch03 |
mean request rate at horizon (mean_request_rate) | peak_request_rate / peak_to_mean | request/second | ch04 |
cores in the fleet (cores) | hosts * cores_per_host | core | ch05 |
cores busy at the busy hour (busy_cores) | peak_request_rate * service_demand | core | ch05 |
utilisation (utilisation) | busy_cores / cores | ch05 | |
service time (service_seconds) | service_demand * one_request / one_core | second | ch05 |
requests in flight, if none waited (in_flight_unqueued) | peak_request_rate * service_seconds | request | ch05 |
effective utilisation (effective_utilisation) | min(utilisation, utilisation_cap) | ch06 | |
residence time (residence_time) | service_seconds / (1 - effective_utilisation) | second | ch06 |
time spent queueing (waiting_time) | residence_time - service_seconds | second | ch06 |
requests in the system (concurrency) | peak_request_rate * residence_time | request | ch06 |
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_host | ch07 | |
throughput of one host alone (single_host_throughput) | cores_per_host / service_demand | request/second/host | ch07 |
throughput if scaling were free (linear_throughput) | hosts * single_host_throughput | request/second | ch07 |
achievable throughput (achievable_throughput) | linear_throughput / (1 + contention * (host_count - 1) + crosstalk * host_count * (host_count - 1)) | request/second | ch07 |
scaling efficiency (scaling_efficiency) | achievable_throughput / linear_throughput | ch07 | |
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) | host | ch07 |
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_throughput | ch07 | |
how much the queueing view understated it (optimism) | utilisation_including_coordination / utilisation | ch07 | |
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_fraction | TB | ch08 |
memory the service can use, whole fleet (fleet_ram) | hosts * ram_for_service | TB | ch08 |
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_compression | ch09 | |
raw disk needed at horizon (raw_data) | stored_data * raw_per_stored | TB | ch09 |
hosts for storage (hosts_for_storage) | ceil(raw_data / (disk_per_host * (1 - disk_margin))) | host | ch09 |
installed disk (installed_disk) | hosts * disk_per_host | TB | ch09 |
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))) | host | ch10 |
hosts for memory (hosts_for_memory) | ceil(working_set / (ram_for_service * (1 - cache_margin))) | host | ch10 |
hosts the model recommends (hosts_recommended) | max(hosts_for_requests, hosts_for_memory, hosts_for_storage) | host | ch10 |
hosts after one is lost (hosts_after_failure) | hosts - one_host | host | ch11 |
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_price | USD | ch18 |
network capex (network_capex) | hosts * network_price_per_host | USD | ch18 |
capex (capex) | host_capex + network_capex | USD | ch18 |
facility power (facility_power) | hosts * host_power * pue | kW | ch18 |
annual energy (annual_energy) | facility_power * hours_per_year | kWh / year | ch18 |
annual energy cost (annual_energy_cost) | annual_energy * electricity_price | USD / year | ch18 |
annual licences (annual_licences) | cores * licence_per_core + hosts * licence_per_host | USD / year | ch18 |
annual support (annual_support) | capex * support_rate | USD / year | ch18 |
annual staff cost (annual_staff_cost) | staff_fte * fully_loaded_salary | USD / year | ch18 |
annual opex (annual_opex) | annual_energy_cost + annual_licences + annual_support + annual_staff_cost | USD / year | ch18 |
lifecycle opex (lifecycle_opex) | annual_opex * horizon | USD | ch18 |
total cost of ownership (tco) | capex + lifecycle_opex + migration_cost | USD | ch18 |
mean request rate over the horizon (average_request_rate) | (peak_request_rate_t0 / peak_to_mean + mean_request_rate) / 2 | request/second | ch18 |
requests over horizon (requests_over_horizon) | average_request_rate * seconds_per_year * horizon | request | ch18 |
cost per million requests (cost_per_million_requests) | tco / requests_over_horizon | USD/megarequest | ch18 |
average stored (average_stored) | (stored_data_t0 + stored_data) / 2 | TB | ch18 |
cost per stored TB per month (cost_per_stored_tb_month) | tco / average_stored / horizon | USD / TB / month | ch18 |
Source — models/web_service/model.yaml and its build order
The outputs
| Output | Point estimate | 90% interval | Unit |
|---|---|---|---|
| hosts the model recommends | 54 | 20 to 230 | host |
| hosts in the fleet | 54 | fixed | host |
| total cost of ownership | $2,002,083 | $1,508,230 to $2,923,724 | USD |
| cost per million requests | $1.82 | $0.55 to $5.98 | USD/megarequest |
| cost per stored TB per month | $839.64 | $305.33 to $2,108 | USD / TB / month |
| capex | $421,214 | $272,130 to $658,773 | USD |
| annual opex | $316,174 | $227,660 to $484,257 | USD / year |
| annual energy | 206,269 | 159,636 to 269,269 | kWh / year |
| utilisation at the busy hour | 0.644 | 0.156 to 2.48 | |
| utilisation with one host down | 0.656 | 0.159 to 2.53 | |
| working set against memory | 0.746 | 0.194 to 2.67 | |
| disk fill at horizon | 0.670 | 0.213 to 2.12 | |
| fraction of the fleet doing nothing useful | 0.321 | 0.213 to 0.457 | |
| utilisation, counting coordination | 0.948 | 0.233 to 3.81 | |
| residence time | 0.0367 | 0.0128 to 0.857 | second |
| time spent queueing | 0.0236 | 0.0021 to 0.839 | second |
| requests in the system | 1,562 | 160 to 107,336 | request |
| requests in flight, if none waited | 556 | 135 to 2,147 | request |
| how much the queueing view understated it | 1.47 | 1.27 to 1.84 | |
| fraction of the peak already built | 0.328 | 0.186 to 0.584 |
Source — web_service-reference · the model to explore; each input with a range has a slider
Where each ceiling sits
| Ceiling | At the plan | Headroom | Allowed | Limit | Verdict | Over allowed | Over limit |
|---|---|---|---|---|---|---|---|
| working set against memory | 0.75 | 25% | 0.75 | 1.00 | ok | 49% | 35% |
| utilisation, counting coordination | 0.95 | 30% | 0.70 | 1.00 | into the margin | 65% | 48% |
| disk fill at horizon | 0.67 | 25% | 0.75 | 1.00 | ok | 44% | 29% |
| utilisation with one host down | 0.66 | 30% | 0.70 | 1.00 | ok | 47% | 30% |
| utilisation at the busy hour | 0.64 | 30% | 0.70 | 1.00 | ok | 46% | 30% |
| fraction of the fleet doing nothing useful | 0.32 | 50% | 0.50 | 1.00 | ok | 1% | 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
| Input | Kind | total cost of ownership at its p10 | at its p90 | Swing |
|---|---|---|---|---|
| engineers, full-time equivalent | input | $1,732,449 | $2,360,530 | $628,081 |
| licence per core | input | $1,829,283 | $2,347,683 | $518,400 |
| fully loaded salary | input | $1,805,056 | $2,258,646 | $453,590 |
| host price | input | $1,827,097 | $2,256,332 | $429,235 |
| support rate | input | $1,945,271 | $2,074,320 | $129,049 |
| electricity price | input | $1,951,956 | $2,080,874 | $128,918 |
| network price per host | input | $1,969,541 | $2,046,600 | $77,059 |
| host power | input | $1,979,689 | $2,028,960 | $49,271 |
| PUE | input | $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
| Input | Provenance | Source | |
|---|---|---|---|
| ○ | annual growth factorannual_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 margincache_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. |
| ○ | contentioncontention | 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 hostcores_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 |
| ○ | crosstalkcrosstalk | 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 margindisk_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 hostdisk_per_host | vendor claim | spec sheet: one local drive. Decimal TB, not TiB — appendix D, and it is a 10% difference |
| ○ | electricity priceelectricity_price | assumption | all-in delivered rate including transmission. Lognormal: it cannot go negative and its history is multiplicative |
| ○ | fully loaded salaryfully_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 |
| ○ | horizonhorizon | assumption | the refresh cycle this fleet is bought against |
| ◐ | host powerhost_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 pricehost_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 fleethosts | 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 hourhot_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 yearhours_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 overheadindex_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 corelicence_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 hostlicence_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 designmigration_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 hostnetwork_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 coreone_core | fact | definition |
| ● | one hostone_host | fact | definition |
| ● | one requestone_request | fact | definition |
| ● | one yearone_year | fact | definition |
| ○ | os reserveos_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 onepeak_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 ratiopeak_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 |
| ○ | PUEpue | 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 marginqueueing_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 hostram_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 factorreplication_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 yearseconds_per_year | fact | by definition, 365.25 x 86,400 |
| ○ | CPU time per requestservice_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 equivalentstaff_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 onestored_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 ratesupport_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 toutilisation_cap | assumption | where this model stops being about queues (ch06) |
| 37 inputs | 6 facts, 8 vendor claims, 23 assumptions |
Source — web_service-reference · the model to explore; each input with a range has a slider
| Constant | Value | Standard error | Unit | Measured against |
|---|---|---|---|---|
record compression ratiorecord_compression | 3.58 | ± 0.0009 | python 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
| Output | Reference scenario | Sized for the growth we might get, not the growth we expect |
|---|---|---|
| hosts the model recommends | 54 20 to 230 | 54 20 to 230 |
| hosts in the fleet | 54 | 131 |
| 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 energy | 206,269 159,636 to 269,269 | 500,394 387,264 to 653,228 |
| utilisation at the busy hour | 0.644 0.156 to 2.48 | 0.265 0.0643 to 1.02 |
| utilisation with one host down | 0.656 0.159 to 2.53 | 0.267 0.0648 to 1.03 |
| working set against memory | 0.746 0.194 to 2.67 | 0.307 0.0798 to 1.10 |
| disk fill at horizon | 0.670 0.213 to 2.12 | 0.276 0.0879 to 0.874 |
| fraction of the fleet doing nothing useful | 0.321 0.213 to 0.457 | 0.604 0.464 to 0.753 |
| utilisation, counting coordination | 0.948 0.233 to 3.81 | 0.671 0.163 to 2.90 |
| utilisation | 0.644 0.156 to 2.48 | 0.265 0.0643 to 1.02 |
| residence time | 0.0367 0.0128 to 0.857 | 0.0178 0.0110 to 0.619 |
| time spent queueing | 0.0236 0.0021 to 0.839 | 0.0047 0.0008 to 0.606 |
| requests in the system | 1,562 160 to 107,336 | 757 144 to 107,336 |
| requests in flight, if none waited | 556 135 to 2,147 | 556 135 to 2,147 |
| how much the queueing view understated it | 1.47 1.27 to 1.84 | 2.53 1.86 to 4.05 |
| fraction of the peak already built | 0.328 0.186 to 0.584 | 0.797 0.450 to 1.42 |
| working set against memory — over its limit | 35% | 6% |
| utilisation, counting coordination — over its limit | 48% | 34% |
| disk fill at horizon — over its limit | 29% | 3% |
| utilisation with one host down — over its limit | 30% | 5% |
| utilisation at the busy hour — over its limit | 30% | 5% |
| fraction of the fleet doing nothing useful — over its limit | 0% | 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, assertedEvery 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.