Hi, there! I've been retuning my router for a new home network lately and the demands of the other users are really pushing my traffic shaper to its limits. While we're still able to get fairly reasonable access to web pages and the like, the connection is behaving like a modem for things like SSH and games, not like a 1.5/768 cable line. This script worked fine when I was the only one beating it up, but it seems that it needs a bit more work to handle the new requirements.
The problem is that we are all bandwidth fiends, BitTorrent being the primary culprit. The original approach was to split the connection into three queuing disciplines. Handles 1:1 and 1:2 were SFQ and 1:3 was a TBF with a cap upstream speed at about 80% of our maximum upload capacity. This worked fine until the data really started coming down.
After all, there's not much I can do to regulate the downstream, right? I tried to do so anyway; I started policing traffic leaving my router's internal interface as well, hoping that the remote TCP/IP stack would get the idea when it stopped receiving ACKs and back off a bit. This was less than successful; there was little change.
Then it occurred to me that the ACK packets for the batch connections (BitTorrent, FTP data, etc.) were higher priority than the interactive connection data (data for SSH, Diablo II, etc.). So I created a new, much more complex heirarchy for both interfaces:
Code:
+-------+
| prio |
| 1 |
+-------+
| | |
+---1:1------+ | +---1:3-- (unused)
| 1:2
| |
+-------+ +-------+ +-------+
| prio | | tbf |---12:1---| prio |
| 11 | | 12 | | 121 |
+-------+ +-------+ +-------+
| | | | | |
+-------+ | +---11:3-- (unused) +-------+ | +---121:3-- (unused)
11:1 11:2 | |
| | | |
+-------+ +-------+ +-------+ +-------+
| sfq | | sfq | | sfq | | sfq |
| 111 | | 112 | | 1211 | | 1212 |
+-------+ +-------+ +-------+ +-------+
Interactive ACK as well as SSH were routed to 111. Interactive connections of other kinds were routed to 112. Batch ACK and all SYN were routed to 1211. All other batch was routed to 1212.
If anything, this was
worse, but I don't understand why. My understanding of the "prio" qdisc suggests to me it's a strict priority queue; if interactive data is waiting to be sent, it will go next, regardless of how much batch data there is or how long its been waiting. But no dice.
Has anyone dealt with this before? Does anyone have any suggestions? Moderating the downstream of each individual machine is inefficient as well as impractical, so I'm trying to determine some way to handle this all from the router.
Any advice will be appreciated quite a lot. I've kind of exhausted my list of ideas.
Cheers!