From: Gustavo Homem Date: Tue, 11 Jul 2006 02:42:26 +0000 Subject: Re: [LARTC] simple TOS based setup vs more complex ones Message-Id: <20060711024226.GH15607@angulosolido.pt> List-Id: References: <20060710112551.GF2177@angulosolido.pt> In-Reply-To: <20060710112551.GF2177@angulosolido.pt> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hello again Martin, More comments below: > : So the priorities are useless in real world with pfifo_fast, is=20 > : that it? This is bit surprising, IIUC. This is why I asked. >=20 > Priorities are useless in the real world on a link that we expect to=20 > be congested (e.g. an ADSL link). If the link is not congested,=20 > there's no problem with using priorities. The question is not=20 > whether priorities are useless, but rather, how often do you expect=20 > your link to be congested? Good point... and the answer is: allways. With the low DSL uploads available a single connection will saturate it - w= e currently have 20Mbs/400kbps (!) services, for example. >=20 > : What I was initially looking for was just TOS marking + plus=20 > : simple interface throtlling, i.e, the simplest form of shapping.=20 > : If it can't be done with pfifo_fast, my next idea was something=20 > : like: > :=20 > : tc qdisc add dev eth0 root handle 1: htb default 10 > : tc class add dev eth0 parent 1: classid 1:1 htb rate 7000kbps ceil 70= 00kbps > : tc class add dev eth0 parent 1:1 classid 1:10 prio > :=20 > : + > :=20 > : iptables rules for setting TOS values > :=20 > : Is this right? This seems to be similar to what you proposed=20 > : here: > :=20 > : http://mailman.ds9a.nl/pipermail/lartc/2006q2/019138.html >=20 > Well, indeed, I did post that! While that may solve the problem of=20 > the bottleneck, I have to confess, it's not a very good solution=20 > either! I'll post a follow-up to that thread shortly. >=20 Great. Meanwhile, I just finished my first trial on this approach. The result is h= ere: http://downloads.angulosolido.pt/QoS/PRIO_shaper.sh For SSH interactive traffic and Web Browsing while uploading and downloadin= g, seems to work as well as HTB_shaper, it tested on a single machine. Of course there is no fairness on each prio band, so tests with multiple wo= rkstations should reveal the advantadges of HTB_shaper. > : For a not so simple approach but which seems to be working well,=20 > : I have an adaption of Dan Singletary's script here: > :=20 > : http://downloads.angulosolido.pt/QoS/ > : > : It uses directly HTB on both directions, for a setup with only 2=20 > : network interfaces which is very common (no kernel patching is=20 > : needed). >=20 > HTB in both directions is probably the best way to go (shaping=20 > upload and shaping download). I haven't examined the HTB_shaper.sh=20 > assiduously, but from a quick review, it seems quite reasonable=20 > (and better than my off the cuff remark in the earlier thread). >=20 > I'm not crazy about the dropping of the MTU, but otherwise,=20 I found that it was causing problems, so that part is gone. > the=20 > script seems to make sense. Basically divide up link capacity into=20 > components and limit the total transmission rate to the link=20 > capacity (so we are the bottleneck). >=20 > Then, put some packets in each class. It's so far the best (and=20 > most general) solution in this thread. >=20 > : Still, I want to test the simplest possible solution and see how=20 > : far one can go with only a few lines of bash, for both practical=20 > : and pedagogical purposes. I think it's important to have a simple=20 > : solution that works for typical scenarios (2 interfaces, linux=20 > : router with NAT) on stock kernels. ** > : > : ** nothing wrong about patching and compiling kernels, but it=20 > : brings maintenance overhead everytime there is system upgrade=20 > : for whatever reason >=20 > Understood on the kernel patching/compiling business. That's not=20 > usually something you want to throw at beginners. >=20 And I also don't like to throw it at myself, if it's not really necessary. (OT: I wonder, if the kernel team doesn't want to include IMQ, what's their= recommended solution for this problem, on a router with more than 2 interf= aces) > Well, if the goal is practical administration and pedagogy, I'd=20 > suggest tcng [0], since the "beauty" of tc is hidden from the user. =20 > The language of tcng feels more like a programming language than the > arcana of tc. >=20 Thank you for the link. I wasn't aware of this project. Best regards Gustavo --=20 Angulo S=F3lido - Tecnologias de Informa=E7=E3o http://angulosolido.pt > Good luck, >=20 > - -Martin >=20 > [0] http://tcng.sourceforge.net/ >=20 > - --=20 > Martin A. Brown > http://linux-ip.net/ > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (GNU/Linux) > Comment: pgf-0.71 (http://linux-ip.net/sw/pine-gpg-filter/) >=20 > iD8DBQFEswsEHEoZD1iZ+YcRAhwGAJkBlygjpO6dfT9s+1/yHq91pSAJCQCg8E2a > LRjKTkGjSvQHTLaFReomSlk> =3DikoL > -----END PGP SIGNATURE----- _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc