Network buffers are too large

February 13, 2011 at 1:16 pm (computers)

I was reading a blog post on bufferbloat a while ago. Pretty much every device your packets go through has a buffer, and with RAM being cheap, most have very large buffers.  This is great if you have one big data stream or if you are on a super fast network (1GE or 10GE) but if you are on a slow network like wireless or broadband this can be a real problem, particularly if you are trying to do more than one thing at  a time. (like surf the web and downloading something over bittorrent).

Based on what I read I decided to try out some of his suggestions on a laptop connected via wireless.  When streaming a huge file,  latency (as measured by ping time) was really high, reducing the txqueuelen helped a lot (I forget how much).  Neither my laptop nor my desktop let me adjust the hardware ethernet ring buffer (ethtool -g interfacename).

At my house, most of my bits go to the internet, they don’t stay within the house so buffering is a problem there as well.  I have set the txqueuelen to 2 (from 1000) to reduce buffering ifconfig eth0 txqueuelen 2

I see a lot on the net about how to increase your buffer size and why you would want to do that, but it is all assuming you have a super high speed network or were written years ago, it really doesn’t apply if you are connecting via wireless or a slow (sub 100MB/S) internet connection.

Permalink Leave a Comment