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

QoS for a Household That Streams Absolutely Everything

Setting up smart queue management on the home router so a single large upload stops ruining everyone else's video call.

A bundle of network cables behind a rack

The complaint was always the same and always landed during something important. Someone's video call would turn into a slideshow, the telly would spin its buffering wheel, and the cause was invariably me pushing a backup to off-site storage or pulling down a few hundred gigabytes of container images. One fat upload and the whole house felt the bandwidth equivalent of a traffic jam, even though the link had plenty of capacity on paper.

The thing nobody tells you early enough is that home internet pain is almost never about bandwidth. It's about latency under load, bufferbloat, the way an oversized buffer somewhere upstream fills with your bulk traffic and holds everything else hostage. You can have a 500 megabit connection and still get a stuttering call, because the call's tiny, frequent packets are stuck behind a queue full of your backup.

CAKE does the heavy lifting

I run OpenWrt on the router, so the fix was the sqm-scripts package and the CAKE queue discipline. CAKE is the modern answer to bufferbloat, and it's genuinely clever: it manages the queue so that latency-sensitive flows don't get buried under bulk ones, and it does fair queueing between devices so no single host can monopolise the link.

The catch is that for it to control the queue, the queue has to live on your router, not on the ISP's kit. That means deliberately setting your shaped rate slightly below your real line speed, so the bottleneck is somewhere you actually own.

config queue 'eth1'
    option interface 'eth1'
    option qdisc 'cake'
    option download '480000'
    option upload '18000'
    option qdisc_advanced '1'
    option squash_dscp '1'
    option ingress_ecn 'ECN'
    option egress_ecn 'ECN'

Those numbers are in kilobits, set to roughly 95% of measured throughput. The upload figure matters most: it's the small upstream pipe that everything fights over, and it's where my backups were doing the damage.

A rack of network equipment with status lights

Measuring rather than hoping

The right way to tune this is not to guess but to test latency while saturating the link. There are speed tests now that report exactly this, the increase in ping while the line is busy, sometimes graded with a letter. Before CAKE, my latency under load jumped from about 12ms idle to well over 300ms during an upload. After, with the shaper holding the queue, it sat around 20ms no matter how hard I hammered the upstream.

That's the whole win, summarised in one number. The household doesn't care about queue disciplines or DSCP marking. They care that the call no longer dies when I do a backup, and that the telly stops buffering. CAKE delivered that without me having to manually classify a single application, which is the part I'd dreaded.

I left per-application QoS well alone. Trying to hand-prioritise traffic by port in a house full of encrypted streams is a fool's errand. Fair queueing plus a correctly placed bottleneck gets you most of the benefit with almost none of the fiddling, and it keeps working when the kids install something I've never heard of.