SQM and CAKE on OpenWrt: low latency when the line is full
In one sentence
Section titled “In one sentence”SQM (Smart Queue Management) shapes traffic slightly below your line rate, so the queue forms in the router, where it can be managed, instead of in the modem. Used with the CAKE queueing discipline, it keeps latency low while the line is busy. That problem is known as bufferbloat.
What the OpenWrt guide recommends
Section titled “What the OpenWrt guide recommends”- Install
luci-app-sqm, orsqm-scriptsif you don’t use LuCI. - Measure your real download and upload speed, then set both to 90% of what you measured.
- Choose
cakewithpiece_of_cake.qos. - Test again under load and adjust.
fq_codelwithsimple.qosis the lighter, less complete alternative.
CAKE has been in the Linux kernel since 4.19.
See it on your router
Section titled “See it on your router”After installing SQM:
cat /etc/config/sqmWatch out
Section titled “Watch out”- Shaping uses CPU. On a fast line a small router may not keep up, so compare speed and latency before and after.
- Set the rates from a measurement, not from your plan’s advertised speed.
Related guides
Section titled “Related guides”Sources
Router.Homes
Independent OpenWrt notes. Every page states the firmware, device, package manager and way back.
Icons: Solar by 480 Design, CC BY 4.0