Round-trip time and the packet interval
Non-system quantities · expressed in SI seconds · RTT and the Δt between packets
In 1983 Mike Muuss, sorting out a fault in a network, wrote in a single evening a small program that sent a host a short request and printed the time elapsed until the reply. He took the name from sonar operators: a submarine sends a click and listens for the echo, and the distance is computed from one difference of times. The unit was born of that habit of measurement: what is recorded is not the path there and not the path back, but the whole loop.
The subtlety here is that the round trip is measured by a single clock: the request leaves and the reply arrives at the same machine, and so the difference of readings does not depend on whether the clocks at the other end agree. A one-way delay is not so easily had — for it you need clocks synchronised more finely than the delay itself, and that means either a separate protocol of time transfer or a receiver of satellite time at each end.
01 · Definition
Round-trip time is the interval between sending a packet and receiving the reply to it, measured by one and the same clock. The packet interval is the time between the release of two neighbouring packets of one stream; it is set not by the network but by whoever loads it.
The round trip is made of three terms of different nature, and telling them apart matters because each is cured differently. The first is the propagation time, fixed by the length of the route and the speed of light in fibre, and it yields to nothing but a shorter cable. The second is serialisation, the time to push the packet out into the line, and it falls as the link gets faster. The third is the queue in the buffers of intermediate nodes, and it is the only one that depends on how busy the network is at this moment.
From this follows one unobvious circumstance: a channel can be widened tenfold and the round trip will not change at all, since widening removes only the serialisation, while the queues and the length of the path stay where they were. Worse, in buffers built with room to spare the packets do not get lost but wait, and the round trip under load grows to seconds — that is the trouble which came to be called bufferbloat.
The packet interval stands beside it for a reason: nearly everything that happens to a stream is decided by the ratio of the interval to the round trip. While packets go out more often than acknowledgements come back, the sender works blind and must hold in the path as much data as physically fits into it — and that amount is exactly the product of the rate by the round trip.
Choose a route and run the slider over the packet size. The blue packet leaves the left rack for the right one and comes back orange; the band under the route breaks the round trip into three terms, so that it is plain what it is really spent on. Widening the channel shortens only the middle part — the one that is smallest to begin with on long routes.
Memory got cheap earlier than the algorithms changed, and makers began putting queues of hundreds of packets into devices, supposing that a spare buffer could do no harm. It came out the other way round: a full queue does not drop packets but delays them, the sender receives no signal of congestion at all, and keeps adding to the load. The round trip on a home link under load grew to a second and a half, while the rate stayed the same.
02 · Conversion
Round trip, pipe and packet stream
Enter a round trip in any units, and the sheet will convert it into the rest, then compute what depends on it: how much data fits into the path at different link rates, what limit the window sets, and what interval between packets different codecs choose.
The link rate for the capacity is taken from the route chosen in the interactive part; in the finer settings it can be fixed at a gigabit.
Ping measures not quite what an application needs. The handling of an echo request at a distant node goes by a special path, often bypassing the main processor, and so its delay does not match the delay of a real connection; other devices answer such requests last of all, or not at all. That is why a large ping does not always mean a slow connection, and a small one does not guarantee a fast one.
| Value | Note | ||
|---|---|---|---|
| {u} | {name} | {value} | {note} |
03 · Orders of magnitude
logarithmic scale: from microseconds to seconds04 · Measuring instruments
What catches the round-trip time
The program sends a packet with a timestamp and waits for its return, and the difference of readings is the round trip. Its merit is that one clock suffices and no help is needed from the far end beyond a willingness to answer; its fault is that the answer comes by a special, not necessarily quick path.
Having recorded the whole exchange, one gets the round trip from the stream itself: from the time between a segment leaving and its acknowledgement arriving. What is measured this way is exactly the delay the application sees, and the spread becomes visible too — the thing that hampers a conversation more than an even delay.
Instruments that stamp the time right in the network chip remove the uncertainty the operating system brings in and take the resolution down to tens of nanoseconds. They exchange by a special agreement in which each end sets two stamps — and that is what allows the round trip to be split into its two unequal halves.
A one-way delay is measured only where the clocks at both ends are brought to a common time more finely than the delay itself — for this the lines are marked out by a separate protocol of synchronisation, or receivers of satellite time are installed. Without that the round trip stays the only honest figure.
05 · Writing rules
The round trip with its unit, the spread apart
The designation is written in three capital Latin letters without full stops, the value with its unit and a note on what exactly was measured: a single probe, the mean of a series, or its median. The spread is given alongside as a separate number, since one mean says nothing about whether the packets run evenly.
The first writing does without a unit, and with it without meaning: a hundred and thirty of what — milliseconds or microseconds? The second passes an assumption off as a measurement, whereas the route there and back often goes by different paths and the halves come out unequal. The third repeats the commonest error, taking the round trip to be a property of the link rather than of the whole route. The fourth mixes up the quantities: an interval between packets is not a round trip.
06 · Neighbouring units
The round trip describes the route from the side of time, the link rate from the side of quantity, and their product gives a third quantity, the capacity of the path, without which no fast long-distance connection can be set up. Beside it stands the spread of the delay, which in conversation and in games hampers more than an even lag does.
how much fits into a second
rate × round trip
jitter by RFC 3550
Of the Simetrium data sheets nearby stand the bit and byte, in which the capacity of the path is reckoned, second, to which both quantities are in the end reduced, decibel from link budgets and the clock cycle, which sets the limit of resolution for hardware timestamps.
07 · Historical section
The click and the echo
When the first word was being sent between the University of California and the institute at Menlo Park, the operator dictated it over the telephone and waited for confirmation letter by letter. The link failed on the third letter, yet the procedure itself — sent, waited for the answer, looked at the clock — turned out to be the very one still in use today.
Mike Muuss wrote his program in one evening while sorting out a fault, and named it after the sound of an underwater echo sounder: a short pulse, then a wait for the reflection. The name proved so apt that the verb «to ping» entered the language far beyond networking and now means any short message sent to check whether anyone is there.
In the autumn of 1986 the throughput of one of the university links fell a thousandfold: senders, receiving no acknowledgements, sent ever more copies and finished the route off completely. Van Jacobson proposed a cure that works to this day: watch the round trip and its spread, and treat their growth as a sign of congestion, holding back the sending before the losses begin.
Modern flow-control algorithms no longer watch the losses but watch directly how the round trip grows, and hold back the sending before the queue has time to fill. Home routers have acquired disciplines that deliberately keep the buffer short — and the round trip under load falls from a second and a half to tens of milliseconds on the very same link.
Half the round trip is an assumption, not a measurement
The round trip is convenient in that it demands no agreement of clocks: both the sending and the receiving are stamped by one instrument, and so a divergence of scales simply does not enter the difference. That is why ping works everywhere and needs no setting up, whereas the one-way delay is a far more capricious quantity, demanding synchronisation finer than what is being measured.
The habit of halving the round trip holds on for that reason, though there is little ground for it: the stream to the far end and back often goes by different routes, of different lengths and with different loads, so that the true halves can differ twofold. The quantity most easily measured of all in networking is thus also the one most often misread.
Catalogue · units of measurement
A data sheet for every quantity
Seven SI base units, twenty-two derived ones with names of their own, and the non-SI quantities that neither science nor daily life does without. Each gets its own sheet: definition, conversion, instruments, writing rules, history. In 36 languages.