Understanding Bufferbloat: 4G/5G vs Fiber optic, and How to Mitigate It?
I recently had to switch from Fiber-optic internet to a 5G connection. While at first, given the theoratical bandwidth offered by 4G/5G I thought this would not be a big issue, it turned out it's been more challenging than expected. And Bufferbloat is a big part of the problem.
Bufferbloat is a cause of high latency and jitter in packet-switched networks caused by excess buffering of packets. Bufferbloat can also cause packet delay variation (also known as jitter), as well as reduce the overall network throughput. [Wikipedia]
Have you ever started downloading a large file on your computer, and noticed that your WiFi internet on your iPad became super slow? That's Bufferbloat.
Bufferbloat is a phenomenon that occurs when excessive buffering in network devices, such as routers and switches, leads to increased latency or lag in internet connections. It happens when data packets are temporarily stored in large buffers before being transmitted, causing delays in their delivery. While buffering is essential for maintaining a stable connection (it helps smooth out variations in throughput, ensuring continuous data flow even when network conditions fluctuate), excessive buffering can result in poor network performance. It is called bufferbloat.
I like analogies to illustrate technical concepts. Here is one for bufferbloat. Bufferbloat can be compared to road traffic congestion. Just as traffic jams occur when too many vehicles accumulate because of a limited road space, buffer bloat happens when an excess of data packets flood a network’s available bandwidth. In both scenarios, the result is delays: in traffic, cars move slowly or come to a standstill, while in networking, data packets experience longer transmission times. Moreover, just as city planners implement strategies like wider roads, traffic lights, and alternative routes to alleviate congestion, network engineers employ techniques like Quality of Service (QoS) and buffer management to mitigate bufferbloat and maintain smoother data flow.
Cellular vs Fiber-optic connections
Cellular and fiber-optic connections have very different characteristics. They were originally conceived with distinct purposes in mind. Fiber optic connections were primarily designed for home and office use, catering to the need for high-performance internet access in stationary environments. Conversely, cellular connections were initially envisioned as a solution for offering connectivity on the go. However, due to challenges in deploying fiber-optic infrastructure everywhere and the ever-increasing demand for high-speed internet at home, 5G networks have begun to bridge the gap. They are now being utilized as a means to provide high-speed home internet access, replacing slower means of providing internet connection.
Fiber-optic and cellular connections mainly differ in consistency, latency, and reliabilty. While cellular connection bandwidth fluctuates based on network congestion and signal strength, fiber-optic offers much more stable and consistent speeds. That's because of the nature of wireless connections, and the underlying infrastructure. Users of cellular connections share many resources while users of fiber-optic infrastucture share much less resources. Similarly, cellular connections tend to have higher and unpredictable latency whereas fiber-optic usually has a predictable latency. Finally, 4G/5G connections are susceptible to interferences from nearby devices in populated areas. That's of course not the case for fiber-optic connections. We can now understand why cellular connections are very prone to buffer-bloat.
Cellular Connections Are Prone to Buffer Bloat
Unfortunately, even if theoretically, 5G connections can have higher throughput than some fiber-optic connections, it's generally not the case in the real-world. Especially when you consider that they are very prone to bufferbloat, which significantly impacts the overall browsing experience. Let's understand why.
- Variable Speeds: As we said above, in cellular networks, the speed at which data is transmitted can vary greatly. When the network experiences congestion or interference, packets may be buffered to compensate for the fluctuations in speed, leading to buffer bloat. Similar to how cellular networks experience varying data transmission speeds, road traffic includes vehicles traveling at different speed on the same road. Assuming you can't overtake cars traveling at a slower pace, this might lead to congestion if many vehicles are also driving faster.
- Network Congestion: 4G and 5G networks often serve a large number of users simultaneously, which can result in congestion during peak hours. When congestion occurs, packets are buffered excessively, or dropped, causing latency issues. Think about our previous analogy again: road traffic often leads to congested areas during rush hours, which result in slower movement for everyone. That's exactly the same story with bufferbloat.
- Wireless Interference: Interference from nearby devices, obstacles, or electromagnetic interference can disrupt the wireless signal. This interference can also lead to packet loss and increased buffering. Think about construction work on the road: it slows down the whole traffic.
- Prioritization: In some cases, network providers may prioritize certain types of traffic over others. This prioritization can cause buffer bloat for lower-priority traffic. Network providers may also favor some users compared to others, for instance, users with better plans. Actually, it is a common practice for network providers to deprioritze 5G routers/hotspot over mobile phones. Much like network providers prioritizing certain traffic types, road systems prioritize high-occupancy vehicle lanes and emergency vehicles, potentially causing delays for lower-priority vehicles.
Thus, we understand why cellular connections are very prone to bufferbloat, compared to fiber-optic. This becomes especially noticeable when your connection is saturated. For instance, I cannot download a large file from a server with a high-throughput without rate limiting. Otherwise, my whole network becomes saturated, and unusable.
So, what can we do to mitigate bufferbloat, and make our network usable in every circumstance (apart from switching to optic-fiber 😅) ?
Reducing Bufferbloat over cellular connections
There are a bunch of things that we cannot control, e.g., the prioritization policy of the network provider, or the number of users connected to the cell tower. Yet, there are measures we can take to try to mitigate or reduce bufferbloat. Below are some of these settings:
- Configure Quality of Service (QoS) settings on your router to prioritize critical traffic. This means implementing traffic shaping, and bandwidth control tools to regulate data flows based on categories importance. This allows to minimize latency even during times of heavy data usage.
- Consider using a bufferbloat-aware router or firmware that actively manages buffering to minimize latency: These firmwares are equipped with intelligent algorithms that prioritize critical traffic, dynamically manage buffer sizes, and employ active queue management techniques. The most popular algorithms used in home routers to address buffer bloat are CoDel (Controlled Delay), FQ-CoDel (Fair Queueing Controlled Delay), and SFQ (Stochastic Fair Queuing). More on that in another post.
- If you can, opt for a better 4G/5G plan with sufficient bandwidth and fair-use policy to accommodate your internet usage needs without too much network provider throttling.
Bufferbloat can be a frustrating issue that affects the performance of your internet connection. However, by implementing the strategies we’ve discussed above, such as configuring QoS settings, using bufferbloat-aware routers/firmwares, and employing traffic shaping, you can minimize latency and reduce bufferbloat to a minimum. These measures can lead to a much improved browsing experience. I had to implement these measures at home, or my connection would become pretty much unusable under certain circumstances. And this made my browsing experience much more pleasant 😀.
Below are some interesting resources if you're interested in learning more about Bufferbloat:
Bufferbloat.net - Bufferbloat.net
Bufferbloat is the undesirable latency that comes from a router or other network equipment buffering too much data. The…
https://www.waveform.com/tools/bufferbloat (Test your connection for Bufferbloat)
Bufferbloat: Why it is Harming Your Broadband and How to Easily Fix It | Increase Broadband Speed
Bufferbloat Causes Huge Ping Spikes, Ruining Online Gaming, Browsing and Voice/Video Telephony. Follow Our Free Guide…