How to Set Up SQM and QoS to Fix Bufferbloat
By Saif Ullah · Last reviewed 2026-11-26 · 9 min read
Set up SQM (Smart Queue Management) on the router that routes your connection, shape it to about 90 percent of your measured download and upload speeds , and use CAKE with piece_of_cake.qos , or fq_codel with simple.qos on a slower router. On OpenWrt that means installing luci-app-sqm , enabling it on the WAN interface under Network, SQM QoS, and turning flow offloading off. Expect loaded ping to fall back near idle ping, at the cost of about 5 to 10 percent of raw throughput.
Your plan says 200 Mbps and the speed test agrees, yet games lag and calls freeze the moment someone starts a download or a cloud backup. That is bufferbloat, not a slow plan: an oversized queue at the slowest link fills up, and every small packet waits behind it. QoS settings that only prioritise one device do not fix it. SQM does, because it manages the queue itself. This guide shows the setup on OpenWrt, where SQM is best supported, plus the before and after test that proves whether it worked.
One honest note first: FastSpeedTest now offers a built-in bufferbloat test that grades loaded latency in one click, so start there. The manual protocol below still works if you want to verify the result: the regular speed test plus a large transfer to load the line, exactly as the bufferbloat guide describes. No extra software is needed.
On this page
- What SQM and QoS actually do
- Step 1: prove it is bufferbloat before you change anything
- Step 2: install SQM on OpenWrt
- Step 3: configure it in LuCI
- Worked example: a 100 Mbps down, 20 Mbps up line
- Step 4: test again and tune
- SQM on routers that are not running OpenWrt
- What SQM cannot fix
- Sources
- What is SQM and how does it fix bufferbloat?
- Should I use CAKE or fq_codel?
- What speeds do I enter in SQM?
What SQM and QoS actually do
Step 1: prove it is bufferbloat before you change anything
Step 2: install SQM on OpenWrt
Step 3: configure it in LuCI
Worked example: a 100 Mbps down, 20 Mbps up line
Step 4: test again and tune
SQM on routers that are not running OpenWrt
What SQM cannot fix
Sources
QoS is the broad idea of managing traffic: prioritising some packets over others. SQM is the specific system that fixes bufferbloat, and bufferbloat.net defines it as per-flow packet scheduling plus active queue management plus traffic shaping plus QoS prioritisation, working together. The shaping part matters most. By capping speed slightly below the real line rate, SQM moves the bottleneck queue out of your modem or ISP equipment, where you cannot control it, and into your router, where CAKE or fq_codel can keep it short. Each flow gets its own queue, so a bulk download cannot crowd out a game or a call.
OpenWrt recommends CAKE as the more comprehensive option, with fq_codel as the lighter alternative when hardware capacity is a concern. Start with CAKE and only switch if the router CPU cannot keep up. Source: OpenWrt SQM guide , bufferbloat.net FAQs .
Do this test before touching the router, and repeat the exact same test after setup. Same computer, same Ethernet cable, same time of day if you can manage it.
If ping is already high when the line is idle, SQM will not help: that points at Wi-Fi, routing, or the distance to the server instead. See reduce ping for gaming for those causes.
SQM is an optional add-on package on OpenWrt, not installed by default. Check first that your router model is on the OpenWrt Table of Hardware, and note your WAN settings before changing firmware.
Source: OpenWrt SQM details, link layer adaptation , checked November 2026. If your line uses PPPoE or a mandatory VLAN, add its overhead on top of the table figure; the SQM details page explains the exact additions.
A household measures 96 Mbps down and 19 Mbps up on a wired test, a little under the 100/20 plan. The SQM values are 90 percent of the measured speeds, converted to kbit/s.
The speed test after setup will show about 86 Mbps down on the first row, not 96. That is the shaper doing its job, not a fault. The number to watch is ping under load, not the headline Mbps.
Repeat the Step 1 test exactly: same wired computer, same large transfer running, same speed test. Write the numbers next to the baseline.
Key points
- Get the idle baseline. Connect a computer to the router by Ethernet, close everything else that uses the network, and run the speed test . Write down download, upload, ping and jitter.
- Load the line. Start a large download, or a cloud backup upload, and leave it running.
- Measure again under load. Run the speed test a second time while the transfer is still going, and write down the new ping and jitter.
- Read the difference. A rise under about 30 ms is healthy. A rise of 30 to 100 ms is mild bufferbloat you will notice on calls. A rise above 100 ms, the classic jump from 20 ms idle to 200 ms or more under load, is severe bufferbloat, and SQM is the fix.
- In LuCI, go to System, Software, update the package lists, and install luci-app-sqm .
- Or over SSH, run opkg update and then opkg install luci-app-sqm . On newer OpenWrt releases that use apk instead of opkg, run apk update and apk add luci-app-sqm .
- Reload LuCI and open Network, SQM QoS. If the menu is missing, reboot the router.
- Enable this SQM instance. Tick the enable box at the top of the SQM QoS page.
- Pick the WAN interface. Select the interface that faces the internet, usually wan , eth1 , or pppoe-wan . SQM must run on the device that routes your connection, with all traffic passing through it. A router in bridge or access point mode cannot shape the line.
- Enter the speeds in kbit/s. OpenWrt asks for kbit/s, so 100 Mbps is 100000. Enter 90 percent of the speeds you measured in Step 1, not your plan speeds. Both directions matter: the upload queue is usually where the worst bufferbloat lives.
- Choose the queue discipline. On the Queue Discipline tab, choose cake with the piece_of_cake.qos script, or fq_codel with simple.qos on a slower router.
- Set link layer adaptation. Use the table below for your line type. Getting this close matters more than getting it exact, and overestimating by a few bytes is better than underestimating.
- Turn flow offloading off. Under Network, Firewall, turn off software and hardware flow offloading. Offloading bypasses SQM on many routers, which silently disables the fix you just set up.
- Save and Apply, then restart SQM or reboot the router.
Frequently asked questions
- What is SQM and how does it fix bufferbloat?: SQM, Smart Queue Management, shapes your connection slightly below its real line speed so the queue forms inside your router, then keeps that queue short with CAKE or fq_codel. Small packets for games and calls no longer wait behind a big download, so ping under load stays close to idle ping. Bufferbloat.net describes SQM as the combination of per-flow scheduling, active queue management, shaping and QoS prioritisation that fixes bufferbloat.
- Should I use CAKE or fq_codel?: Use CAKE with piece_of_cake.qos if your router can run it. OpenWrt recommends CAKE as the more comprehensive option, and it needs the least tuning. Use fq_codel with simple.qos if your router is too slow for CAKE at your line speed, since fq_codel uses less CPU. Both beat the plain FIFO queue in stock firmware.
- What speeds do I enter in SQM?: Enter about 90 percent of your measured download and upload speeds, in kbit/s, not your plan speeds. A 100 Mbps plan that measures 96 Mbps down takes 86400 kbit/s. Start at 90 percent, test under load, and only then adjust in small steps. Setting the caps above your real line rate defeats the purpose, because the queue forms upstream of your router again.
- Will SQM slow down my internet?: It trims raw throughput by roughly 5 to 10 percent in exchange for keeping latency low and stable. Your speed test number drops a little, but games stop lagging during downloads and video calls stop freezing while someone uploads. For anything interactive, that trade is worth it.
- Why is my ping still high after enabling SQM?: Check four things in order: the SQM caps are at or below 90 percent of measured speed, hardware flow offloading is off because it bypasses SQM on many routers, SQM is on the WAN interface of the device that routes your connection and not on a bridge or access point, and the router CPU is not maxed out. If the CPU is the limit, switch from CAKE to fq_codel or lower the caps.
- Does my router have SQM if it is not running OpenWrt?: Some do. Asus routers offer it under Adaptive QoS, eero enables its version automatically, GL.iNet routers have a built-in SQM toggle, and Ubiquiti EdgeRouter supports it. Most ISP supplied routers do not offer it at all. If yours does not, bridge the ISP router and put an OpenWrt router behind it.
Steps
- Measure the baseline
- Connect a computer to the router by Ethernet, run a speed test with nothing else using the connection, and write down download, upload, idle ping and ping while a large download runs.
- Install SQM on OpenWrt
- Install luci-app-sqm from System, Software or over SSH, then open Network, SQM QoS in LuCI.
- Set the shaper to 90 percent
- Enable the SQM instance on the WAN interface and enter 90 percent of your measured download and upload speeds in kbit/s.
- Pick CAKE or fq_codel
- Choose cake with piece_of_cake.qos, or fq_codel with simple.qos on a slower router, and set link layer adaptation for your line type.
- Turn off flow offloading
- Disable software and hardware flow offloading, which bypasses SQM on many routers, then save and apply.
- Test again under load
- Repeat the exact same before test. Loaded ping should now stay within about 30 ms of idle ping.
More from FastSpeedTest