Router SQM Guide

How to Fix Bufferbloat with SQM, CAKE & FQ-CoDel

Follow this router SQM guide to reduce bufferbloat and keep ping stable while downloading or uploading. Configure CAKE or FQ-CoDel, then test your latency under load.

Test Tag / Environment

Tag your test to measure the impact of cables or router QoS rules

Limitations of Traditional QoS vs. Modern SQM

Old-school QoS prioritizes specific ports or IP addresses, but fails when total bandwidth saturates because packet queues still overflow.

Modern SQM (CAKE — Common Applications Kept Enhanced) breaks traffic into hundreds of isolated hash buckets and uses active drop algorithms (CoDel/ECN) to maintain near-zero queue latency.

Core Advantages of CAKE SQM

  • Fair Queueing: Automatically separates traffic flows by IP and connection.
  • Active Queue Management: Early packet drop or marking (ECN/CoDel) before buffers fill.
  • No Manual Rules: No need to prioritize individual ports or static IPs.

Configuration by Router Platform

OpenWrt

Difficulty:: Medium
Package:: luci-app-sqm / kmod-sched-cake

Install luci-app-sqm, go to Network -> SQM. Enable on WAN interface. Select CAKE as qdisc and piece_of_cake.qos. Set download and upload bandwidth to 90-95% of measured speed.

ASUSWRT-Merlin

Difficulty:: Low
Package:: Adaptive QoS / fq_codel

Go to QoS -> Enable Smart QoS. Select "Bandwidth Limiter" or "Cake QoS" on recent models. Set symmetric or asymmetric limits with an 8% safety margin.

pfSense / OPNsense

Difficulty:: Advanced
Package:: FreeBSD Dummynet / FQ_CoDel

Create two limiters in Firewall -> Traffic Shaper -> Limiters (one Ingress, one Egress). Assign FQ_CoDel queue discipline to both pipes and link them in your WAN/LAN rules.

Keenetic OS

Difficulty:: Very Low
Package:: IntelliQoS / SQM

In the Keenetic app or web UI, enable IntelliQoS and set your contracted line speed. The firmware dynamically manages queues automatically.

The 90-95% Bandwidth Margin Formula

Recommended Bandwidth Limit Formula:
SQM Limit = Actual Sustained Speed × 0.93 (7% saturation margin)

Setting SQM bandwidth around 90–95% of measured line capacity keeps queueing within your router's active scheduler rather than unmanaged ISP/ONT buffers, significantly reducing latency under load.