Notes

Short, mostly practical, written down before I forget.

UDP receive buffers are the whole story

If a QUIC tunnel shows low throughput while top reports an idle CPU, the bottleneck is usually the socket buffer, not the link. The default is 208 KB on most kernels, which is roughly nothing for a 100 Mbit/s stream.

sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216

Persist it in /etc/sysctl.d/ and remember that the application has to ask for the larger size too — raising the limit alone changes nothing.


DNS TTL is not a suggestion

Moved an A record, flushed the local cache, and still landed on the old address. Recursive resolvers had cached the previous answer and were not going to give it up before its TTL expired. The lesson: change DNS first, wait, and only then migrate traffic.

If you can, lower the TTL a day before the move. If you cannot, use the IP directly in client configuration and fix it later.


BBR in one line

net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

BBR without a pacing-friendly qdisc is half a change. fq does the pacing; the congestion control does the rest. On a one-core VPS the difference is visible on lossy long-haul paths and invisible on local ones.


MTU is where tunnels go to die

Every encapsulation eats bytes. If large responses hang while small ones work, suspect MTU before anything else. ping -M do -s 1472 is still the fastest way to find the real limit.


Log rotation, or your disk will fill

Docker's default json-file driver grows forever. Two options in daemon.json or per-container logging options, both cheap:

"log-opts": { "max-size": "10m", "max-file": "2" }

Not glamorous, but the alternative is a server that stops writing anything at 3 a.m.