Fix bufferbloat on OpenWrt routers
Yes. OpenWrt has real Smart Queue with CAKE, the best fix for bufferbloat on a home router.
The sqm-scripts package shapes your line to just under its real speed and uses CAKE (or fq_codel) so small game and call packets don't wait behind downloads.
1. Test before you change anything
Run the Lag Check and note the "Lag under load" grade and your download and upload speeds. You'll compare against it afterwards.
2. Where the setting is
In the web interface (LuCI)
- Go to System → Software, update the lists and install luci-app-sqm.
- Reload the page and open Network → SQM QoS.
- On Basic Settings, tick Enable this SQM instance, pick your WAN interface (often wan or the modem's port) and enter your download and upload speeds in kbit/s.
- On Queue Discipline, choose cake with piece_of_cake.qos.
- On Link Layer Adaptation, pick your line type (for DSL, choose ATM or Ethernet with the overhead your line uses; for cable or fibre leave it as the default or set Ethernet with overhead 44 if you know it).
- Save & Apply, then test again.
Or from the command line
- Log in over SSH and install the package. Then set the speeds in LuCI as above.
Install Smart Queue on OpenWrt
opkg update && opkg install luci-app-sqm
Newer OpenWrt releases that use apk instead of opkg: apk update && apk add luci-app-sqm.
3. The numbers to enter
OpenWrt asks for kbit/s, so 100 Mbps is 100000. Start at about 90% of your measured speed; the Smart Queue assistant works out the exact figures from your Lag Check. Our helper can also try 90%, 85% and 80% for you and keep the first one that works.
Work out my limitsThe assistant starts at 90% of your measured speed and tells you when to drop to 85% or 80%.
Gotchas
- Hardware NAT or flow offloading sends traffic around the router's CPU, and with it around Smart Queue. If your grade doesn't improve, look for an acceleration or offloading setting and turn it off. On OpenWrt it's under Network → Firewall → Routing/NAT Offloading; hardware flow offloading bypasses SQM on many routers, so leave it off.
- Smart Queue runs on the router's CPU. Cheap routers often top out somewhere around 300 to 500 Mbps with it on; above that the shaped speed drops well below your limit. On fast plans that can be worth it for lag, or a sign you need stronger hardware.
- Pick the interface that faces the internet. Shaping a LAN port or a bridge shapes the wrong direction.
Test after the change. A good setup brings lag under load down to A or B.
Test before and after