From: Ricardo Soria Date: Wed, 17 Nov 2004 22:36:25 +0000 Subject: Re: [LARTC] SEPARATING VOIP AND SURFING Message-Id: <20041117223625.38463.qmail@web41526.mail.yahoo.com> List-Id: References: <20041109175203.11372.qmail@web41524.mail.yahoo.com> In-Reply-To: <20041109175203.11372.qmail@web41524.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org > Jason Boxman wrote: > > On Monday 15 November 2004 20:06, Ricardo Soria > wrote: > > > >=20 > >>Dear Andy: > >> > >>Very thanks for your answer. However, I need a > little > >>bit more extended explanation. > >> > >>First, you say that I should "back off more from > link > >>speed - total ceils to about 80% and share that > >>between interactive and bulk". So, do you mean > that > >>if I have a total 512Kbit link, and 2 child > classes, I > >>should not divide the whole 512kbit between the 2 > >>classes, but, I should only divide 410kbit between > >>them, and share the remaining 102kbit between > them?? > >>Or do you mean I should only consider 410kbit as > the > >>whole link capacity?? > >=20 > >=20 > > I think he meant to treat your link as if it were > only 410kbit. With some=20 > > testing you can verify just how close to 100% of > your advertised capacity you=20 > > can get, but 80% is often a good place to start. >=20 > Yes that's what I meant. For uplink it's to allow > for link overheads and=20 > with dsl you should be careful about tweaking as it > may be OK at 90% in=20 > a test with bulk traffic - all MTU size packets, but > if there are lots=20 > of small packets the overhead miscalculations may > mean well over limits=20 > at 90%. You can fix this, but not perfectly, with a > patch Ed Wildgoose=20 > sent to this list. >=20 > Incoming traffic is different - your queue is at the > wrong end of the=20 > link. You have to set a lower limit just to have a > queue at all. >=20 1. So, starting at 80% of total 512kbit bandwidth (410kbit), there would be a waste of 102kbit. Is this completely necessary?? I think this is to ensure I have the queue on my side, and the queue is not on the side of the ISP. But, I fell tempted to think that 102kbit is too much for this purpose, considering that I really have 512kbit all time. What would you finally recommend ?? >=20 > >=20 > >=20 > >>Second, you say that I should not use SFQ as a > >>sub-qdisc, because of the lenght of the queue, > being > >>it ESFQ (new for me) a better choice. But later, > you > >>say I should use SFQ for bulk traffic (I think you > >>refer surfing as "bulk", and voip as > "interactive"). > >>So, should I use SFQ for bulk classes and ESFQ for > >>interactive classes ?? Or, should I use ESFQ for > all > >>leaf classes?? Or, should I use ESFQ for bulk > classes > >>and default (pfifo, I think) for interactive > classes?? >=20 > What I meant was you could either change the sfq > queue length or use=20 > esfq, which lets you choose length (and more). >=20 > In practise you setup HTB so that your interactive > traffic - doesn't=20 > queue - yes you can attach what ever you like to > it's class - and (e)sfq=20 > would be OK, but if packets actually get queued in > it you marking has=20 > failed and bulk got in or you really have run out of > bandwidth. >=20 2. Could you please tell me a secure and trustworthy way to know if I am having queued packets under this class?? > The point I made was that you shouldn't really send > a mix of traffic to=20 > SFQ which will still cause long delays at low > bitrates and your users=20 > have potentially low rates (depends on what they > do). >=20 3. I am creating 2 different htb classes, one for interactive, and another for bulk, and also, 2 different sfq inferior classes, one for each service.=20 What else can I do to avoid sending a "mix of traffic" ?? > I would do a bit more work to priorotise dns/empty > acks/small tcp etc.=20 > as well as VOIP, then give them a class with plenty > of rate spare and=20 > make bulk borrow. This would mean that each user > would notice a bit less=20 > the fact they have hardly any bandwidth (if that's > the case). >=20 4. If you still have a copy of my script, you can see I am giving "prio 0" to interactive classes, and "prio 1" to bulk classes. I also tested giving prio 0 and prio 1 at filters setup (and also, prio 1 to everybody, I am not so sure what worked better). What else can I do to emphasize interactive traffic priority?? > Choosing a queue length should really be related to > link speed - but you=20 > can't do this if you have lots of queues whose rate > are variable. What=20 > to choose depends on typical and I suppose worst > case traffic situation=20 > for your LAN. >=20 > Alternatly if you were prepared to patch and use > esfq you could use it=20 > to roughly share traffic by IP address - which is > nice to save you=20 > marking and because you are able to set the queue > length for the link.=20 > You do though, loose fairness per connection which > may not affect you -=20 > again it depends on usage P2P. bittorrent etc. >=20 >=20 > >=20 > >=20 > > I am curious about this myself. I placed a > default sfq qdisc with the 128=20 > > queue default on a p2p class that had a rate of > 144kbit and it routinely=20 > > spiked to about 150kbit several times a second.=20 > If I use pfifo with a queue=20 > > length of 10 I find my utilization for that class > at around 146kbit instead. =20 > > Is it the queue length causing this behavior? > >=20 >=20 > I think these differences are too small to be > representative. One packet=20 > could add 12kbit to a counter instantaneously and > how you measure can=20 > decieve. For one really low rate class the way HTB > uses DRR to even out=20 > fairness for different sized packets could, I think > cause short term=20 > variations. P2P traffic is mixed packet size and > quite variable=20 > depending on peers - so recreating behavior for > tests may be hard. I=20 > don't think queue length is involved here. >=20 > Andy. >=20 >=20 > --__--__-- Sorry for the annoyances, very thanks in advance. Ricardo. _________________________________________________________ Do You Yahoo!? Informaci=F3n de Estados Unidos y Am=E9rica Latina, en Yahoo! Noticias. Vis=EDtanos en http://noticias.espanol.yahoo.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/