The Ceiling You Cannot Buy
Last timeWhat a Transaction Promises
Whatever share of the work cannot be done at the same time sets a hard limit on how much faster the whole job can get, no matter how many workers you add.
The request arrives every few months in the same form. The service is too slow,
so please double the number of workers. Sometimes it helps. Often it does
nothing, and occasionally it makes things worse, and which of those happens is
predictable from a single number you can measure in an afternoon.
The share that cannot overlap
Take any job and split it in two. A share of it can be done by many workers
at the same time. The rest cannot, because one step must finish before the next
can begin.
The second part is everywhere once you look for it. A guarded region, from the
earlier lessons, is serial by definition. So is a commit to a single log, an
insert into one index, a final merge of per-worker results, and a check against a
single counter. None of those goes faster when you add a worker.
- the share of the original work that can be done by many workers at once, so the serial share is 1 minus p and takes the same time whatever happens
- the number of workers, which only ever divides the p part and never touches the rest
- how many times faster the whole job runs than it did with one worker
The arithmetic is worth doing once by hand, because the result is unintuitive.
With at ninety-five per cent, cannot pass twenty however large gets.
At ninety per cent it cannot pass ten, and at eighty per cent it cannot pass
five. A job that spends half its time in a guarded region cannot be made more
than twice as fast by any number of machines at all, and most people's guess for
that case is much higher.
The lesson stops here
3 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents