We answer these questions all the time, so we collect them here for reference.
Answers are grouped into solutions for bufferbloat, then a review of Bufferbloat and its causes, then the science behind the fixes, then “objections”, and finally actual questions from various forums.
Yes. The science for solving bufferbloat is well understood. Routers generally employ fq_codel or CAKE algorithms for ISP connections and Tx Queue limits, AQL, and ATF algorithms to address bufferbloat in Wi-Fi. The cake-autorate algorithm handles links with varying rates, such as 4G/5G cell phones, cable modems, etc.
Yes. The What Can I Do About Bufferbloat? page list several vendors who have figured out how to include these algorithms into their products.
There are a number of open-source projects listed on the page above. The OpenWrt project is notable because that is where these algorithms were first developed.
Check out How OpenWrt Vanquishes Bufferbloat for a list of the techniques a router can employ, including ISP-bloat, WiFi-bloat, and bloat caused by variable speed links.
Wikipedia says, “Bufferbloat is the undesirable latency that comes from a router or other network equipment buffering too many data packets.”
If a router doesn’t use a better algorithm, it will happily place every newly-arriving packet at the end of a single FIFO queue waiting to be sent to your ISP.
If packets arrive at the router faster than they can be transmitted to the ISP, the queue builds up. From time to time, the queue might hold dozens (or hundreds) of packets, potentially causing multiple seconds of latency or lag. Those buffered packets are “the bloat” in Bufferbloat.
Bufferbloat can occur anywhere there’s a bottleneck - a place where a fast link feeds into a slow link. When many packets arrive at the bottleneck, the router queues those packets. One or two queued packets can be beneficial so the slow link never starves. But queueing more packets only adds latency (delay) to the transit time of those packets.
These large queues can build up in your router’s connection to the ISP (because the outbound link tends to be slower than the local LAN interfaces) and also in Wifi interfaces (again, computers can create packets faster than the wireless link can carry them).
There are a number of web-based tests that measure latency during the download and upload:
If the test shows an increase of latency under load of less than 15-25 msec, then the latency is well under control.
To make more repeatable tests, consider Flent or Crusader.
Yes. Wi-Fi drivers can often queue hundreds of milliseconds of packets, which adds additional delay to packet transit time (round-trip time).
Check out the Crusader application. You’ll need two computers: connect the first by Ethernet to a LAN switch port on your router and start the Crusader Server; run the Crusader Client from a second computer on Wi-Fi.
A router can control queueing using one of several algorithms. In general, the algorithms use a variation on this mechanism:
Each turn, the round-robin process doles out a few packets from a queue, generally 5-15 msec worth of traffic. Low-traffic flows empty their queue “right away” - in their next turn. A single high-traffic flow gets to use the entire capacity of the bottleneck, because no other queues have data to send. When there are competing high-traffic flows, the round-robin process cycles between all the queues that hold packets, sending a “fair amount” from each in every turn.
Absolutely. There’s also a bottleneck at your ISP. Their high-speed lines feed traffic to the (slower) link coming toward you. That fast-to-slow transition within the ISP equipment can also build up significant queues.
The router creates a new “download interface” within the router to act as the bottleneck. As with the upload direction, this internal download interface is configured to be slightly slower than the ISP link (typically 5%-10% slower). That lets the queue build up within the local router, where the bufferbloat algorithm can control it.
WiFi bufferbloat can easily exceed hundreds of milliseconds. See the Ending the Anomaly and Bufferbloat mitigation in the WiFi stack talks from 2017 that document this.
Fortunately, that paper also presents a solution involving a) individual transmit queues for each station, b) AirTime Fairness, and c) Airtime Queue Lengths to drop latency by an order of magnitude. These techniques are described in the papers cited above and How OpenWrt Vanquishes Bufferbloat.
My cable connection speed varies from daytime to evening. And my 5G cell connection is even worse - changing from minute to minute. How can I choose a setting for the CAKE download and upload speed parameters?
The cake-autorate algorithm continually monitors traffic and latency, and adjusts the CAKE parameters up and down to give the highest throughput while minimizing latency.
No more than happens with a single FIFO queue. (Those packets are already being buffered now.) In fact, these algorithms can decrease memory use: queues for low-traffic flows are almost always empty; high-traffic flows - if they begin to build up a queue - get back pressure either using ECN or by dropping packets.
No. Packet loss is always required by the TCP protocol to signal that there is congestion, or that the sender is “sending too fast”. Anytime a TCP sender detects that signal, they must decrease their rate of sending.
When a router using a bufferbloat algorithm notices that a significant queue is building for one of its flows, it implies that the sender is sending too fast for current conditions. If it were not limited, the sender would be using more than its share of the limited bandwidth. Consequently, the router occasionally drops a packet from the head of that queue to signal the sender to slow down.
Maybe. It’s a fiddly process, and doesn’t always work. See What’s wrong with simply configuring QoS? for more information.
It seems you’re ignoring the order of magnitude increase in latency. That’s far more than expected if the network were “just busy”.
It may be true that you’re the only human in the house. But does your phone ever upload photos? Does your computer fire off any automated process? Does your Tesla (or your refrigerator) get updates? Do you browse the web, or otherwise use the internet? Any of those can generate traffic that, in turn, induces latency.
Exactly - bufferbloat is transitory. You probably notice it when someone’s uploading photos, or your computer is doing something in the background.
Yes, the tests do add load. But what would you expect to happen to your network’s performance if you actually were uploading or downloading a file?
This is related to the previous answer. When you open a web page or open an email attachment, your computer - by design - briefly uses 100% of the link. Is this enough to cause momentary lag?
Really?
That helps, but if you’re reading this because you’re worried about a “slow network” you still have to rule out bufferbloat.
In the 2010 time period, no one understood this phenomenon. In 2011, Jim Gettys reported on his work with other network experts (see Dark Buffers in the Internet) to show how surprising it was that routers would queue far more data than they could send in a reasonable time.
In 2012, CoDel was invented in response the newly-named “bufferbloat”. In the decade since, we’ve seen fq_codel, CAKE, and cake-autorate - all open-source algorithms for minimizing latency.
Today, there’s no excuse for router vendors not to incorporate this technology. But still, many have not done it.
Not necessarily – implementing any new code requires engineering effort. They’re selling plenty of routers using their decade-old software. The Boss asks, “Would we sell more routers if we make those changes?” (Probably not, so the vendors don’t change.)
But if everyone started writing reviews saying Vendor X has bufferbloat and games are unplayable, but Vendor Y doesn’t… that might change the game.
Maybe. We have reached out to lots of vendors. But remember they profit if you decide to upgrade to a higher capacity device/plan.
Maybe that router’s not as good as their advertising says…
Well, the fq_codel/CAKE algorithms seem to solve the problem when they are used in place of vendor firmware…
Same answer as above.
This is a valid point - see What Can I Do About Bufferbloat? for a list of commercial products.
… Wondering if anyone could help me out with this configuration, again the whole purpose of this is to have the lowest latency as possible when gaming. I understand that the bufferbloat test is designed to see how the network handles high stress loads and when considering for online gaming (eg. COD MW3) I understand it doesn’t use anywhere near by max bandwidth. Even under lower loads I still get the same latency values. (Original post on Reddit)
Despite the confident assurances from other posters that it isn’t bufferbloat, it sounds as if you’re seeing latency/lag when gaming. Here’s what could be going on.
Bufferbloat is transitory. You can have very low ping times when the link is idle, but if someone else starts using the network (reading the web, watching a movie, uploading photos from their phone), their bursts of traffic can momentarily load the network to 100%. Could that be enough to make you miss your shot?
You’re right - bufferbloat tests “artificially load the network”. They do this to see how your network performs under those moments of 100% load.
You didn’t say, but at ISP speeds above 300-500mbps, the bufferbloat in the Wi-Fi system can become important. This is a solved problem (see Ending the Anomaly), but not universally deployed in routers.
Bufferbloat is not your problem on a gig symmetrical link unless you are smashing the upload.
This is exactly the definition of bufferbloat. If sending a lot of traffic causes your latency to increase significantly, something is wrong, likely bufferbloat.
… I’m playing competitive games and it feels like im desynced to the server 70 % of my matches. First image is with no QOS in the router, the second one is when im limiting my bandwith to 85 % up and down. With QOS its ok, but i just dont understand why jitter and latency is that high without QOS on a fibre connection. (Original post on Reddit)
Garden variety commercial routers (even “gaming routers”) frequently don’t have guard rails to prevent them from queueing too much data. All the traffic goes “into the queue” (technically, they use a FIFO). A burst of bulk packets (photos from your phone, reading a web page, etc.) delay smaller packets such as gaming updates, voice and videoconference traffic.
QoS helps (as you’ve seen), but it won’t entirely solve the problem.
However, this is a solved problem if you have a good router. See What can I do about Bufferbloat? for more details
Given the focus of latency in the Wi-Fi 6 and Wi-Fi 7 standards, has anyone tested the bufferbloat behavior of these AP? I’m particularly interested in U6+.
… The amount of packet buffer they will have on board will be trivial. (Original post on Reddit)
And yet, WiFi bufferbloat can easily exceed hundreds of milliseconds. See the Ending the Anomaly and Bufferbloat mitigation in the WiFi stack talks from 2017 that document this.
Fortunately, that paper also presents a solution involving a) individual transmit queues for each station, b) AirTime Fairness, and c) Airtime Queue Lengths to drop latency by an order of magnitude. These techniques are described in the papers cited above and How OpenWrt Vanquishes Bufferbloat.
… An easy way to test that would be to use Crusader.
The Crusader network tester is terrific. See the question above about using it to test Wifi latency.
… Whenever my Tesla started updating, my ping went to crap… Finally, I threw my hands up in the air, configured an edgerouter I had here and enabled smart queue. Instantly I was getting A+ scores, with +0ms on both incoming and outcoming.
Do I need new hardware? If so what is recommended? Should I just give up and use the edge router. (Original post on Reddit)
A couple thoughts. My mentor once said, “If you can’t tell the difference, it doesn’t make a difference”. How does that apply to the situation you describe?
If you’re happy with the way your network performs, you can declare victory. If the Edgerouter gives near zero additional latency, it seems like a win.
You didn’t mention the rated speed for your ISP, but do you ever notice that it’s “not fast enough” when using the Edgerouter?
If not, see the next question for more information…
… I’d like a plug and play QoS router with a 5gb/s WAN port and at least 1 5gb/s LAN port (future proofing) … (Original post on Reddit)
A 5Gbps-capable router is going to cost serious money. (I don’t know your budget, but it’ll be a lot.)
Your ISP has probably been offering a higher speed plan, especially if you say “it’s not fast enough”. But if your router is adding latency, then everything will feel slow, regardless of the “speed” of the link.
Surprisingly, the “speed to deliver” normal data doesn’t increase by much for a faster link. See the charts in The Latency Effect that show that increasing ISP speed doesn’t make web pages load much faster. Decreasing latency always made pages load faster.
So 250mbps or 300mbps could be plenty unless you want bragging rights.
Here is a bit of contrarian advice. If you don’t actually need such high-speed service, consider these options: