I just saw this interesting diary entry on traffic shaping: how to
prioritize your network traffic to make interactive sessions more
responsive, etc. I have been wondering how to do this for years
(well, not wondering enough to actually look into it.)
http://www.advogato.org/person/walken/diary.html?start=27
> 10 Dec 2001
>
> Played a bit with traffic shaping over the weekend. I'm on a cable
> modem, and without shaping frames go out of my computer at 10Mbit/s
> and get buffered into the cable modem before they get to the
> 128Kbit/s uplink, which results in very bad lag whenever I upload
> anything.
>
> I had never played with this before, and I was amazed how much it
> helps. Now my telnets never get lagged at all, and the reduced
> latency also seems to help when I do some downloads. If people are
> interested, I would recommand them to use:
>
> "tbf" for the basic shaping - making sure we do not overfill the
> modem's internal buffers. I did that with "tc qdisc add dev eth0
> root handle 1: tbf rate 120kbit burst 2000 mpu 128 limit 100000".
> I would recommend people to use the tbf patch from
>
http://luxik.cdi.cz/~devik/qos/qos.htm - it allows you to put
> additional shaping disciplines "inside" of the tbf shaper. (I dont
> know if its still required if you run 2.4 - I'm still running a 2.2
> kernel)
>
> "prio" works good enough to do the prioritization, based on the
> Type Of Service field of the IP headers. Most linux applications
> set it correctly, so you dont have to scratch your head too hard to
> prioritize your packets. If I was doing a gateway for windows
> machines I guess my life would be harder though. For now, I just
> did "tc qdisc add dev eth0 parent 1:1 handle 2: prio". interactive
> traffic (telnet, ssh) is prioritized over control traffic (dns,
> ping, netscape apparently ends up there too), and the lowest
> priority is bulk data (wget, scp, ftp, fetchmail, ...)
hmm... how about when I back up my computer using rsync over ssh?
I want that to have the lowest possible priority; I wonder how
much trouble that would be.
> "sfq" tries to make the shaping more fair - so that if in the same
> priority band you transfer files to different places at the same
> time, they will get roughly equivalent amounts of bandwidth, even
> if one is far away with more ping delay and stuff. [...]
:
(I haven't tried any of this yet.)
--
Gerald Oskoboiny <
[email protected]>
http://impressive.net/people/gerald/