Ramblings of an aging IT geek
← Ramblings of an aging IT geek
networking

making the wifi behave when everyone is streaming at once

A practical write-up of adding QoS to a home router so video calls stop stuttering when someone else is mid-download, using fq_codel and a sensible bandwidth ceiling rather than per-app rules.

A bundle of network cables behind a home rack

The complaint was specific and unanswerable in equal measure: "the call keeps freezing". It froze on my partner's work calls, it froze on the kids' lessons, and it always froze at the exact moment someone else in the house started a large download or a console update kicked off. I could feel the cause in my bones, but feeling it is not fixing it.

The problem is bufferbloat, and once you have named it you can stop blaming the wifi. When a fat download saturates the uplink, packets queue up in a buffer somewhere (the router, the modem, the ISP's kit), and that queue adds latency to everything else. Your video call's tiny, time-sensitive packets sit behind a megabyte of someone's Steam update. The link is not full of your call; it is full of someone else's bulk transfer, and your call is waiting in the same line.

The fix is not to police individual apps. I have tried that on past routers and it is a losing game: you spend an evening writing rules for ports and DSCP marks, and then some app changes port or wraps itself in QUIC and your careful rules match nothing. What actually works is shaping the queue itself so that latency stays low under load, regardless of what the traffic is.

A wiring close-up of the router and modem the shaping runs on

I am running OpenWrt on the router, so the tool is sqm-scripts with the cake qdisc, or fq_codel if you prefer. The single most important number is the bandwidth ceiling. You set the shaper below your real line rate, on purpose, so the queue forms in your router where you control it, not in the ISP's modem where you do not. My line is nominally 80/20, so I set the shaper to about 72/18 and measured from there.

config queue 'eth1'
    option enabled '1'
    option interface 'eth0'
    option download '72000'
    option upload '18000'
    option qdisc 'cake'
    option script 'piece_of_cake.qos'

The way to know it works is not the throughput, it is the latency under load. Before, a saturating upload pushed ping to my gateway from 12ms to over 300ms. After, the same upload holds ping under 30ms. That is the whole game. The download still goes at full pelt; it just no longer drowns the call.

The honest caveat: you do give up a little raw throughput, because you are deliberately running below the line rate. I lose maybe ten per cent of peak speed I will basically never notice, and in exchange the calls stopped freezing and nobody has come to find me about the wifi in weeks. That is the best outcome a home network can offer: silence.