Ten months of fighting bufferbloat on cable, and why I stopped writing my own controller

activenote

I spent most of a year building wanctl, an adaptive CAKE controller: it watched latency to a few outside hosts twenty times a second and moved CAKE’s bandwidth limit to keep queues short. It worked. Then I tried cake-autorate, an existing open-source controller, and I never got my own controller to beat it. This is what I learned on the way, the part that should help anyone running CAKE on cable. The short version, without the story, is in the notes on CAKE over cable.

How it went

  1. Cable is jittery when idle. The upstream is scheduled by the cable company’s head-end, so RTT wobbles by several milliseconds with nothing happening. A controller that reacts to every wobble cuts your rate on noise. Require a delay to persist before reacting.
  2. Give the upload real headroom. If you shape upload close to your plan speed, the modem and the head-end queue the excess, and that queue is outside your control. Mine settled near 80% of plan.
  3. Some evenings are not your problem. On a busy cable node, evening latency can sit in the ISP’s network. I tried a lower evening download cap for a few days; as far as I could tell it barely changed latency and cost about a quarter of my evening throughput, though it was not a controlled test. Look at where the delay is (CAKE’s own queue delay versus the RTT rise to an outside host) before spending bandwidth on it.
  4. CAKE’s rtt matters, and it interacts. About twice the baseline RTT worked best here. Changing it flipped which delay threshold was best, so re-test thresholds after changing it.
  5. Re-test the winners together. Settings that won one at a time stopped winning in combination.
  6. On an inline bridge, check the boring things first. With GRO, GSO, TSO and hw-tc-offload on, CAKE saw giant packets and upload suffered a severe ping-loss mode; turning them off eliminated it. Confirm which port shapes which direction from packet counters, not interface names. Test each extra CAKE keyword alone.
  7. Your latency probes are traffic. My upload collapsed during tests while the controller probed outside hosts. Turning off one probe stream helped but did not fix it, and I never proved the cause. Fewer, slower probes are one experiment worth running.
  8. Measure like it matters. Back-to-back A/B runs, repeated, at recorded times of day, against a test server you control. Public speed-test servers fail in ways that look exactly like shaping problems.

Why I stopped

I never beat cake-autorate. What I did build, over ten months, was a lot of controller, tests and process for one house. The useful parts were the measurements and the observability, so those are what I kept. If you are thinking about writing your own controller: run cake-autorate first, measure it properly, and only then decide whether you have a problem it does not solve.

What the numbers are

All numbers are from one household: a residential DOCSIS link (about 40 Mbit/s upload) and a VDSL2 link, shaped on a Linux inline bridge. The test results were measured mostly with flent RRUL (some tcp_12down) from a LAN host to a self-hosted server about 22-25 ms away; the last bullet is passive monitoring, not a load test.

These are not recommendations for your link. The full April tuning history is in the archived repository’s docs/CABLE_TUNING.md.