A downside of on-line backup services is that they want to suck-up all available bandwidth, so they slow down the entire home network. There are some settings for throttling bandwidth in the backup client itself, but they're primitive and plain don't work that well. It'd be a lot nicer if the router simply did the throttling for me, depending on what the other machines on the LAN are doing. This is what QoS is all-about.
Some time ago I read an excellent article on hacking open-source routers, so I decided to buy a WRT54GL. It turns out that flashing this router with the DD-WRT firmware gives it excellent QoS facilities, far better than what the native firmware can do. Installing the DD-WRT firmware requires some care, but is not difficult. There's something very satisfying about rebooting the router and getting a detailed status page with CPU load averages, and being able to SSH into the router to poke around the file system.
Setting up QoS correctly turns out to be trickier than it seems. First, you have to estimate the uplink and downlink bandwidth that your ISP provides, and tell the router 85% of each. The underlying assumption is that your bandwidth is fairly constant, but the router has to be able to handle spikes, so the 85% gives it a cushion. Since I use DSL, my bandwidth is pretty stable, but for cable customers (where bandwidth is shared by all people in your neighborhood), I imagine that's less likely to be true, so your mileage may vary here.
After this, you have the option to boost the priority of certain traffic sources, and lower the priority of other sources. A traffic source can be:
- A particular application, communicating on a particular port
- One or more specific IPs (or IP masks) on the LAN
- One or more specific MACs on the LAN
- One or more specific ethernet ports on the router
At first sight, it might seem that HTTP traffic can be simply identified as all traffic on port 80. This isn't quite true, given that many websites decide to serve static content off other ports, and it also doesn't handle HTTPS traffic. Fortunately, DD-WRT supports the L7 filter, which attempts to classify the type of traffic by inspecting the packets themselves (for example, this is the L7 pattern that classifies HTTP traffic). This does take a performance penalty since all packets have to be inspected, but is easy, reliable, and headache-free, so I gave it a shot.

The only downside is that, between estimating the maximum bandwidth above, and the performance toll of the L7 filter, this does exact around 15-20% penalty on the overall traffic coming in and out of the network. My DSL service currently has about 2.5 MB up, and 450 KB down. With QoS enabled, I'm seeing around 2.1 MB up and around 360 KB down. This is enough for my needs for now, but I will have to see how it holds up over time.
No comments:
Post a Comment