Skip to content

Fix bufferbloat on Ubiquiti UniFi routers

Updated 2026-11-06

Real Smart Queue

Yes. UniFi gateways have Smart Queues, which is real Smart Queue using fq_codel.

Smart Queues limits your line to the speeds you set and uses fq_codel so small packets don't wait behind big transfers. It runs on the gateway's CPU instead of the hardware offload path, which is why Ubiquiti only recommends it for lines under about 300 Mbps.

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

UniFi Network

  1. In UniFi Network, go to Settings โ†’ Internet and select your WAN.
  2. Turn on Smart Queues and enter your download and upload limits.
  3. Apply, then test again. The exact placement moves between UniFi Network versions; older versions keep it on the WAN network's settings.
  4. Behind an ISP gateway (an Xfinity XB7 or XB8, for example), put the gateway in bridge mode first so the UniFi gateway is the only router and its Smart Queues shapes the real line.

3. The numbers to enter

UniFi asks for Mbps. Start at about 90% of your measured speed, or use the figures from the Smart Queue assistant.

Work out my limits

The assistant starts at 90% of your measured speed and tells you when to drop to 85% or 80%.

Gotchas

  • Smart Queues turns off hardware offloading, so the gateway's CPU does the work. Ubiquiti's own guidance is not to enable it on lines of 300 Mbps or more; above that the shaped speed drops below your limit on smaller gateways (Dream Machine, Dream Router, UXG-Lite, Cloud Gateway Ultra). Check the shaped speed in the Lag Check after turning it on.
  • On a fast cable line the upload is usually the problem. If the full download can't be shaped, try shaping only the upload, or set the download limit high, and compare grades.
  • If you have more than one WAN, set it on the one you use.

If it isn't enough

  • On lines over about 300 Mbps where the grade stays at C or worse, a gateway with more CPU (Cloud Gateway Max, Dream Machine Pro/SE) or a separate CAKE router in front of the UniFi network shapes faster.

Questions

Where is Smart Queues in UniFi?

Settings โ†’ Internet โ†’ your WAN, then the Smart Queues toggle with download and upload fields. Older UniFi Network versions keep it on the WAN network's settings page. It applies per WAN, so set it on the connection you use.

Does UniFi Smart Queues reduce speed?

Yes, by design: it holds your traffic a little under the limits you type in, and it bypasses hardware offloading so the gateway's CPU handles every packet. On lines under 300 Mbps the cost is a few percent of peak speed; on faster lines smaller gateways can't keep up and the shaped speed falls well below the limit.

What limits should I enter in Smart Queues?

About 90% of your measured download and upload in Mbps, not your plan's advertised speed. Run the Lag Check, type in the figures, test again, and drop to 85% if the grade is still B or worse. The Smart Queue assistant works the numbers out for you.

Should I use Smart Queues on a 1 Gbps line?

Ubiquiti recommends against it at 300 Mbps and above on most gateways. If your lag is from uploads, which it usually is on cable, you can set only the upload limit (or set the download limit high) and keep most of your download speed while still fixing the lag. Otherwise a gateway with more CPU is the fix.

Does Smart Queues help if my ISP gateway is still routing?

Only partly. If an ISP box in front of the UniFi gateway still does its own routing, queues can build there too. Put the ISP box in bridge mode so the UniFi gateway shapes the real line; the Xfinity gateway guide shows the steps for XB7 and XB8.

Related guides

Test after the change. A good setup brings lag under load down to A or B.

Test before and after