Consider a Linux NAT-gateway on an ADSLlink providing internet for a number of users, say, 100 or so. I want to use WRR, perhaps with attached SFQs or similar, to make sure every user get their fair share of download. Atop, at the root, I''ll place a HTB to limit bandwidth to make sure the gw is the bottleneck to make shaping efficient. How do I prioritize packets based on tc filters between the root HTB and the WRR? What I imagine is something like: DEV | --------- | HTB | "Bottleneck" --------- | | -------|-------- / | \ / | \ / | \ ------- ------- -------- | LOW | | MED | | HIGH | "Prio-bands" ------- ------- -------- (HTB, pfifo_fast, PRIO \ | / or the like) \ | / \ | / ---------------- | | ------- | WRR | ------- | | -------|-------- / | \ / | \ / | \ ------- ------- ------- | SFQ | | SFQ | | SFQ | x 100 ------- ------- ------- I''d like to do that to make sure that the system overall favours interactive traffic before "bulk". Games and other latency-dependant traffic types must perform the best on the cost of ftp-download or similar. Attaching pfifo_fast, PRIO or triple (low/medium/high priorities) HTB qdiscs to the root is easy but it seems that it is impossible to attach /one/ WRR afterwards. How do I accomplish what I want to do? -- Mvh. / Best regards, Steen Suder <http://www.suder.dk/> ICQ UIN 4133803 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> I''d like to do that to make sure that the system overall favours > interactive traffic before "bulk". Games and other latency-dependant > traffic types must perform the best on the cost of ftp-download or similar. > > Attaching pfifo_fast, PRIO or triple (low/medium/high priorities) HTB > qdiscs to the root is easy but it seems that it is impossible to attach > /one/ WRR afterwards.What do you mean with WRR? Weighted Round Robin? Or the wrr qdisc? If you want to improve latency for certain traffic, you can create 2 htb classes. One with a lower prio parameter to get low latency and an other class with all other traffic. To give each pc on the network the same opportunity to send something, create 100 sub classes with parent=second class. To get fairness / pc, you can add a sfq to each class. You can do the same for the low prio class. If you don''t care about fairness / pc, you can add 1 esfq qdisc instead of the 100 sub classes. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Wed, Nov 13, 2002 at 07:25:52PM +0100, Stef Coene wrote:> If you want to improve latency for certain traffic, you can create 2 htb > classes. One with a lower prio parameter to get low latency and an other > class with all other traffic. > To give each pc on the network the same opportunity to send something, create > 100 sub classes with parent=second class. To get fairness / pc, you can add > a sfq to each class. You can do the same for the low prio class. If you > don''t care about fairness / pc, you can add 1 esfq qdisc instead of the 100 > sub classes.can you add filters both the parent classes and sub classes so that you put packets into the sub classes by ip address and then into the parent classes by port, packet size, tos, etc.? xn _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Stef Coene wrote:>>I''d like to do that to make sure that the system overall favours >>interactive traffic before "bulk". Games and other latency-dependant >>traffic types must perform the best on the cost of ftp-download or similar. >> >>Attaching pfifo_fast, PRIO or triple (low/medium/high priorities) HTB >>qdiscs to the root is easy but it seems that it is impossible to attach >>/one/ WRR afterwards. > > What do you mean with WRR? Weighted Round Robin? Or the wrr qdisc?The qdisc wrr. It has the possibility to set "penalty" through different weigths.> If you want to improve latency for certain traffic, you can create 2 htb > classes. One with a lower prio parameter to get low latency and an other > class with all other traffic. > To give each pc on the network the same opportunity to send something, create > 100 sub classes with parent=second class. To get fairness / pc, you can add > a sfq to each class. You can do the same for the low prio class. If you > don''t care about fairness / pc, you can add 1 esfq qdisc instead of the 100 > sub classes.I want to make sure that given an assortment of packets containing different kinds of traffic, say game and download, the game packets will be in front of the download packets when they are dequeued from the leafs of the wrr qdisc. The idea was to have all traffic go through the same wrr qdisc. They just had to "reordered" before going to the wrr qdisc. Does that make sense? Partly derived suggestion: DEV | --------- | HTB | "Bottleneck" - needed --------- | | -------| / | / | / | -------- -------- | HS | | BULK | HS = High Speed, low latency -------- -------- Bulk = The rest | | -------- | | SFQ | | Maybe a complementary SFQ? -------- | | | ------- | WRR | wrr qdisc - needed to give ------- instant penalties to heavy | downloaders | -------|-------- / | \ / | \ / | \ ------- ------- ------- | SFQ | | SFQ | | SFQ | x 100 ------- ------- ------- This solution could very well give better performance for the filtered, interactive traffic. I just have to make sure that the volume i HS doesn''t get to big to keep users happy. They''re so picky ;-) -- Mvh. / Best regards, Steen Suder <http://www.suder.dk/> ICQ UIN 4133803 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Wednesday 13 November 2002 20:58, Christian G. Warden wrote:> On Wed, Nov 13, 2002 at 07:25:52PM +0100, Stef Coene wrote: > > If you want to improve latency for certain traffic, you can create 2 htb > > classes. One with a lower prio parameter to get low latency and an other > > class with all other traffic. > > To give each pc on the network the same opportunity to send something, > > create 100 sub classes with parent=second class. To get fairness / pc, > > you can add a sfq to each class. You can do the same for the low prio > > class. If you don''t care about fairness / pc, you can add 1 esfq qdisc > > instead of the 100 sub classes. > > can you add filters both the parent classes and sub classes so that you > put packets into the sub classes by ip address and then into the parent > classes by port, packet size, tos, etc.?You can add filters to the root qdisc or a class. When a filter place a packet in a class, the filters of that class are checked for a match. So you can "stack" filters. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> The qdisc wrr. It has the possibility to set "penalty" through different > weigths.Then you can''t. A qdisc can only have 1 parent.> > If you want to improve latency for certain traffic, you can create 2 htb > > classes. One with a lower prio parameter to get low latency and an other > > class with all other traffic. > > To give each pc on the network the same opportunity to send something, > > create 100 sub classes with parent=second class. To get fairness / pc, > > you can add a sfq to each class. You can do the same for the low prio > > class. If you don''t care about fairness / pc, you can add 1 esfq qdisc > > instead of the 100 sub classes. > > I want to make sure that given an assortment of packets containing > different kinds of traffic, say game and download, the game packets will > be in front of the download packets when they are dequeued from the > leafs of the wrr qdisc. > > The idea was to have all traffic go through the same wrr qdisc. They > just had to "reordered" before going to the wrr qdisc. Does that make > sense?Not really. Imagine you have a ssh packet so it''s placed in the low delay class. But after that, it''s placed in the same class (under the wrr qdisc) with all the other packets, so it has to wait. Bye, bye low delay.> This solution could very well give better performance for the filtered, > interactive traffic. I just have to make sure that the volume i HS > doesn''t get to big to keep users happy.I don''t know if this setup is going to work. I never tried something like that, but in theory it should work. I''m just curious if you will get low delays for the HS class.> They''re so picky ;-)I''m sure you can find a solution so you can keep your users happy :) Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/