Hi, I have to share my internet connection (DSL) with several other users and want to set up some kind of traffic shaping, using HTB. Some users do a lot of filesharing (which take almost all available bandwith, leaving nothing for other users), others do online gaming and therefore need guaranteed fast interactive connections, normal traffic then is somewhere in the middle and should be divided between users. The script I''ve come up with so far can be found there: http://www.metamorpher.de/files/ipshape.sh I tried to do the following classes setup: (highest priority first) # Class Layout: # # 1:1 - Line (DSL 768kbit down, 128kbit up) # | # 1:10 \---- Interactive # | | # 1:101 | \---- ping # 1:102 | \---- Gameserver # 1:103 | \---- MUDs # 1:104 | \---- ssh # 1:105 | \---- ... # | # 1:20 \---- Users # | | # 1:201 | \---- User A # 1:2.. | \---- User ... # 1:2XX | \---- User X # | # 1:30 \---- Less Important Traffic # | # 1:301 \---- Filesharing # 1:302 \---- Local Traffic # 1:303 \---- Unknown Traffic I want any class to be able to take over the whole line if no other class is active. Thus, I divided the rate values up (give every class some % of bandwidth), but set all ceil values to maximum. To shape incoming traffic, I attached these classes to the network device through which packets are forwarded to the users. Do you think that approach could work? I don''t quite know myself, because I can hardly find any way to test it properly. My script currently definitely does something, as bandwith is limited. However, I still get lots of (apparently) error messages I can''t get rid of: HTB: quantum of class 20101 is small. Consider r2q change.<4>HTB: quantum of class 20103 is small. Consider r2q change.<4>HTB: quantum of class 20104 is small. Consider r2q change.<4>HTB: quantum of class 20030 is small. Consider r2q change.<4>HTB: quantum of class 20002 is big. Consider r2q change.<7>htb*g j=90219489 HTB: quantum of class 10101 is small. Consider r2q change.<4>HTB: quantum of class 10104 is small. Consider r2q change.<4>HTB: quantum of class 10030 is small. Consider r2q change.<6>HTB init, kernel part version 3.7 Are those critical? I tried a wide variety of values for r2q, but it didn''t help. Any help, opinions and other comments highly appreciated. -- Andreas Klauer <andreas.klauer@metamorpher.de> _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Friday 01 August 2003 16:41, Andreas Klauer wrote:> Hi, > > I have to share my internet connection (DSL) with > several other users and want to set up some kind of > traffic shaping, using HTB. > > Some users do a lot of filesharing (which take almost > all available bandwith, leaving nothing for other users), > others do online gaming and therefore need guaranteed > fast interactive connections, normal traffic then is > somewhere in the middle and should be divided between > users. > > The script I''ve come up with so far can be found there: > http://www.metamorpher.de/files/ipshape.shSome remarks. You define a burst on your 1:1 class. You don''t need this. And make sure that the sum of the rate of child classes = rate of parent class. Also, limit all bandwidth too less then your link bandwidth so YOU are the botleneck Using different prio''s for you htb classes can be tricky. Remove the prio parameters untill you understand what the different prio''s does.> Do you think that approach could work? > I don''t quite know myself, because I can hardly find > any way to test it properly.Yes.> My script currently definitely does something, > as bandwith is limited. However, I still get > lots of (apparently) error messages I can''t get rid of: > > HTB: quantum of class 20101 is small. Consider r2q change.<4>HTB: quantum > of class 20103 is small. Consider r2q change.<4>HTB: quantum of class 20104 > is small. Consider r2q change.<4>HTB: quantum of class 20030 is small. > Consider r2q change.<4>HTB: quantum of class 20002 is big. Consider r2q > change.<7>htb*g j=90219489 HTB: quantum of class 10101 is small. Consider > r2q change.<4>HTB: quantum of class 10104 is small. Consider r2q > change.<4>HTB: quantum of class 10030 is small. Consider r2q change.<6>HTB > init, kernel part version 3.7 > > Are those critical? I tried a wide variety of values for r2q, > but it didn''t help. > > Any help, opinions and other comments highly appreciated.For the quantum problem, see the faq pages on www.docum.org 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/
Am Friday 01 August 2003 17:39 schrieb Stef Coene:> > The script I''ve come up with so far can be found there: > > http://www.metamorpher.de/files/ipshape.shI updated the script.> Some remarks. You define a burst on your 1:1 class. You > don''t need this.I bet there are lots of thinks which I don''t need. I''m not familiar with any of these parameters, mainly I''m just more or less playing around with it. I removed this.> And make sure that the sum of the rate of > child classes = rate of parent class.I tried that. I noticed that I was wrong at one spot, but it should fit now, unless there are some rounding errors (which, hopefully, do not have such a bad impact on things).> Also, limit all bandwidth too less then your link > bandwidth so YOU are the botleneckHow much less would you recommend? I subbed 5% of link bandwith for now.> Using different prio''s for you htb classes can be tricky. > Remove the prio parameters untill you understand what the > different prio''s does.Yes, now that I read the FAQ on your page, I guess my prio values were all to high. They''re all between 0-7 now, I hope thats better. If I understand the prio right, I need them, because I want the interactive connections to take as much bandwidth as they can get, even if the users are quite active themselves too... I also raised their rates. I reckon, though, that these settings still require lots of tweaking...> For the quantum problem, see the faq pages on www.docum.orgI read your FAQ before, and I''m sure I still don''t understand it fully. I use some (mostly randomly chosen) quantum values now, just to make these messages vanish... hopefully they make any sense... Thank you very much for your feedback! -- Andreas Klauer <andreas.klauer@metamorpher.de> _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Friday 01 August 2003 19:28, Andreas Klauer wrote:> Am Friday 01 August 2003 17:39 schrieb Stef Coene: > > > The script I''ve come up with so far can be found there: > > > http://www.metamorpher.de/files/ipshape.sh > > I updated the script. > > > Some remarks. You define a burst on your 1:1 class. You > > don''t need this. > > I bet there are lots of thinks which I don''t need. > I''m not familiar with any of these parameters, mainly I''m just > more or less playing around with it. I removed this. > > > And make sure that the sum of the rate of > > child classes = rate of parent class. > > I tried that. I noticed that I was wrong at one spot, but > it should fit now, unless there are some rounding errors > (which, hopefully, do not have such a bad impact on things). > > > Also, limit all bandwidth too less then your link > > bandwidth so YOU are the botleneck > > How much less would you recommend? > I subbed 5% of link bandwith for now.5% is fine.> > Using different prio''s for you htb classes can be tricky. > > Remove the prio parameters untill you understand what the > > different prio''s does. > > Yes, now that I read the FAQ on your page, I guess my > prio values were all to high. They''re all between 0-7 now, > I hope thats better. If I understand the prio right, I need > them, because I want the interactive connections to take > as much bandwidth as they can get, even if the users are > quite active themselves too... I also raised their rates. > I reckon, though, that these settings still require lots > of tweaking...The problem with low prio (and so higher priority classes) happens when you overlimit the class (sending more data then the rate of the class). If you overlimit it, the latency can be very high.> > For the quantum problem, see the faq pages on www.docum.org > > I read your FAQ before, and I''m sure I still don''t understand > it fully. I use some (mostly randomly chosen) quantum values > now, just to make these messages vanish... hopefully they make > any sense...You need to take r2q so for the lowest rate, rate / r2q > 1500 and for the highest rate, rate / r2q < 60000. This is only for leaf classes (class with no child class). If you don''t find a r2q that can do this, you have to choose the best r2q and overrule the quantum for the classes where the rules are not satisfied You can ignore the quantum errors, but it''s better to make sure they you don''t get them. 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/