What is bufferbloat?

Bufferbloat is a type of network performance degradation that is caused when network gateways are configured with excessively large buffer queues. Buffer queues are designed to cache packets that would otherwise get discarded when the network is congested. Once the egress interface is available to more traffic, the data packets are then transmitted. As a result, buffer queues increase the amount of time that it will take for network traffic to reach its destination. This timing is also called queuing delay. As we’ll see, high delays can degrade data transfers as well as voice and video calls, which are time sensitive by nature. 

The impact to work from home users

It’s important to recognize and address bufferbloat, especially for work from home users. If not, it will impact workers productivity, job performance, and drive support costs especially for large organizations with many remote users. In the next section, we’ll see what are the causes and how to detect and remediate it.

What causes bufferbloat?

Bufferbloat is caused when the egress interface of a router (Internet connection) is slower than the ingress (LAN side). In a home environment, when too much traffic originating on the LAN has to be transmitted to the Internet, network congestion happens. In this case, the router starts queuing network packets instead of discarding them. Let’s see why routers with excessively large buffer queues confuse the TCP congestion avoidance algorithm, causing bufferbloat and network performance degradation. First, let’s have a look at how TCP works.

The TCP congestion avoidance algorithm

The TCP congestion avoidance algorithm is implemented for a TCP socket connection to manage its internal, dynamic buffer that is called Congestion Window Size (CWS). The CWS is used to calculate how many packets the sender should transmit on the network before receiving acknowledgement of receipt by the receiver. Once the sender receives acknowledgement, it will send another set of packets. 

The CWS size, and consequently the resulting TCP throughput, is regulated by the packet drop rate. When a packet is dropped, the network is telling the sender that it cannot sustain a certain speed. As a result, the sender reduces the amount of traffic that is transmitted unacknowledged, and speed rate as a result.

Bufferbloat of TCP connections

However, if a router with large queues is caching too many packets that otherwise would have been discarded, it signals the sender that the network can sustain a throughput that is higher than what it can actually send. As a result, the sender will further saturate the router’s queue until it will have to eventually drop a large amount of traffic. This causes a higher reduction of transmitted packets than it would if the queues were smaller, exacerbating the issue. For this reason, gateways with large queues are causing more harm than benefit, and should be sized accordingly.

If you want to read more details about this, you can read about the relationship between network performance and end-user experience, as well as how congestion avoidance is implemented with the Matis equation.

How can I detect bufferbloat?

There are many tools available to test if a device (e.g. your Internet gateway) is the cause of bufferbloat. One simple way to test is to ping an Internet website or host when the network is not congested (unloaded), and then ping it again when the network is congested (loaded). If there’s a big difference between the two, then probably the device is susceptible to bufferbloat.

One common publicly available resource that can test for this issue is the fast.com upload speed test by Netflix. In the extended report, the test reports unloaded and loaded timing. In the screenshot below you can see that the gateway that I am using to connect to the Internet is susceptible to bufferbloat as the difference between unloaded and loaded timing is approximately 900 milliseconds.

How to correct bufferbloat?

Consumer devices generally can’t be configured to avoid using long queues, they are just shipped like that. There’s a whole list of home gateways that implement Smart Queue Management that provide protection from bufferbloat. You can search online for different vendors and device models. As for enterprise grade networking hardware, this falls under the Quality of Service section of a router or switch’s configuration. Refer to the vendor documentation for more details.

Source