Bufferbloat is the lag you notice when someone uploads photos while you are on a video call: the modem's buffers fill up and every packet waits in line. SQM (Smart Queue Management) fixes it by shaping traffic on the router, just below your line speed, so the queue stays on the router where it can be managed fairly.
Before you start
- Measure your connection with a bufferbloat test (for example the Waveform bufferbloat test) and note download and upload speeds and the latency under load.
- SQM is CPU-intensive. Routers rated Good or Excellent for SQM on Voltarum OpenWRT buyers guide can shape typical home connections; slower CPUs may cap your speed.
1. Install SQM
In LuCI go to System → Software, update the lists and install luci-app-sqm. Or over SSH:
# OpenWrt 25.12 and later
apk update && apk add luci-app-sqm
# OpenWrt 24.10 and earlier
opkg update && opkg install luci-app-sqm
Reload LuCI; a new page appears under Network → SQM QoS.
2. Basic settings
On the Basic Settings tab:
- Tick Enable this SQM instance.
- Choose the interface of your internet connection. This is the WAN device (for example
wan,eth1, orpppoe-wanfor PPPoE). - Set Download and Upload speeds in kbit/s to about 90% of your measured speeds.
3. Queue discipline
On the Queue Discipline tab choose cake with the piece_of_cake.qos script. It works well for most connections.
4. Link layer adaptation
On the Link Layer Adaptation tab, tell SQM about your connection's per-packet overhead. Choose Ethernet with overhead and set the overhead for your link type (DSL, cable and fibre differ). If you are unsure, a value of 44 is a safe overestimate; the OpenWrt SQM documentation explains the exact values.
Save and apply, then run the bufferbloat test again. Latency under load should now be close to idle latency.
Tuning
- Still seeing lag? Lower the speeds a little more.
- Losing more speed than expected? Your CPU may be the limit; check CPU usage with
topduring a test. - If SQM seems to have no effect, disable software and hardware flow offloading under Network → Firewall: offloaded traffic can bypass the shaper.