My friends frequently ask, “Why is my network so slow?” And often, the answer is “latency” or the screwy term, “Bufferbloat” – the “undesirable latency caused when a router buffers too much data.” But what the heck does that mean?
A while back, I attempted a layman’s explanation of Bufferbloat. I compared it to a ski shop. It was pretty unsuccessful: it just didn’t have any intuitive appeal.
That’s why I was delighted that Waveform.com published what I believe is the Best Bufferbloat Analogy – Ever. (I am pleased to have contributed to the final version of their description.) That page also has a well-designed web-based Bufferbloat Tester (on a par with the DSLReports Speed Test).
They asked, Can you explain bufferbloat like I’m five? and noted that flows of liquids were sort of like flows of packets. The analogy was when a friend dumps a bucket of water into a sink with a narrow drain, it slows other flows (like a teaspoon of oil) from emptying out. Read the whole description…
This made me think about having a SmartSink™ to give a visual image for understanding how a well-designed router can decrease latency.
What’s a SmartSink™?
Instead of accepting a full bucket of water all at once, a SmartSink controls the bucket of water with a valve. It allows just enough water into the sink to keep the drain full. If the water gets too low, the SmartSink opens the valve: if it gets “too full”, it closes it a bit.
A SmartSink also works when lots of friends have their own buckets, pouring in colored water – pink, blue, etc. The valves on the SmartSink control each color. If the SmartSink notices too much pink water, it closes that valve a bit to bring back balance, so that each color gets its “fair share” of the drain’s capacity. And because there’s never too much water (of any color) in the sink, a small new flow always drains quickly.
Reality check: This is just an analogy. I realize that a SmartSink is a ridiculous idea. But it helps me visualize how small flows can drain quickly while big flows share the drain capacity fairly.
What does this have to do with routers?
The Smart Queue Management (SQM) algorithm in a router works like the SmartSink. When a device starts sending a lot of data (maybe a phone starts uploading photos to the cloud), SQM controls the amount of data queued for each flow (each separate upload, videoconference, voice call, gaming session, Youtube, Bittorrent, etc) to prevent any one flow from using more than its share. Instead of operating valves to control the flow of water, SQM controls the size of each flow’s queue by:
- Placing packets from each flow into a separate queue.
- Removing a small batch of packets from each queue, round-robin style, and sending that batch “out the drain” through the (slow) bottleneck link to the ISP. When each batch has been fully sent, it retrieves another batch from the next queue, and so on.
- Offering back pressure to flows that are sending “more than their share” of data.
This process provides these desirable effects:
- Most importantly, SQM provides low latency. Small flows (with just one or a few small packets) get sent right away in their next “round robin” batch.
- Equal sharing of the bottleneck: If there are multiple senders, each can send an equal amount of data with each round-robin opportunity.
- No waste of the bottleneck: If there’s only one sender (one queue with data), that one gets the full capacity of the link.
- Offering backpressure to bulk senders minimizes lost packets and re-transmissions, making the network globally more efficient.
Does SQM work?
YES! Can I get a router with SQM today? YES!
Got questions? Send them to me and I’ll include them in Part 2 (coming soon) of this blog. Thanks.
I connect to the internet using 4G/LTE using a Huawei B315 router and SIM card. I get 9Mbps down on a good day, 1 to 3 in the evening when system load is high. I get 2 to 3 seconds (2000 – 3000 ms) loaded latency. Will an IQrouter or other CAKE or similar router improve my performance? It’s not the WiFi, I tried connecting with Ethernet cable.
Yes. I use an IQrouter in exactly the same setting. I get a little higher speeds from my cell provider, but the IQrouter makes a huge difference.
How does the IRQouter make a difference exactly? What is the explanation for that?
IQrouter implements the CAKE SQM algorithm. This guarantees low latency for small (short duration) flows and fair sharing of the bottleneck bandwidth between large flows. For more info, see https://bufferbloat.net