Measuring Tail Latency with fq_codel and TCP BBR on Small Linux VMs
On virtualized guests with modest vCPU budgets, default CUBIC congestion control paired with deep transmit queues often produces noticeable p99 latency spikes whenever bulk downloads share a link with interactive RPCs.
Baseline Verification
Before altering kernel parameters, inspect the active queueing discipline and congestion control algorithm:
sysctl net.core.default_qdisc net.ipv4.tcp_congestion_control
tc -s qdisc show dev eth0
Switching to fq + BBR
Pairing BBR with the fq packet scheduler enables kernel-level pacing, preventing micro-bursts from saturating upstream virtual switch buffers:
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
In repeated iperf3 + concurrent ICMP probe runs across a 140 ms RTT path, p99 RTT under load dropped from 218 ms to 154 ms while sustaining steady throughput.