Hi, How do I allocate a guaranteed rate to each individual connection. For example I can allocate, say 1Mb, to all HTTP traffic by defining the appropriate class & filter. In this case, if I have one connection it will get all 1M; if I have 100 then each connection will get ~ 10k. But supposing I want to allocate 10k per individual connection regardless of the number of connections - so if I have only one connection it gets 10k...20 get 20*10k and if I go above 100 any extra connections are dropped. This allows a guaranteed level of service per connection. I cannot see how to achieve this in HTB. Thanks Michael
Sebastian ''spax'' Pape
2002-Sep-09 14:43 UTC
Re: HTB and per-connection bandwidth allocation
hi! imho there''s an iplimit-patch (at patchomatic) - you should be able to limit the numer of connections to 100 with this... just a guess Sebastian -- Sebastian ''spax'' Pape | Better to remain silent and be thought a fool mailto: sebastian@p-a-p-e.de | than to speak and remove all doubt. gpg: http://p-a-p-e.de/gpg.asc | --- Do you want to know more? http://www.p-a-p-e.de/ --- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
try SFQ. devik On Mon, 9 Sep 2002, Michael O''Shea wrote:> Hi, > > How do I allocate a guaranteed rate to each individual connection. > For example I can allocate, say 1Mb, to all HTTP traffic by defining the > appropriate class & filter. In this case, if I have one connection it will > get all 1M; if I have 100 then each connection will get ~ 10k. But supposing > I want to allocate 10k per individual connection regardless of the number of > connections - so if I have only one connection it gets 10k...20 get 20*10k > and if I go above 100 any extra connections are dropped. This allows a > guaranteed level of service per connection. > I cannot see how to achieve this in HTB. > > Thanks > Michael >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Ahh yes .. so that maximum N is fixed in this way ? Hmmm and you then need way to map active connection to free class in HTB for example. It will not be simple because you can''t say when conversation ends (safely). So that you will end with all classes busy. You would have to write it yourself probably - extend iptables connection tracking to maintain table of classids and select classid for new connection and return it when conn is deleted. Then simply copy this number to fwmark ... If you really need this and can''t write it you could ask in lartc list whether someone is willing to write it (for fun or for money). devik On Tue, 10 Sep 2002, Michael O''Shea wrote:> devik, > But this is my problem - I don''t want bw per connection = total/n ... I want > bw per connection = x, where x is a constant fraction of total. So for n > connections total bw utilised = n*x <= total. > rgds, Michael > > -----Original Message----- > From: devik [mailto:devik@cdi.cz] > Sent: 09 September 2002 19:53 > To: Michael O''Shea > Subject: RE: [LARTC] HTB and per-connection bandwidth allocation > > > for n active (backlogged) connection sfq gives > total/n fraction. existence of backlog is > essential ! chech with tc class show whether > htb leaf is backloged during periods you > are interested in. > devik > > On Mon, 9 Sep 2002, Michael O''Shea wrote: > > > devik, > > > > I''ve tried adding sfq qdiscs to the class that governs HTTP but I still > > don''t get the result I want. If I open a single connection, it still gets > > all the bandwidth available for the class. My understanding is that the > > addition of sfq to a class will allow fairness between the individual > > connections (giving each a ''turn'') .. but this does not help with defining > a > > specific rate per connection? > > > > > > Michael > > > > -----Original Message----- > > From: Martin Devera [mailto:devik@cdi.cz] > > Sent: 09 September 2002 17:52 > > To: Michael O''Shea > > Cc: ''lartc@mailman.ds9a.nl'' > > Subject: Re: [LARTC] HTB and per-connection bandwidth allocation > > > > > > try SFQ. > > devik > > > > On Mon, 9 Sep 2002, Michael O''Shea wrote: > > > > > Hi, > > > > > > How do I allocate a guaranteed rate to each individual connection. > > > For example I can allocate, say 1Mb, to all HTTP traffic by defining the > > > appropriate class & filter. In this case, if I have one connection it > will > > > get all 1M; if I have 100 then each connection will get ~ 10k. But > > supposing > > > I want to allocate 10k per individual connection regardless of the > number > > of > > > connections - so if I have only one connection it gets 10k...20 get > 20*10k > > > and if I go above 100 any extra connections are dropped. This allows a > > > guaranteed level of service per connection. > > > I cannot see how to achieve this in HTB. > > > > > > Thanks > > > Michael > > > > > > > > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Devik, Thanks for that...now I have to do some thinking.. Rgds Michael -----Original Message----- From: devik [mailto:devik@cdi.cz] Sent: 10 September 2002 10:25 To: Michael O''Shea Cc: lartc@mailman.ds9a.nl Subject: RE: [LARTC] HTB and per-connection bandwidth allocation Ahh yes .. so that maximum N is fixed in this way ? Hmmm and you then need way to map active connection to free class in HTB for example. It will not be simple because you can''t say when conversation ends (safely). So that you will end with all classes busy. You would have to write it yourself probably - extend iptables connection tracking to maintain table of classids and select classid for new connection and return it when conn is deleted. Then simply copy this number to fwmark ... If you really need this and can''t write it you could ask in lartc list whether someone is willing to write it (for fun or for money). devik On Tue, 10 Sep 2002, Michael O''Shea wrote:> devik, > But this is my problem - I don''t want bw per connection = total/n ... Iwant> bw per connection = x, where x is a constant fraction of total. So for n > connections total bw utilised = n*x <= total. > rgds, Michael > > -----Original Message----- > From: devik [mailto:devik@cdi.cz] > Sent: 09 September 2002 19:53 > To: Michael O''Shea > Subject: RE: [LARTC] HTB and per-connection bandwidth allocation > > > for n active (backlogged) connection sfq gives > total/n fraction. existence of backlog is > essential ! chech with tc class show whether > htb leaf is backloged during periods you > are interested in. > devik > > On Mon, 9 Sep 2002, Michael O''Shea wrote: > > > devik, > > > > I''ve tried adding sfq qdiscs to the class that governs HTTP but I still > > don''t get the result I want. If I open a single connection, it stillgets> > all the bandwidth available for the class. My understanding is that the > > addition of sfq to a class will allow fairness between the individual > > connections (giving each a ''turn'') .. but this does not help withdefining> a > > specific rate per connection? > > > > > > Michael > > > > -----Original Message----- > > From: Martin Devera [mailto:devik@cdi.cz] > > Sent: 09 September 2002 17:52 > > To: Michael O''Shea > > Cc: ''lartc@mailman.ds9a.nl'' > > Subject: Re: [LARTC] HTB and per-connection bandwidth allocation > > > > > > try SFQ. > > devik > > > > On Mon, 9 Sep 2002, Michael O''Shea wrote: > > > > > Hi, > > > > > > How do I allocate a guaranteed rate to each individual connection. > > > For example I can allocate, say 1Mb, to all HTTP traffic by definingthe> > > appropriate class & filter. In this case, if I have one connection it > will > > > get all 1M; if I have 100 then each connection will get ~ 10k. But > > supposing > > > I want to allocate 10k per individual connection regardless of the > number > > of > > > connections - so if I have only one connection it gets 10k...20 get > 20*10k > > > and if I go above 100 any extra connections are dropped. This allows a > > > guaranteed level of service per connection. > > > I cannot see how to achieve this in HTB. > > > > > > Thanks > > > Michael > > > > > > > > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/