Cisco/Linksys E4200 overclocked to 532 MHz

DD-WRT Speed Tweaks: Do they Really Work? 20


For the past few years, I’ve maintained an article on this blog offers my recommendation for the best DD-WRT build and settings to get max speed from a Linksys E4200 router.

One of my recommendations in that article is to use the Administration: Commands tab in the DD-WRT GUI interface to create a start-up script that passes some more advanced tweaks to the router — ones that can’t be controlled through the standard checkboxes, radio buttons, and text fields. I’ve gathered these tweaks from other expert users over time… but DD-WRT tweaking seems to be almost as much art as science, and because I agreed with the fundamental theories behind those settings, I didn’t bother testing them rigorously.

Here is the start-up script I’m currently using on my E4200 router:

sleep 10
wl -i eth1 interference 3
sleep 10
wl -i eth2 interference 3
ifconfig eth0 txqueuelen 2
ifconfig eth1 txqueuelen 2
ifconfig eth2 txqueuelen 2
echo 262144 > /proc/sys/net/core/rmem_max
echo 262144 > /proc/sys/net/core/wmem_max
echo "4096 16384 262144" > /proc/sys/net/ipv4/tcp_wmem
echo "4096 87380 262144" > /proc/sys/net/ipv4/tcp_rmem
echo 1000 > /proc/sys/net/core/netdev_max_backlog
echo 16384 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
echo 16384 > /sys/module/nf_conntrack/parameters/hashsize

Today, however, as I was tinkering with one of my routers, I started to wonder just how effective were those “advanced” settings, and so I decided to do a few tests.

I chose a time of day (on a Saturday morning) when all off the teenagers in the house were either out of the house or asleep, to ensure that no video or audio streaming on the network would mess with my results. I also decided to use my desktop computer, which is hard-wired to the router. This meant that no wireless interference or other WiFi router settings would affect the results, and that this would be a more focused test of the settings’ effect on the router’s wired network speed.

After each tweak, I ran two back-to-back speed tests, one immediately following the other. I’m on a Comcast residental connection, so I used the same Comcast test server (in Seattle) for each test. I got a consistent 12ms ping time for each test.

Checking the Default Settings

Before starting my first test, I deleted my start-up script and rebooted the router. That left me with nothing but the speed tweaks available in the GUI as I recommend them in my article, as well as the default settings for those advanced settings from my start-up script (my router is also overclocked). I ssh’d to the router and checked the default values of those settings:

# cat /proc/sys/net/core/rmem_max
114688

# cat /proc/sys/net/core/wmem_max
114688

# cat /proc/sys/net/ipv4/tcp_wmem
4096 16384 65536

# cat /proc/sys/net/ipv4/tcp_rmem
4096 87380 87380

# cat /proc/sys/net/core/netdev_max_backlog
120

# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
4096

cat /sys/module/nf_conntrack/parameters/hashsize
1024

 Test #1: No Start-Up Script

With the default advanced settings and only the GUI-available speed tweaks, my first test results were:

GUI Only Tweaks - Speed Test 1
GUI Only Tweaks - Speed Test 2

Test #2: First Batch of Tweaks

The first time I published my tweaks, they included only four non-wireless advanced settings. I decided to change those settings first and re-test. I issued these commands to the router:

# echo 262144 > /proc/sys/net/core/rmem_max
# echo 262144 > /proc/sys/net/core/wmem_max
# echo "4096 16384 262144" > /proc/sys/net/ipv4/tcp_wmem
# echo "4096 87380 262144" > /proc/sys/net/ipv4/tcp_rmem

And got the following speed test results:

First Batch of Tweaks -  Test 1
First Batch of Tweaks -  Test 1

Interesting. No significant difference in speed.

Test #3: Second Batch of Tweaks

More recently, I had added a few more recommended tweaks to my article, so I decided to add them next:

echo 1000 > /proc/sys/net/core/netdev_max_backlog
echo 16384 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
echo 16384 > /sys/module/nf_conntrack/parameters/hashsize

I ran my speed tests again:

Second Batch of Tweaks -  Test 1
Second Batch of Tweaks -  Test 2

Again — no significant difference in speed. Hmm…

Test #4: Buffer Bloat Tweaks

After reading some posts on dealing with buffer bloat on DD-WRT, I’d been tinkering with some of those recommended settings. I added one more tweak for the wired connection:

# ifconfig eth0 txqueuelen 2

Here are the speed test results:

Buffer Bloat Tweaks -  Test 1
Buffer Bloat Tweaks -  Test 2

Once again, Again — no significant difference in speed.

Test #5: SEND ALL THE TWEAKS!

I pasted in my full start-up script (including the WiFi interference tweaks) once again and rebooted the router. I ended up running the final test three times because the second result was higher than the previous tests:

Full Script -  Test 1
Full Script -  Test 2
Full Script -  Test 3

Again, same as before… that second result most likely being a temporary burst due to slightly less usage on my neighborhood’s node.

Conclusions?

So what can we conclude from this test? It might be too early to tell for sure, but any of the following is possible:

  • The suggested tweaks do nothing. I hope this isn’t the case, but we have to accept it as a possibility.
  • My current connection isn’t fast enough to take advantage of the tweaks. I’m leaning toward this one, actually. My residental network speeds are usually double what I got today, so maybe Comcast is having network issues (shocker!), or it’s even possible that these tweaks don’t really start flexing their muscles until you get to the 50Mb/s+ level.
  • My PC could be contributing to the results. This is also very possible, so I plan on repeating these tests from my laptop, using a wired connection. I can dual boot the laptop into Windows and Fedora, so I’ll run the tests again in both operating systems to see if that’s contributing, too.

Regardless, I was surprised (and a bit disappointed) at the results. For now, it seems that the settings aren’t doing any harm to my speeds, so I’ll remain optimistic and leave them in place until I get a chance to do more testing. I’ll update this article with my future findings.

Do you use speed tweaks on your DD-WRT router? Have they been effective for you?

Please share your thoughts, questions, comments, and feedback below!