How to Fix Bufferbloat: SQM (Cake & FQ_CoDel) Router Guide

Updated 2026-10-09 • By Marcus Vance, CCNA (Senior Network Engineer)

Fix bufferbloat by enabling Smart Queue Management (SQM) with the Cake or FQ_CoDel algorithm in your router's QoS settings and capping your download and upload shapers to 85%–92% of your verified wired ISP speeds. Slightly throttling peak throughput prevents oversized ISP modem FIFO buffers from filling up, cutting loaded ping spikes from 200+ ms down to under 5 ms during heavy uploads.

Key Technical Takeaways
  • The 85%–92% Shaper Rule: Set SQM download and upload limits to 85%–92% of your worst-case wired Speedtest result so your router—not the ISP modem—owns the bottleneck queue.
  • Target Latency Benchmark: To earn an A or A+ on the Waveform Bufferbloat Test, both Download Active and Upload Active latency increases must remain under +5 ms to +15 ms.
  • Cake vs FQ_CoDel: Prefer Cake (Common Applications Kept Enhanced) with piece_of_cake.qos and nat dual-srchost / dual-dsthost for automatic per-device and per-flow fairness.
  • When to Skip SQM: If you have symmetrical 1 Gbps+ FTTH fiber and your router has a slower CPU, leave SQM disabled on Download (or both) unless you saturate your link completely.

What Is Bufferbloat and Why Fast Internet Still Lags on Zoom & Gaming

Homeowners frequently upgrade from a 300 Mbps plan to a 1,000 Mbps plan expecting video calls and online games to stop rubber-banding, only to experience the exact same lag spikes whenever a family member backs up iCloud photos or downloads a Steam update. The culprit is Bufferbloat: excessive packet queuing inside oversized, unmanaged First-In, First-Out (FIFO) memory buffers in your cable modem, ONT, or consumer router.

Especially on asymmetrical cable connections (such as Comcast Xfinity or Spectrum with 500 Mbps download but only 20–40 Mbps upload), a single cloud backup immediately saturates the upstream pipe. Instead of signaling the sending TCP stack to slow down early, the cable modem stuffs hundreds of 1,500-byte upload packets into a deep FIFO buffer. When your PC sends a tiny 64-byte UDP gaming packet or Zoom audio frame, it must wait at the very back of that queue for 150 ms to 600 ms before being transmitted—destroying real-time interactivity even though your bandwidth is plentiful.

How to Test for Bufferbloat (Waveform Test & Continuous Ping)

Always test for bufferbloat from a computer connected via wired Gigabit Ethernet first so Wi-Fi airtime contention does not skew your baseline:

  • 1. Run the Waveform Bufferbloat Test: Close background downloads and run the test at Waveform.com. It measures three phases: Unloaded Latency (your idle baseline, e.g., 14 ms), Download Active (latency while saturating downstream), and Upload Active (latency while saturating upstream).
  • 2. Run a Terminal Ping Verification: Open a terminal window and run ping -t 1.1.1.1 (Windows) or ping 1.1.1.1 (macOS/Linux) while running a heavy download and upload test.
  • 3. Interpret Your Grade: If your ping stays within +0 to +5 ms of idle under full load, you earn an A+. An increase of +5 to +30 ms earns an A. If loaded latency jumps by +60 ms to +400 ms (Grade C, D, or F), your modem or router buffers are bloating and require Smart Queue Management.

How SQM (Cake & FQ_CoDel) Fixes Bufferbloat: The 85%–92% Rule

Legacy router 'Gaming QoS' sliders that require manually typing port numbers or MAC addresses fail to cure bufferbloat. Modern routers solve the problem mathematically using Smart Queue Management (SQM) powered by either FQ_CoDel (Flow Queue Controlled Delay, RFC 8290) or Cake (Common Applications Kept Enhanced). Both algorithms split traffic into hundreds of independent micro-queues (one per IP/port flow) and serve sparse flows—such as DNS lookups, VoIP packets, and gaming ticks—at the head of the line ahead of bulk elephant transfers, while using ECN (Explicit Congestion Notification) or targeted packet drops to pace TCP senders.

However, SQM only works if your router is the slightly slower link in the chain. If your ISP delivers 35 Mbps upload and you set your router's shaper to 35 Mbps, bursts will still overflow into your cable modem's dumb FIFO buffer. You must set your SQM Download and Upload limits to 85% to 92% of your lowest reliable wired speed test (for example, on a 500/35 Mbps cable line, set Download to 440 Mbps and Upload to 30 Mbps). With Cake, also set Overhead to 18 bytes (docsis) for cable modems or 44 bytes for PPPoE/VLAN fiber, and enable nat dual-dsthost (ingress) and nat dual-srchost (egress) for true per-LAN-IP fairness.

Enabling SQM on OpenWrt, GL.iNet, UniFi, Asuswrt-Merlin & MikroTik

Here is where to enable true Cake or FQ_CoDel SQM across major router platforms:

  • OpenWrt & GL.iNet (Flint 2 / Beryl AX): Install luci-app-sqm, go to LuCI > Network > SQM QoS, select your WAN interface (eth0 or eth1), enter your 85%–90% speeds in kbit/s (multiply Mbps by 1000), choose cake + piece_of_cake.qos under Queue Discipline, and set Link Layer Adaptation overhead.
  • Ubiquiti UniFi (UCG-Ultra / UCG-Max / UDM-Pro): Navigate to Settings > Internet > Primary (WAN1) > Manual, check Smart Queues (which runs FQ_CoDel), and enter 85%–90% of your Down/Up rates. (On asymmetrical cable with 500+ Mbps down and 35 Mbps up, you can set Download to 0 to keep hardware offloading active on downloads while shaping Upload at 30 Mbps.)
  • ASUS (Stock & Asuswrt-Merlin): Go to QoS > QoS Type, select Cake QoS (supported on BCM4908/BCM4912 Merlin routers) or Traditional / Adaptive QoS with manual bandwidth limits set to 90%.
  • MikroTik RouterOS v7.1+: Create a Queue Type of kind cake (setting cake-atm/cake-overhead and cake-nat=yes) and attach it to a Simple Queue targeting your LAN subnet.

SQM Algorithm & Link Layer Overhead Reference Guide

Connection TypeRecommended SQM DisciplineLink Layer Overhead (Bytes)Bandwidth Shaper Target
DOCSIS 3.1 Cable (Xfinity, Spectrum, Cox)Cake (piece_of_cake.qos) + docsis flag18 bytes (MPU 64)85%–90% Down / 85%–90% Up
GPON / XGS-PON Fiber (DHCP / IPoE)Cake or FQ_CoDel (simple.qos)26–38 bytes (Ethernet + VLAN)90%–92% (or Upload-only if >500 Mbps)
PPPoE Fiber (CenturyLink / Regional FTTH)Cake (piece_of_cake.qos)44 bytes (PPPoE + VLAN)90% Down / 90% Up
Fixed Wireless / 5G / Starlink SatelliteCake w/ Autorate (cake-autorate)34–44 bytesDynamic Autorate (tracks variable capacity)
VDSL2 / Bonded CopperCake (ptm flag)22–30 bytes88%–90% of modem sync rate

Bufferbloat Elimination & SQM Tuning Checklist

  1. Run a baseline Waveform Bufferbloat Test over a wired Ethernet connection to measure idle vs Download Active and Upload Active latency.
  2. Record your lowest consistent wired download and upload speeds in Mbps and multiply by 0.88 (88%) to calculate your starting SQM shaper rates.
  3. Enable Cake (preferred) or FQ_CoDel (Smart Queues) in your router's QoS settings; note that SQM automatically disables hardware NAT acceleration while active.
  4. Configure Link Layer Adaptation overhead (18 bytes for DOCSIS cable, 38 bytes for Ethernet fiber, 44 bytes for PPPoE) for byte-accurate queue accounting.
  5. Re-run the Waveform Bufferbloat Test and raise or lower the shaper values in 3% increments until both active latencies stay under +10 ms (A or A+ grade).
  6. On variable-rate connections like Starlink or T-Mobile 5G, deploy the open-source cake-autorate script on OpenWrt rather than a static ceiling.

Frequently Asked Questions

Why did my maximum download speed drop from 940 Mbps to 450 Mbps after turning on SQM?

Because SQM must inspect and schedule every single packet in software, enabling Cake or FQ_CoDel disables your router's hardware Flow Offload / NAT Acceleration (CTF/Runner). If your router's CPU cannot shape 900 Mbps in software on a fast fiber line with slow upload (e.g., 800/40 Mbps cable), set the Download shaper to 0 (unlimited) and only shape the Upload direction where bufferbloat actually occurs.

What is the difference between Cake and FQ_CoDel?

FQ_CoDel is a fast, lightweight packet scheduler and Active Queue Management (AQM) algorithm that isolates individual TCP/UDP flows. Cake is the modern successor to FQ_CoDel that integrates a Deficit Mode traffic shaper, accurate DOCSIS/PPPoE framing compensation, NAT-aware Triple-Isolate per-host fairness (so a PC running 20 BitTorrent connections gets the same share as a PC running 1 stream), and DiffServ DSCP tin prioritization.

Do I need SQM if I have symmetrical 1 Gbps or 2 Gbps fiber?

If your local router and switches are 1 Gbps and your fiber is 1 Gbps+, you rarely saturate the pipe long enough to trigger WAN bufferbloat during normal household use. However, if you run heavy multi-threaded Usenet/Steam downloads or torrenting that pegs the 1 Gbps link at 100%, enabling SQM at 900 Mbps on a fast router (like a Flint 2 or Intel N100 OPNsense box) will keep gaming pings flat at 2 ms.

Can SQM fix bufferbloat on Wi-Fi?

Router WAN SQM only shapes traffic entering and leaving your ISP modem. To eliminate internal Wi-Fi bufferbloat, ensure your access points support Airtime Fairness and modern Linux mac80211 Make-Wi-Fi-Fast (AQL / FQ_CoDel inside the wireless driver, standard in OpenWrt and Qualcomm/MediaTek Wi-Fi 6/7 SDKs).

Reviewed by Marcus Vance, CCNA (Senior Network Engineer)

Part of the Packetsaver Network Engineering Team. All configurations and firmware safety instructions follow vendor-verified RFC and IEEE standards. Read our testing methodology →