Hello Folks..;) Was testing out some practical issues of having 2000-4000 Classes and filters for htb. My testbed for the same is my laptop. * My Dell Lattitude runs RH 9.0 * 2.4.21 Stock kernel from kernel.org Guess this one is a little bit more than queer than the other for the following reasons.... * Till 2000 Classes with 1 u32 Filter per class on my DEV=ETH0 it works fine. * Above 2000 Classes and Filters i have some kernel oops...;) * Machine just stalls / Freezes when i try to run a script adding more than 2000 Classes and Filters. * tc(patched for htb not the standard RH tc) refuses to show any classes / qdiscs numbered > 2000 ( I may be wrong, but this is what i see on me machine) I Simply luv htb, am using it for my cable isp setup in bombay. Also i needed to scale the number of users and this seems to be a hinderance. Lemme know if there is a better workaround for the same. My htb config as as attached and has been drawn up with inputs from stef, Deviks.s docs and the others. Trevor -- ( >- GNU/LINUX, It''s all about CHOICE -< ) /~\ __ trevor@clovertechnologies.com __ /~\ | \) / Pre Sales Consultant - Red Hat \ (/ | |_|_ \ 9820349221(M) | 22881326(O) / _|_| \___________________________________/
Hey, Trevor, [ cut ] : Was testing out some practical issues of having 2000-4000 Classes and : filters for htb. My testbed for the same is my laptop. : : : * My Dell Lattitude runs RH 9.0 : * 2.4.21 Stock kernel from kernel.org [ cut ] My testbed is a Duron@750MHz/256RAM with Debian Sid GNU/Linux, custom kernel 2.4.21 with grsecurity. Tc is also hand compiled. [ cut ] : * Till 2000 Classes with 1 u32 Filter per class on my DEV=ETH0 it works : fine. : * Above 2000 Classes and Filters i have some kernel oops...;) : * Machine just stalls / Freezes when i try to run a script adding more : than 2000 Classes and Filters. : * tc(patched for htb not the standard RH tc) refuses to show any classes : / qdiscs numbered > 2000 ( I may be wrong, but this is what i see on me : machine) [ cut ] I ran your script with no problem at all, at least my machine didnt freeze. ;) The only thing I noticed was an error message, when adding this line: tc class add dev eth0 parent 1:0 classid 1:20010 htb rate 150kbit ceil 150kbit burst 2k cburst 2k quantum 1000 Which I suppose you wanted to be: tc class add dev eth0 parent 1:0 classid 1:2010 htb rate 150kbit ceil 150kbit burst 2k cburst 2k quantum 1000 After changing this line, everything went fine: orange:/temp# time ./final.sh 2> test.txt real 0m26.051s user 0m10.790s sys 0m13.590s [ cut ] : I Simply luv htb, am using it for my cable isp setup in bombay. Also i : needed to scale the number of users and this seems to be a hinderance. : Lemme know if there is a better workaround for the same. My htb config : as as attached and has been drawn up with inputs from stef, Deviks.s : docs and the others. : : Trevor [ cut ] I love working with htg, too. So I greatly appreciate what Martin Devera has done for us. I''m using htb in production for more than a year now with around 2k client ips behind, and it works fine. Also I think Stef Coene has mentioned that he once successfully added 10k classes on a testbed. So long, Nickola
Hey Nickola, Yep, this surely is a feature/bug of tc which deems clarification. Hope someone can come around with a fix for the same. As for your setup, can i humbly request you to send across the script such that i can test the same on my setup.....that is if you don''t mind. Also, i was under the presumtion that flowid was used only when iptables is used to mark these outgoing packets. Since i don''t use iptables i have stuck to plain u32 filters. Lemme know Nickola and i will try changing the classid to flowid and give this one a shot. Any points at optimising the same folks???. Trevor On Mon, 2003-06-23 at 02:47, Nickola Kolev wrote:> Hey again, Trevor, > > [ cut ] > : Thanks for the prompt reply. Am indeed glad that htb scales to my > : enterprise requirements. I have performed tests on my Athlon 1.7Ghz but > : still use my dell latitude for r and d. > > I also changed a bit my testbed, just to overclock the CPU to 863MHz (though > it is the same Duron@750) and to add some 256MB of RAM, which totals 512. > > [ cut ] > : I have tested the same time and again and am convinced this issue needs > : to be clarified on. > > Obviously, and you''ll see I''m backing you later on. > > : * Uptill 2000 U32 Filters and htb classes everything is fine > : * Above 2000....i am very clear that probably htb classes formation > : happens seamlessly but U32 filters stat throwing some stupid errors. > > In my test, tc started throwing errors at u32 filter, attached to classid 2048 > > tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst \ > 192.168.20.48/32 classid 1:2048 > RTNETLINK answers: File exists > > I''m not sure if htb classids (or better u32 classids) are limited to 2048 (dec), > which equals 800(hex). I''m sorry, but I can''t read sources, otherwise I could > peek into Martin Devera''s work to search for an answer. > > : * "RTNETLINK answers: No such file or directory" thrown up for filters > : greater than 2000. Not exactly sure on which number...but very surely > : above 2000. > > In my case, tc answered "RTNETLINK answers: File exists" after adding u32 > classifier to classid 2048. This is probably not the case, because in > my production setup, I have classids much higher than 2048, e.g.: > > tc class add dev eth0 parent $HOME64_CLASS classid 1:14116 htb \ > rate $HOME64_CHILD ceil $HOME64_SPEED burst 12k quantum 1514 > tc filter add dev eth0 protocol ip parent 1:0 prio $HOME64_PRIO u32 \ > match ip dst 10.10.8.79 flowid 1:14116 > tc qdisc add dev eth0 parent 1:14116 handle 14116: sfq quantum 1514b perturb 10 > > here HOME64_CHILD, HOME64_SPEED and HOME64_PRIO are variables, taking > part in the script. > > : Any idea on whats wrong with my setup. Does this necessitate change in > : use of U32 filters. Can this be avoided???. Or am i on the wrong > : track???. > > Keeping in mind I wrote the above, I notice that I''m using a bit > different sintax, i.e. attaching u32 classifiers to "flowid", not to > "classid", as in your setup. But nevertheless, the resulst is a > > RTNETLINK answers: File exists > > : Any pointers towards resolving the same will be appreciated. Am > : attaching the 4000 approx user script along. > > Personally I can''t help, obviously. Am I missing something? I tend to > be erroneous, but this is beyound the scope of my knowledge. ;) > > Martin Devera? Stef Coene? Martin Brown? Leonardo Baliache? > > Well, If I missed someone more deep-in-this-stuff, please, excuse me, > but I would also be very interested in clarifying this.-- ( >- GNU/LINUX, It''s all about CHOICE -< ) /~\ __ trevor@clovertechnologies.com __ /~\ | \) / Pre Sales Consultant - Red Hat \ (/ | |_|_ \ 9820349221(M) | 22881326(O) / _|_| \___________________________________/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hey again, Trevor, [ cut ] : Thanks for the prompt reply. Am indeed glad that htb scales to my : enterprise requirements. I have performed tests on my Athlon 1.7Ghz but : still use my dell latitude for r and d. I also changed a bit my testbed, just to overclock the CPU to 863MHz (though it is the same Duron@750) and to add some 256MB of RAM, which totals 512. [ cut ] : I have tested the same time and again and am convinced this issue needs : to be clarified on. Obviously, and you''ll see I''m backing you later on. : * Uptill 2000 U32 Filters and htb classes everything is fine : * Above 2000....i am very clear that probably htb classes formation : happens seamlessly but U32 filters stat throwing some stupid errors. In my test, tc started throwing errors at u32 filter, attached to classid 2048 tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst \ 192.168.20.48/32 classid 1:2048 RTNETLINK answers: File exists I''m not sure if htb classids (or better u32 classids) are limited to 2048 (dec), which equals 800(hex). I''m sorry, but I can''t read sources, otherwise I could peek into Martin Devera''s work to search for an answer. : * "RTNETLINK answers: No such file or directory" thrown up for filters : greater than 2000. Not exactly sure on which number...but very surely : above 2000. In my case, tc answered "RTNETLINK answers: File exists" after adding u32 classifier to classid 2048. This is probably not the case, because in my production setup, I have classids much higher than 2048, e.g.: tc class add dev eth0 parent $HOME64_CLASS classid 1:14116 htb \ rate $HOME64_CHILD ceil $HOME64_SPEED burst 12k quantum 1514 tc filter add dev eth0 protocol ip parent 1:0 prio $HOME64_PRIO u32 \ match ip dst 10.10.8.79 flowid 1:14116 tc qdisc add dev eth0 parent 1:14116 handle 14116: sfq quantum 1514b perturb 10 here HOME64_CHILD, HOME64_SPEED and HOME64_PRIO are variables, taking part in the script. : Any idea on whats wrong with my setup. Does this necessitate change in : use of U32 filters. Can this be avoided???. Or am i on the wrong : track???. Keeping in mind I wrote the above, I notice that I''m using a bit different sintax, i.e. attaching u32 classifiers to "flowid", not to "classid", as in your setup. But nevertheless, the resulst is a RTNETLINK answers: File exists : Any pointers towards resolving the same will be appreciated. Am : attaching the 4000 approx user script along. Personally I can''t help, obviously. Am I missing something? I tend to be erroneous, but this is beyound the scope of my knowledge. ;) Martin Devera? Stef Coene? Martin Brown? Leonardo Baliache? Well, If I missed someone more deep-in-this-stuff, please, excuse me, but I would also be very interested in clarifying this. -- _____________________________________________________________ So long, and thanks for all the fish. Nickola
On Sun, 2003-06-22 at 20:41, Trevor Warren wrote:> Hey Nickola, > > Yep, this surely is a feature/bug of tc which deems clarification. Hope > someone can come around with a fix for the same. > > As for your setup, can i humbly request you to send across the script > such that i can test the same on my setup.....that is if you don''t mind. > Also, i was under the presumtion that flowid was used only when iptables > is used to mark these outgoing packets. > > Since i don''t use iptables i have stuck to plain u32 filters. Lemme > know Nickola and i will try changing the classid to flowid and give this > one a shot. > > Any points at optimising the same folks???. > > Trevor > > > On Mon, 2003-06-23 at 02:47, Nickola Kolev wrote: > > Hey again, Trevor, > > > > [ cut ] > > : Thanks for the prompt reply. Am indeed glad that htb scales to my > > : enterprise requirements. I have performed tests on my Athlon 1.7Ghz but > > : still use my dell latitude for r and d. > > > > I also changed a bit my testbed, just to overclock the CPU to 863MHz (though > > it is the same Duron@750) and to add some 256MB of RAM, which totals 512. > > > > [ cut ] > > : I have tested the same time and again and am convinced this issue needs > > : to be clarified on. > > > > Obviously, and you''ll see I''m backing you later on. > > > > : * Uptill 2000 U32 Filters and htb classes everything is fine > > : * Above 2000....i am very clear that probably htb classes formation > > : happens seamlessly but U32 filters stat throwing some stupid errors. > > > > In my test, tc started throwing errors at u32 filter, attached to classid 2048 > > > > tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst \ > > 192.168.20.48/32 classid 1:2048 > > RTNETLINK answers: File exists > > > > I''m not sure if htb classids (or better u32 classids) are limited to 2048 (dec), > > which equals 800(hex). I''m sorry, but I can''t read sources, otherwise I could > > peek into Martin Devera''s work to search for an answer. > > > > : * "RTNETLINK answers: No such file or directory" thrown up for filters > > : greater than 2000. Not exactly sure on which number...but very surely > > : above 2000. > > > > In my case, tc answered "RTNETLINK answers: File exists" after adding u32 > > classifier to classid 2048. This is probably not the case, because in > > my production setup, I have classids much higher than 2048, e.g.: > > > > tc class add dev eth0 parent $HOME64_CLASS classid 1:14116 htb \ > > rate $HOME64_CHILD ceil $HOME64_SPEED burst 12k quantum 1514 > > tc filter add dev eth0 protocol ip parent 1:0 prio $HOME64_PRIO u32 \ > > match ip dst 10.10.8.79 flowid 1:14116 > > tc qdisc add dev eth0 parent 1:14116 handle 14116: sfq quantum 1514b perturb 10 > > > > here HOME64_CHILD, HOME64_SPEED and HOME64_PRIO are variables, taking > > part in the script. > > > > : Any idea on whats wrong with my setup. Does this necessitate change in > > : use of U32 filters. Can this be avoided???. Or am i on the wrong > > : track???. > > > > Keeping in mind I wrote the above, I notice that I''m using a bit > > different sintax, i.e. attaching u32 classifiers to "flowid", not to > > "classid", as in your setup. But nevertheless, the resulst is a > > > > RTNETLINK answers: File exists > > > > : Any pointers towards resolving the same will be appreciated. Am > > : attaching the 4000 approx user script along. > > > > Personally I can''t help, obviously. Am I missing something? I tend to > > be erroneous, but this is beyound the scope of my knowledge. ;) > > > > Martin Devera? Stef Coene? Martin Brown? Leonardo Baliache? > > > > Well, If I missed someone more deep-in-this-stuff, please, excuse me, > > but I would also be very interested in clarifying this.-- ( >- GNU/LINUX, It''s all about CHOICE -< ) /~\ __ twarren@redhat.com __ /~\ | \) / Pre Sales Consultant - Red Hat \ (/ | |_|_ \ 9820349221(M) | 22881326(O) / _|_| \___________________________________/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
mm - I''m on holidays just now. Stef, could you test the case whether you can crash it too ?> * Till 2000 Classes with 1 u32 Filter per class on my DEV=ETH0 it works > fine. > * Above 2000 Classes and Filters i have some kernel oops...;) > * Machine just stalls / Freezes when i try to run a script adding more > than 2000 Classes and Filters. > * tc(patched for htb not the standard RH tc) refuses to show any classes > / qdiscs numbered > 2000 ( I may be wrong, but this is what i see on me > machine) > > I Simply luv htb, am using it for my cable isp setup in bombay. Also i > needed to scale the number of users and this seems to be a hinderance. > Lemme know if there is a better workaround for the same. My htb config > as as attached and has been drawn up with inputs from stef, Deviks.s > docs and the others. > > Trevor > > > -- > ( >- GNU/LINUX, It''s all about CHOICE -< ) > /~\ __ trevor@clovertechnologies.com __ /~\ > | \) / Pre Sales Consultant - Red Hat \ (/ | > |_|_ \ 9820349221(M) | 22881326(O) / _|_| > \___________________________________/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello Martin...Stef, I am using tc from the download you provide but iproute2 that comes with RH. Thus i doub''t therez an issue with my setup. Lemme know where according to you the issue is. Am unable to fathom the source of the filter issue. If you desire any clarifications please lemme know. Trevor On Fri, 2003-06-27 at 17:12, devik@cdi.cz wrote:> mm - I''m on holidays just now. Stef, could you test > the case whether you can crash it too ? > > > * Till 2000 Classes with 1 u32 Filter per class on my DEV=ETH0 it works > > fine. > > * Above 2000 Classes and Filters i have some kernel oops...;) > > * Machine just stalls / Freezes when i try to run a script adding more > > than 2000 Classes and Filters. > > * tc(patched for htb not the standard RH tc) refuses to show any classes > > / qdiscs numbered > 2000 ( I may be wrong, but this is what i see on me > > machine) > > > > I Simply luv htb, am using it for my cable isp setup in bombay. Also i > > needed to scale the number of users and this seems to be a hinderance. > > Lemme know if there is a better workaround for the same. My htb config > > as as attached and has been drawn up with inputs from stef, Deviks.s > > docs and the others. > > > > Trevor > > > > > > -- > > ( >- GNU/LINUX, It''s all about CHOICE -< ) > > /~\ __ trevor@clovertechnologies.com __ /~\ > > | \) / Pre Sales Consultant - Red Hat \ (/ | > > |_|_ \ 9820349221(M) | 22881326(O) / _|_| > > \___________________________________/ > >-- ( >- LINUX, It''s all about CHOICE -< ) /~\ __ twarren@redhat.com __ /~\ | \) / Pre Sales Consultant - Red Hat \ (/ | |_|_ \ 9820349221(M) | 22881326(O) / _|_| \___________________________________/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/