I haven’t had Smart Queue Management (SQM) enabled on my Openwrt router in a very long time. I am not even sure if what I was using in the olden times was called the smart queue management, and it has been so long that I don’t even remember exactly what I used to have enabled on all my old asymmetric cable and DSL connections. All I remember for certain was that I used to use some sort of quality of service (QoS) package for OpenWRT that would let me set numbers for my upload and download speeds that were a little lower than my actual speeds, and this would keep my link from getting saturated and driving up latency.
It was more than a decade ago when I upgraded to my first symmetric fiber Internet connection at home, and that massive boost in upload speed on my 35/35 megabit connection made enabling QoS almost entirely useless. We have had several upgrades over the years, and today we have a symmetric gigabit Ethernet connection at home. We could go higher, but then we would need to pay more AND upgrade the router!
I have once again enabled OpenWRT’s SQM. One of my friends in our Discord community was bragging about his A+
score on the bufferbloat test score after configuring fq_codel
on his OPNsense router, and that made me curious whether or not I should be doing the same.
- My New Travel Router: The GL.iNet Mango N300
- The OpenWRT Routers from GL.iNet Are Even Cooler Than I Thought!
Do you need queue management with a fast symmetric Internet connection?
Queue management has a dramatic impact when your Internet connection’s download speed is 10 or 20 times faster than your upload speed. There are several reasons for this, but you can see the most obvious culprit if you watch your network traffic while running an Internet speed test. You will probably see around 2% as much traffic on your uplink while your download test is running.
The additional latency when filling up your cable modem’s download capacity isn’t a bufferbloat problem. This is just a consequence of not having enough upload bandwidth available. If you have a cable modem, you should probably be running some sort of queue management.
You can see my meter showing 16.7 megabits of upload bandwidth being used while the speed test is pulling 831 megabits on the downlink
In my case that is around 17 megabits of uplink while seeing 800 megabits down on the speed test. This is nearly enough upload traffic to fill up Comcast’s gigabit cable service, and I’m not even sending any actual useful data up.
I don’t have to worry about this, because I still have more than 800 megabits of unused uplink bandwidth.
This is probably the tl;dr for this blog post. I have never noticed additional latency from other people in the house streaming movies or downloading large files. It never shows up on my Smokeping graphs, and I never feel it when playing something latency sensitive like Team Fortress 2.
I doubt I will ever notice that I have enabled SQM on my OpenWRT router, but I am glad that I have it enabled now just in case!
Enabling SQM made a huge difference, so why won’t I notice it?
The ping times only go up when I max out my available upload or download bandwidth. We could stream 10-bit 4K HDR content to every screen in the house and only use a fraction of our available bandwidth. Most sites on the Internet don’t manage to saturate my connection, though I can max out my uplink when publishing a YouTube video, and Steam can just about fill the whole downlink when updating a game.
I disabled SQM after I had everything dialed in just to run another test and take this screenshot. I don’t remember the original test result being nearly this bad!
Either of these things usually only take a few minutes. Those few minutes would have to coincide with me playing a latency-sensitive multiplayer game or participating in a video call. The odds of that happening are slim.
What OpenWRT settings did I change?
I think it was worth trading a couple of dozen megabits of bandwidth for much improved worst-case latency, but it was a bit of work to get things dialed in right, and my exact settings won’t work for you. I do think it is worth telling you what worked well for my setup.
You should follow the advice on traffic shaping from the OpenWRT wiki. That’s what I did!
I tried to use the cake
module, but my aging Linksys ACM3200 just doesn’t have enough single-core CPU performance. The cake
SQM immediately maxed out one of my cores during a speed test, and my download speed was limited to 560 megabits per second.
My router has plenty of horsepower for running fq_codel
and the simple.qos
script. From there, I just kept bumping up my download and uploads speeds on the basic settings
tab until bufferbloat test test results showed my latency increasing. When I they did, I backed off a bit.
I got curious while writing this blog post, and I asked Google if there were any options for getting cake
to use more than one CPU core. I didn’t expect to have much luck, but I figured there was a chance that there is something newer and better than cake
. I found nothing of the sort.
I did find something useful. There is a checkbox in the global network options to enable packet steering. Ticking that box allowed me to inch my upload and download speeds up by 20 or 30 megabit before my latency started to increase again. That was a nice little bump, but as it suggests in the OpenWRT interface, your mileage may vary here!
Conclusion
I feel that turning on SQM traffic shaping and giving up 5% of my maximum bandwidth to reduce my worst-case latency by dozens or even hundreds of milliseconds is a fantastic trade. That is such a small price to pay to never have to worry about a random download or update somewhere in the house goobering up my aim in Team Fortress 2!
I bet I spent an hour or two dialing in my downlink and uplink numbers to get as much bandwidth as I possibly could without significantly pushing up the latency when congested, but you don’t have to work that hard. Just enabling SQM and entering what you believe are your actual upload and download speeds will probably get you 90% of the way to perfect, and that is probably way better than you were doing before!
If you found this blog post insightful, I would love to hear your thoughts and experiences with Smart Queue Management (SQM) and OpenWRT! Have you noticed a difference in your network performance after enabling SQM? What settings worked best for you, and do you think queue management is necessary for high-speed symmetric connections?
Join our Discord community where we share tips, tricks, and experiences with our own homelab setups! Engaging in discussions with fellow enthusiasts could help you fine-tune your setup and understand your network better. Let’s optimize our networks together!