Packet Pushers

Where Too Much Technology Would Be Barely Enough

  • HOME
  • Podcasts
    • Heavy Networking
    • Priority Queue
    • Network Break
    • Briefings In Brief
    • Datanauts
    • Full Stack
    • IPv6 Buzz
    • Community
  • News
  • Hosts
  • Subscribe
  • Sponsor
  • Contact

IGNITION MEMBERSMEMBER LOGIN

You are here: Home / Podcast / PQ Show 57 – Improve Your Home Internet Performance Using CoDel

PQ Show 57 – Improve Your Home Internet Performance Using CoDel

Ethan Banks October 1, 2015

https://media.blubrry.com/packetpushers/p/content.blubrry.com/packetpushers/PQ_Show_57_-_Improve_Your_Home_Internet_Performance_Using_CoDel.mp3

Podcast: Download | Embed

What is bufferbloat? Bufferbloat describes a buffer that’s so big as to be impractical. Why? After a certain amount of time, delivering a packet is pointless. Two examples come immediately to mind.

  1. A UDP packet for voice traffic is not useful if delivered in an untimely fashion. If the packet arrives hundreds or thousands of milliseconds late, it’s of no value. Therefore, deep buffers are not helpful in this situation.
  2. A TCP packet of any sort will be retransmitted by the sender if the receiver does not acknowledge receipt in a timely fashion. Overly deep buffers that hold a packet after the TCP acknowledgement timer has expired exacerbates the congestion problem. Instead of the packet traversing the congested link once, it’s now traversing the link twice: once after emerging from the deep buffer, and a second time due to the sender’s retransmission. Yuck.

Bufferbloat can occur at any point there is network congestion and a very large buffer configured. Service providers might configure large buffers in their networks to help with SLA compliance. Assuming the SLA is measuring what I would describe as “the wrong things,” packet delivery might take precedence over latency. In that case, an SP might buffer excessively to insure delivery, ignoring the inherent latency introduced by such a scheme.

But, the greatest bufferbloat concerns aren’t deep inside SP networks. Indeed, there are legitimate reasons for a service provider to buffer traffic in their cores — to handle bursts on a typically uncongested link, for instance.

Bufferbloat is felt most painfully in residential routers, where the connection from a fast home WiFi or gigabit Ethernet network meets a cable modem or DSL router with a much slower link to the ISP. Traffic inbound to the residential modem from the faster network can easily overwhelm the slower upstream link.

Large buffers that hold on to packets for hundreds or thousands of milliseconds during moments of congestion cause problems for applications like Skype, gaming, or DNS lookups that are (directly or indirectly) impacted by latency.

The bufferbloat problem is one of queue management — how to decide what gets buffered, for how long, and de-queued in what order. Enterprise network engineers would answer that question with traditional QoS tools like traffic classification, a variety of token bucket algorithms, and tail-drops.

However, Rich Brown, our guest on today’s podcast, points out that standard QoS techniques don’t necessarily resolve the bufferbloat problem. For instance, tail-drop can be useful but doesn’t resolve the problem of a bloated queue. And having a best-effort traffic queue isn’t a wonderful thing for all the traffic actually lumped together into that best-effort queue. Even for best-effort traffic, there’s a user experience to be considered.

The Podcast

Rich Brown chats with Ethan Banks about CoDel, an algorithm specifically designed to minimize the impact of bufferbloat. CoDel is not new. In fact, it’s been baked into the Linux kernel since May 2012. However, CoDel has not impacted the industry significantly as yet. Residential modem manufacturers deliver their products to market on close margins, and upgrading to more modern Linux kernels aren’t high on their list.

So, for the most part, fixing bufferbloat becomes an end user concern. One solution is OpenWrt, which supports CoDel for those consumers willing to use OpenWrt to replace the OS shipped by the vendor.

Rich and Ethan discuss CoDel in quite a bit more detail, explaining how it works, the head-drop principle, sojourn times, TCP ECN, and more. This is a nerdy look at how your modem handles buffering, and how you make your home networking experience better.

The CoDel Demonstration

In this show, Rich demonstrates in real-time how CoDel helps bufferbloat. Using his Skype voice session for us to listen to, he shows how voice quality suffers with a bloated buffer by saturating the link with netperf. Then he enables CoDel on his connection, and the quality improves dramatically. Note – it’s one of the best real-time demonstrations of technology in action I’ve ever heard.

Worth a Visit

Our thanks to Rich Brown for supplying us with many of these links.

  • DSL Reports Speed Test
  • CeroWrt
  • OpenWrt
  • SQM HowTo
  • IETF Draft – FlowQueue CoDel (look at page 4 for an informal summary of the fq_codel algorithm)
  • Rich Brown’s Blog – Random Neurons Firing
  • Cisco PIE vs. fq_codel
  • Bufferbloat and ISP speed test results (dslreports.com)

9 Comments

About Ethan Banks

Co-founder of Packet Pushers Interactive. Writer, podcaster, and speaker covering enterprise IT. Deep nerdening for hands-on professionals. Find out more at ethancbanks.com/about.

Comments

  1. Land of the Cold and North says

    October 2, 2015 at 11:02 pm

    Everyone does speed tests perhaps even your lab. A lot of lab switches can do rate limiting. Want to see this first hand? Make a bandwidth cap of your own. Iperf works in your lab. Try speedtest.net if your ISP has upgraded from barb wire.

    The old Catalyst 3550 can’t do a 5Mb speed test to save its life. The Cat 3560 and 3750 do this based on the link speed of the interface. If that link comes up at 10Mb half your 10% limit won’t work so well.

    Of course if you force the link at 100Mb full you trade one headache for another. But it had less complaints so lets keep forcing 🙂

    The newer Cisco ASIC’s are sometimes fabulous. The bigiron like 6500 have some you wouldn’t mind using yourself.

    Yeah some of these have nice large queues. Hello buffer bloat. Most of this is just trying to a constant speed w/out having to fire up bittorrent. But I am giving Cisco a hard time for something outside their core.

    That DSLAM or similar fairs much better. Their key is simplicity. The whole chassie might have a CPU similar to your home router. Those old clunker’s could never queue up that many packets.

    I do hope that ISP’s will start asking their sales reps about this. I gotta assume that changing the bandwidth cap buffer would be more effective than router next to the cap. Considering CoDel works on time both devices would send similar signals to the hosts.

    After hearing this I will do some playing with my current openwrt router. Upgraded from a PIX last week and need to futz around with it.

    Reply
  2. Bjarne Nilsson says

    October 5, 2015 at 1:44 pm

    Hello Ethan and thanks for a great show
    Several posts onthe Ubigqiti forum seems to indicate that at least the current beta has fq-CoDelso they are working on it

    Reply
  3. Benjamin says

    October 5, 2015 at 4:53 pm

    If anyone is up for it, please add fq_CoDel to FreeBSD. And eventually CAKE. This stuff is magic.

    Reply
    • anon says

      October 5, 2015 at 8:37 pm

      Hi, there is some work to add codel, PIE, fq_codel and fq_PIE to FreeBSD
      http://comments.gmane.org/gmane.os.freebsd.devel.net/47124

      Reply
  4. Matt Bennett says

    October 6, 2015 at 7:45 am

    Great show both!

    I remember using DDWRT with an iproute script to try and stop the wife’s downloads causing me to get shot in Counterstrike. Wasn’t hugely effective and not exactly user-friendly either so it’s good to see a nice straightforward solution is now available, will have to do some reading into codel.

    Haven’t played any games for years now and not bothered with anything similar, will probably be my kids moaning soon, your son will definitely thank you for implementing something similar at home!

    Reply
  5. Rakesh Singh says

    October 19, 2015 at 7:23 am

    Hi Ethan,

    I have a home router setup with DD-WRT. i tested with ‘queueing discipline’ fq_codel and sfq (the packet scheduler being HTB for both)

    i see that fq_codel gives best performances for drop sensitive traffic like VoIP or any uplods in general, but some how it seems to hamper download speeds and latency.

    So my default setup is to have ‘queueing discipline’ set as sfq. And when i have a scheduled VoIP/Video call i change it to fq_codel. Best of both the use cases 🙂

    Reply
    • Ethan Banks says

      October 20, 2015 at 5:01 pm

      I don’t have a router to test with at the moment. But…I’m wondering if the download/latency impact is tied to TCP receive acknowledgments getting head dropped due to too long of a sojourn time when the link is under a load. I never thought to ask Rich if the algorithm looked at TCP ACKs uniquely or not. Then again, you’re saying that just turning on fq_codel is enough to see the issue? Not that the link is stressed?

      Reply
  6. Marcos Vargas says

    June 10, 2018 at 7:51 pm

    What you recommend for gaming?

    Reply
    • Ethan Banks says

      June 11, 2018 at 2:30 pm

      You can give fq_codel a try if your router supports it. FQ_CoDel can’t make the Internet itself faster, but it should help get latency-sensitive gaming packets out of your home router and onto the Internet more quickly.

      That assumes you’ve got upstream congestion, like if you’re seeding on Bittorrent and a lot of people are leeching from you. If you’ve got no congestion, no QoS scheme will make anything faster, because you’re already going as fast as possible. Experiment. Can’t hurt to try things out and see what works.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Email
  • Facebook
  • LinkedIn
  • RSS
  • Twitter
  • YouTube

RSS YouTube

  • A Data Center Down Story February 19, 2019

RSS The Weekly Show

  • Heavy Networking 430: The Future Of Networking With Guido Appenzeller February 15, 2019

RSS Priority Queue

  • PQ 161: Inside Juniper’s Programmable Silicon (Sponsored) December 13, 2018

RSS Network Break

  • Network Break 222: SnapRoute Launches Network OS; Carbonite Buys Webroot February 18, 2019

RSS Briefings In Brief

  • Tech Bytes: Thousand Eyes Shares Lessons Learned From A CenturyLink Outage (Sponsored) February 18, 2019

RSS Datanauts

  • Datanauts 158: Creating, Operating, And Collaborating On Open Source February 13, 2019

RSS Full Stack Journey

  • Full Stack Journey 028: Turning The Mic On Scott Lowe December 18, 2018

RSS IPv6 Buzz

  • IPv6 Buzz 019: IPv6 And Broadband Internet Cable Providers February 7, 2019

RSS The Community Show

  • Day Two Cloud 003: Building And Automating A Private Cloud Underlay February 20, 2019

Recent Comments

  • Martin on Fortinet Stitches New Firewalls Into Its Security Fabric
  • Ethan Banks on BiB 071: SnapRoute CN-NOS For Whitebox Focuses On Operators
  • Glenn Sullivan on BiB 071: SnapRoute CN-NOS For Whitebox Focuses On Operators
  • Ethan Banks on BiB 071: SnapRoute CN-NOS For Whitebox Focuses On Operators
  • Ethan Banks on BiB 071: SnapRoute CN-NOS For Whitebox Focuses On Operators
  • michael marrione on BiB 071: SnapRoute CN-NOS For Whitebox Focuses On Operators

PacketPushers Podcast

  • Heavy Networking
  • Network Break
  • Priority Queue
  • Briefings In Brief
  • Datanauts
  • Full Stack Journey
  • IPv6 Buzz
  • Community Podcast

PacketPushers Articles

  • All the News & Blogs
  • Only the Latest News
  • Only the Community Blogs
  • Virtual Toolbox

Search

Website Information

  • Frequently Asked Questions
  • Subscribe
  • Sponsorship
  • How To Pitch Us
  • Meet the Hosts
  • Terms & Conditions
  • Privacy Policy

Connect

  • Contact PacketPushers
  • Ask Me Anything
  • Subscribe to Podcasts
  • Sponsorship
  • Facebook
  • LinkedIn
  • RSS
  • Twitter
  • YouTube

© Copyright 2019 Packet Pushers Interactive, LLC · All Rights Reserved