Re: firewall/router with traffic shaping anddial-upfallback?
"Chris Bennett" <[email protected]>
| Newsgroups | gmane.linux.uclinux.actiontec |
|---|---|
| Message-ID | <001401c41114$2f1797f0$050ea8c0@christopmphdfs> |
I'm using a highly customized version of the attached script which is apparently an early offshoot of wondershaper (which is probably a better place for most people to start). It uses HTB (hierarchy token bucket) to prioritize outbound traffic, which is very nice because it guarantees each class of traffic at least its minimum share of the bandwidth, but also lets each class grab up to a specified maximum if more bandwidth happens to be free at any particular time. Thus my outbound low priority HTTP traffic is never completely stalled even when lots of people are playing on my high priority game server, and the full bandwidth will be available for HTTP if no one happens to be playing. Within each class, SFQ (stochastic fairness queueing) is used, which does seem to be a good choice as it prevents any particular connection within a class from dominating things by using a round robin approach (or so the man page says). There is some cool stuff in this script for inbound traffic policing using RED (random early detection), but unfortunately it relies on the so-called imq0 mods which never apparently gained traction and are no longer supported (too bad). Thus for inbound traffic control I'm actually just using a basic ingress qdisc which starts tossing packets wholesale at a certain threshold. This does the trick but its messy and *does* noticeably impact the overall TCP download speed.. but there's really no getting around that when you're trying to control something that, by its nature, isn't exactly under your control. This is the simple inbound control, which does a good job of keeping pings low even if I happen to be downloading a massive bittorrent (I have 1.15mbps SDSL, btw, so notice I have to set the inbound cutoff rate at about half of that to guarantee that there is no inbound lag-inducing packet buffering.. but even with this setting, my inbound traffic often hits 900kbps): tc qdisc add dev eth1 handle ffff: ingress tc filter add dev eth1 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 600kbit burst 10k drop flowid :1 Also, I cut my packet sizes down by a third (ip link set dev eth1 mtu 1000) since latency is more important to me than throughput. ----- Original Message ----- From: "Dr. Craig Hollabaugh" <[email protected]> To: "ActionHack Mailing List" <actionhack-W7/[email protected]> Sent: Tuesday, March 23, 2004 3:06 PM Subject: Re: [actionhack] firewall/router with traffic shaping anddial-upfallback? > On Tue, 2004-03-23 at 14:48, Chris Bennett wrote: > > Anyway, with my traffic shaping scripts I'm able to have several uploads and > > downloads going, continue serving web pages, and *still* maintain 100ms ping > > times for all 22 people playing Americas Army on one of my servers. And it > > all auto-adjusts to make sure the bandwidth is being maximally utilized. > > Very very cool. The only time I ever have latency issues now is when there > > is congestion up the link at my ISP. > > what are you using specifically, token bucket filters? > > __ > ActionHack Mailing List - ActionHack-W7/[email protected] > http://www.express.org/mailman/listinfo/actionhack > http://www.embeddedlinuxinterfacing.com/wiki.php/ActiontecDualModem > __ ActionHack Mailing List - ActionHack-W7/[email protected] http://www.express.org/mailman/listinfo/actionhack http://www.embeddedlinuxinterfacing.com/wiki.php/ActiontecDualModem
shaper
(application/octet-stream, 13.9 KB) - not displayed