It happens in many homes: the connection is fast, the speed test shows great numbers, yet as soon as someone starts a cloud backup or uploads a video, someone else's video call freezes and online gaming becomes unplayable. The problem is almost never bandwidth. It is latency under load, and it has a precise name: bufferbloat.
What bufferbloat is
Every network device has queues, memory areas where packets wait their turn when they arrive faster than they can leave. Queues are necessary, but if they are too large and poorly managed they fill up and stay full. A video call packet ends up at the back of a very long line of backup packets and waits tens or hundreds of milliseconds before it leaves.
The critical point is almost always the slowest link on the path, which is the line to the provider. On upload, especially on asymmetric connections, the queue builds up in the home modem or router. On download it often builds up in the provider's equipment, where we have no direct control.
How to recognise and measure it
The typical symptom is a ping that stays low on an idle line and jumps sharply as soon as the line is saturated. Two terminal windows are enough to measure it:
ping 1.1.1.1
Leave the ping running, then start a heavy download or a speed test. If the times go from, say, 15 to 300 milliseconds, bufferbloat is obvious. There are also dedicated online tests that measure latency during download and upload and give an overall grade: they are handy for comparing the situation before and after your changes.
| Latency increase under load | Practical effect |
|---|---|
| A few milliseconds | No noticeable problem |
| A few tens of milliseconds | Acceptable for almost everything |
| Over a hundred milliseconds | Choppy video calls, difficult online gaming |
| Several hundred milliseconds | Slow browsing even on lightweight sites |
The solution: SQM
SQM (Smart Queue Management) is a set of techniques that do two things. First, it deliberately limits the router's outgoing speed slightly below the real capacity of the line, so the queue forms in the router, where we can manage it, rather than in the modem or at the provider. Second, it manages that queue with smart algorithms that give room to every flow and keep it short.
The two most common algorithms are:
- fq_codel: splits traffic into many small queues, one per flow, and drops or marks packets that wait too long;
- CAKE: a more complete evolution that combines bandwidth shaping, fairness between devices, line overhead handling and simpler configuration.
A phone call and a backup no longer compete for the same line: the call goes through immediately, the backup uses the remaining bandwidth.
How to configure it
SQM is available on routers running firmware such as OpenWrt, on several firewall distributions and on some commercial routers, sometimes under names like "adaptive QoS" or "Smart Queue". The procedure is similar everywhere:
- Measure the real speed of the line over a cable, at a quiet time, several times.
- Set the limits for download and upload at about 85-95% of the measured values. Start conservatively and raise them step by step.
- Choose the algorithm: CAKE where available, otherwise fq_codel.
- Specify the line type if the panel asks for it, so the algorithm calculates the per-packet overhead correctly.
- Repeat the latency-under-load test and adjust the values until the increase stays small.
The price is a small loss of peak bandwidth, which shows up in speed tests as a few percentage points less. In return the network stays responsive even when it is full, which matters much more in real life.
Limits to be aware of
Software shaping needs processing power. On very fast lines, in the range of several hundred megabits or a gigabit, a cheap router may not keep up and become the bottleneck itself: in that case the router's CPU maxes out and the speed collapses. Lines with variable speed, such as fixed wireless or mobile ones, are harder to handle with fixed limits, because the right value changes during the day.
In my work I have often seen families switch providers or buy expensive routers for a problem that proper queue management would have solved. Before spending money, measuring latency under load is the most useful step.
In short
- Bufferbloat is latency that explodes when the line is saturated, not a lack of bandwidth.
- You measure it by running a ping while a download or upload fills the line.
- SQM moves the queue into the router and manages it with fq_codel or CAKE.
- Limits should be set slightly below the real speed, then refined with tests.
- Very fast lines need a router with an adequate CPU.