Bufferbloat on Packet Pushers

Back in October, I had the pleasure of chatting with Ethan Banks on the Packet Pushers podcast.

In it, we talked about the definition of bufferbloat, and how it harms the performance of VoIP, gaming, and general internet use. (It’s the reason our children say, “The internet is slow today, Daddy.”) I also described how the CoDel algorithm, and its fq_codel implementation in Linux makes the problem go away.

The most fun was the CoDel demonstration, which occurs near the end of the podcast. The podcast was recorded over Skype. When I turned on many netperf upload and download sessions to fully load my 7mbps/768kbps DSL link, the quality degraded without fq_codel. But it bounced right back when I re-enabled it.

Listen to the podcast – PQ Show 57 – Improve Your Home Internet Performance Using CoDel

One Response

  1. I got a question from a listener:

    I listened to your CoDel podcast on packetpushers and enjoyed it. Thanks.

    I had a question. Of course queues only build up when/where there is congestion. My router has an ethernet cable to my cable modem. Presumably 100M. This would, I assume put the congestion point at the modem rather than the router.

    Is there pushback (xon/xoff?) from the cable modem so the router sees the congestion rather than the modem?

    Thanks for the note. I’m glad you enjoyed the podcast.

    The pushback is built into the router’s CoDel/fq_codel implementation. fq_codel is a linux qdisc that handles packets going through it. It is designed to:

    • separate flows into their own queues
    • monitor the sojourn time for each packet in a queue (that is, the time a packet stays in the queue before being sent)
    • let short packets, or sparse flows “go right through” because they don’t dwell in the queue for a long time
    • and offer flow control/pushback for flows where the sojourn time exceeds a given short “target” time (generally around 5 msec)

    That pushback comes by dropping a certain percentage of packets whose sojourn time exceeds the target, or by setting the ECN bit on those packets to indicate that the session is beginning to be congested.

    You configure fq_codel by setting its upload and download parameters to a few percent lower than the real bottleneck speed (generally your DSL/Cable modem’s up/down speeds). fq_codel then computes the appropriate target time, and does its magic.

    What’s cool about fq_codel is that it works in both directions. It’s clear how it can keep your upload from being overbuffered/bloated, since it directly controls the amount of queueing. But fq_codel also solves the download problem, even though the bloat would occur in your ISP’s router. It does this by becoming the bottleneck for download, since its speed is set to a few percent lower than the actual download speed. It then controls those download queues in a similar manner.

Leave a Reply