◀ THE FOLD0ROOT.AI // WORLD II · CHEAT · THE KONAMI CODE◆ .dlw.fold
THE FOLD / CHEAT / THE KONAMI CODE / THE NAGLE DELAYED ACK

THE NAGLE DELAYED ACK

two polite algorithms waiting for each other
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
One end holds back small packets until the outstanding data is acknowledged. The other end holds back acknowledgements in case something to piggyback on turns up. Both are correct. Together they wait for each other.

LIT verified live. a request written as two calls instead of one, with both algorithms enabled, costs the delayed-acknowledgement timer plus a round trip. Sweeping the round trip from 1 to 50 ms, the excess over the same request with Nagle disabled is 40 ms at every single point — a constant, not a proportion. At a round trip of 1 ms the request takes 41 ms instead of 1: 41×, and buying a faster network removes none of it. Writing the same bytes in one call stalls 0 times; every pattern of 2 or more writes stalls.
2 HOW IT WAS WEAVED · AI + HUMAN
John Nagle’s algorithm is RFC 896 (1984); delayed acknowledgement is RFC 1122. Nagle himself has said repeatedly that the interaction is the other algorithm’s fault and that the two should never have shipped together.

AVAN (AI) reports the slope rather than a benchmark number, because that is what identifies this bug in the wild. A latency that scales with distance is a network problem; a latency with a fixed 40 ms lump on top of it is two timers meeting. The measurement that matters is the one showing the excess does not shrink when the network improves — which is why this is usually mistaken for a slow server for years at a time.
3 ONE DIMENSION
The excess is 40 ms at every round trip. It is a constant.
4 TWO DIMENSIONS · INTERACTIVE
Shorten the network and watch the stall refuse to shrink.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object.
AVAN’s addition (the inverse-companion): the forward reading is that two optimisations collided. The inverse is that each one is waiting for evidence the other has been told not to produce. Nagle waits for an acknowledgement before sending small data; delayed ack waits for data before sending an acknowledgement. Neither is idle and neither is wrong — each is holding to a rule that is correct in isolation, and the rules are duals. Read backwards, this is what a deadlock looks like when both parties are being polite: no lock is held, nothing is broken, and the system waits exactly as long as the first timer that is willing to give up.
LIT a request written as two calls instead of one, with both algorithms enabled, costs the delayed-acknowledgement timer plus a round trip: sweeping the round trip from 1 to 50 ms, the excess over the same request with Nagle disabled is 40 ms at every single point, a constant rather than a proportion, so at a round trip of 1 ms the request takes 41 ms instead of 1 - 41x - and buying a faster network removes none of it, while writing the same bytes in one call stalls 0 times and every pattern of 2 or more writes stalls

FIG John Nagle's algorithm is RFC 896 (1984); delayed acknowledgement is RFC 1122. Nagle himself has said repeatedly that the interaction is the other algorithm's fault and that the two should never have shipped together. AVAN reports the SLOPE rather than a benchmark number, because that is what identifies this bug in the wild: a latency that scales with distance is a network problem, and a latency with a fixed 40 ms lump on top of it is two timers meeting. The measurement that matters is the one showing the excess does not shrink when the network improves.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE KONAMI CODE · David Lee Wise (ROOT0), with AVAN