Archive for August, 2011

Buffer Bloat: Experiment 1

August 11, 2011

Ever since I first saw Jim Getty’s post on testing bufferbloat, I wanted in. But at the time I was living with room mates, and I didn’t feel like taking the router out of our network for testing that had already been done multiple times over.

Now that I’m on my own though, I have a chance to experiment on a clean network without disturbing anyone else’s network throughput. I expect his numbers will be remarkably similar to mine, simply because we both have very similar hardware (revisions of Linksys WRT54, I have the WRT54G).

Experiment 1a:

$ nttcp -t -D -n2048000 nfsserver & ping -n nfsserver 
[1] 5193 
PING nfsserver.lan ( 56(84) bytes of data. 
64 bytes from icmp_req=1 ttl=64 time=0.293 ms 
64 bytes from icmp_req=2 ttl=64 time=48.3 ms 
64 bytes from icmp_req=3 ttl=64 time=91.5 ms 
64 bytes from icmp_req=4 ttl=64 time=140 ms 
64 bytes from icmp_req=5 ttl=64 time=183 ms 
64 bytes from icmp_req=6 ttl=64 time=221 ms 
64 bytes from icmp_req=7 ttl=64 time=222 ms 
64 bytes from icmp_req=8 ttl=64 time=224 ms 
64 bytes from icmp_req=9 ttl=64 time=220 ms 
64 bytes from icmp_req=10 ttl=64 time=222 ms 
64 bytes from icmp_req=11 ttl=64 time=223 ms 
64 bytes from icmp_req=12 ttl=64 time=224 ms 

Experiment 1b:

For the rest of the experiment, I’m just going to use the format that Gettys uses in comment 843.

First tune down the tx ring buffer to 64 as he has done with ethtool -G eth0 tx 256. Then run across multiple txqueuelen values. These can be tuned with ifconfig. For example:

ifconfig eth0 txqueuelen 0 

Here are the numbers in tabular form:

txqueuelen tx-ring RTT 

1000 256 220ms (default - Experiment 1a) 

0 64 2ms 
2 64 3ms 
5 64 10ms 
10 64 45ms 
25 64 110ms 
50 64 190ms 
100 64 210ms 
1000 64 225ms 
10000 64 228ms 

Experiment 1b:

Experiment with a different tx-ring value. Set this with ethtool -G eth0 tx 4096:

txqueuelen tx-ring RTT 

0 4096 130ms 
2 4096 140ms 
5 4096 160ms 
10 4096 180ms 
25 4096 190ms 
50 4096 200ms 
100 4096 225ms 
1000 4096 230ms 
10000 4096 230ms 

Experiment 1d:

Don’t have a Windows or Mac system, and not intending to get either any time soon. By the way, for those that are curious:

$ uname -r 3.0.0-gentoo 


This hardware configuration seems to give very similar results to Gettys results. My results were a little better in general, with the same trend. Also for big buffers my performance seemed to suffer more .We’re both running with Intel cards, and a Linksys WRT-54 variant. If there’s any bit of difference, it’s that I’m using an ancient 3Com NIC in my server, but that didn’t seem to have a huge effect on the tests. Tomorrow I’ll continue with Experiments 2+3, but for now I want to try my new router 🙂

Textinput troubles

August 10, 2011

Those who use dark GTK+ themes in Firefox on Linux have an interesting problem. If a website assumes that you are using a light theme, it may set the text color aspect of the CSS tag but not the background color. Or it might do the reverse. You can find a pretty good summary at

Now, I realize that I’m a small minority of the minority of Linux users that has this problem, so there has to be another solution. In Firefox 4 I tried in vain to disable system colors, because no matter what I did Firefox kept insisting on using system colors. So I found this dark textbox fix, using a Firefox Add-on called Stylish. Oddly enough the “dark textbox” fix defaults your textboxes to white with black text. The basic template gives you enough information to figure it out though, so I modified it a bit:

@namespace url(;
@-moz-document url-prefix(http), url-prefix(file) {

    select {
        color: -moz-FieldText !important;
        background: -moz-Field !important;

This uses the colors that Firefox would use by default, which means if you change themes you won’t have to change the script.

Of course the websites that do a good job of modifing both the text and the background color are always using defaults now, which makes for a lot of design uglyness. For an simple example, here is with simple blue Mist GTK+ theme