Skip to content

The detection lab

A peer goes silent. The client finds out when the first live timer fires. This lab computes that timer from the rules of the kernel at version 6.6.

When does the client know?
Kernel clock HZ 250
First detector
keepalive
Closed form
11 s
Lands in
10.996 s to 11.352 s
Measured
11.054 s to 11.269 s

Keepalive tells the client after 11 s, at most 352 ms late.

  • Prediction
  • Keepalive probes
  • Measured runs

The whole timeline

The prediction: 10.996 s to 11.352 sclosed formKeepalive probe 1: 5 sKeepalive probe 2: 7 sKeepalive probe 3: 9 sRun 1, environment 1: 11.156 sRun 2, environment 1: 11.132 sRun 3, environment 1: 11.269 sRun 4, environment 1: 11.192 sRun 5, environment 1: 11.188 sRun 6, environment 1: 11.14 sRun 7, environment 2: 11.062 sRun 8, environment 2: 11.054 sRun 9, environment 2: 11.172 sRun 10, environment 2: 11.235 sRun 11, environment 2: 11.156 s0 s5 s10 s

Near the prediction

The prediction: 10.996 s to 11.352 sclosed formRun 1, environment 1: 11.156 sRun 2, environment 1: 11.132 sRun 3, environment 1: 11.269 sRun 4, environment 1: 11.192 sRun 5, environment 1: 11.188 sRun 6, environment 1: 11.14 sRun 7, environment 2: 11.062 sRun 8, environment 2: 11.054 sRun 9, environment 2: 11.172 sRun 10, environment 2: 11.235 sRun 11, environment 2: 11.156 s11 s11.1 s11.2 s11.3 s11.4 s
  • Keepalive counts from the last segment that the client received. It waits for the idle time, and then for one interval for each probe without an answer.
  • The retransmission give-up counts from the first retransmission of the RTO timer. It is not the tail loss probe one RTO before it. The give-up comes at the first firing at or after the budget of tcp_retries2.
  • A frozen process keeps the acknowledgments of its kernel. Each acknowledgment starts keepalive again, so no TCP timer fires.

The kernel files each timer on a level of its timer wheel. The wheel rounds the timer up to the granularity of that level. At HZ 250, a 2 s timer fires up to 32 ms late, and a 2 h timer fires up to 131 s late.

The real RTO is the round trip plus 200 ms, in whole jiffies. At HZ 250 on a fast network, the RTO is 204 ms, not 200 ms. The band of the lab includes the step past the budget and the rounding of each firing.

The forms are a copy of the algebra in jarvis. Tests hold the copy to the figures of the algebra: 7875 s for keepalive, 924.6 s for the give-up, and 149.504 s for the lateness of keepalive.