Hello, I wrote something yesterday. Now the situation is even worse. Communicatin with some clients wont work at all until i restart the traffic shaping box. (It works for some hours, then suddenly dies (meaning the client cant be pinged. Suspected at peak hours) Maybe the computer resources are weak, maybe its setup faulty It''s a PIII 1.13Ghz, 512mb ram. ~250 users are shaped. From 32kbit/s to 256kbit/s Traffic is to be shaped as following: (1) [ 8 Mbit. In (internet->us) ] `- (2) client 1 . | `` (3) Local Traffic (can borrow from Foreign) | ` (4) Foreign Traffic `- (2) client 2 . | `` (3) Local Traffic (can borrow from Foreign) | ` (4) Foreign Traffic `- (2) client N . `` (3) Local Traffic (can borrow from Foreign) ` (4) Foreign Traffic To achieve the following i have set it up as: # root handle for 8Mbit (1) /sbin/tc qdisc add dev eth2 root handle 1: htb # client class (2) with maximum allowed traffic (256kbit for example) /sbin/tc class add dev eth2 parent 1: classid 1:1 htb rate 256kbit ceil 256kbit # Local traffic (3) class (Local should work at maximum, tho if Foreign is used, it should get 1/4th) # So, Foreign should be 1/4th of Local traffic. # (Is this class correct? Its meant to have 192kbit/s for Local traffic and if Foreign is not used # then it can have 256kbit) /sbin/tc class add dev eth2 parent 1:1 classid 1:2 htb rate 192kbit ceil 256kbit # Foreign traffic (4) class (Not more than 64kbit/s) /sbin/tc class add dev eth2 parent 1:1 classid 1:3 htb rate 64kbit ceil 64kbit # Now I attach SFQ to classes # (to Local traffic class) /sbin/tc qdisc add dev eth2 parent 1:2 handle 1500: sfq perturb 10 # (to Foreign traffic class) /sbin/tc qdisc add dev eth2 parent 1:3 handle 1501: sft perturb 10 # Now add filters # (wont write) # flowid 1:2 # flowid 1:# .. everything repeated for all users. (changing data rate and class IDs) Is there anything wrong with my setup? P.Krumins ____________________________________________________________ Sign up for your Apollo mail account www.e-apollo.lv www.apollo.lv _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Tuesday 10 December 2002 19:48, lartc@e-apollo.lv wrote:> Hello, > > I wrote something yesterday. > Now the situation is even worse. Communicatin with some clients wont work > at all until i restart the traffic shaping box. > (It works for some hours, then suddenly dies (meaning the client cant be > pinged. Suspected at peak hours) > Maybe the computer resources are weak, maybe its setup faultyDo you have any errors in dmesg? And how is the memory and cpu usage ?> It''s a PIII 1.13Ghz, 512mb ram. > > ~250 users are shaped. From 32kbit/s to 256kbit/s > Traffic is to be shaped as following: > > (1) [ 8 Mbit. In (internet->us) ] > `- (2) client 1 . > > | `` (3) Local Traffic (can borrow from Foreign) > | ` (4) Foreign Traffic > > `- (2) client 2 . > > | `` (3) Local Traffic (can borrow from Foreign) > | ` (4) Foreign Traffic > > `- (2) client N . > `` (3) Local Traffic (can borrow from Foreign) > ` (4) Foreign Traffic > > To achieve the following i have set it up as: > > # root handle for 8Mbit (1) > /sbin/tc qdisc add dev eth2 root handle 1: htb > > # client class (2) with maximum allowed traffic (256kbit for example) > /sbin/tc class add dev eth2 parent 1: classid 1:1 htb rate 256kbit ceil > 256kbit > > # Local traffic (3) class (Local should work at maximum, tho if Foreign is > used, it should get 1/4th) > # So, Foreign should be 1/4th of Local traffic. > # (Is this class correct? Its meant to have 192kbit/s for Local traffic and > if Foreign is not used > # then it can have 256kbit) > /sbin/tc class add dev eth2 parent 1:1 classid 1:2 htb rate 192kbit ceil > 256kbit > > # Foreign traffic (4) class (Not more than 64kbit/s) > /sbin/tc class add dev eth2 parent 1:1 classid 1:3 htb rate 64kbit ceil > 64kbit > > # Now I attach SFQ to classes > # (to Local traffic class) > /sbin/tc qdisc add dev eth2 parent 1:2 handle 1500: sfq perturb 10 > > # (to Foreign traffic class) > /sbin/tc qdisc add dev eth2 parent 1:3 handle 1501: sft perturb 10 > > > # Now add filters > # (wont write) > # flowid 1:2 > # flowid 1:# > > .. everything repeated for all users. (changing data rate and class IDs) > > Is there anything wrong with my setup?No. But maye you can create 1 super class (but I don''t think it will change a lot) : root qdisc 1:0 class 1:10 rate = 8mbit = ceil class 1:1 rate = 256 = ceil class 1:2 rate = 192, ceil = 256 class 1:3 rate = 64, ceil = 256 class .... 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/
lartc@e-apollo.lv
2002-Dec-10 21:09 UTC
Re: HTB with SFQ in leaf classes. & setup question
Stef Coene <stef.coene@docum.org>:> On Tuesday 10 December 2002 19:48, lartc@e-apollo.lv wrote: > > Hello, > > > > I wrote something yesterday. > > Now the situation is even worse. Communicatin with some clients wont work > > at all until i restart the traffic shaping box. > > (It works for some hours, then suddenly dies (meaning the client cant be > > pinged. Suspected at peak hours) > > Maybe the computer resources are weak, maybe its setup faulty > Do you have any errors in dmesg? And how is the memory and cpu usage ?Right now (night) the traffic shaping box is not loaded at all 10% cpu usage and 200MB ram used. Tho at the daytime cpu usage goes up to 70% or so. and ~ 500MB ram. Yes there are errors. Dec 10 22:59:28 p1 kernel: NET: 26 messages suppressed. Dec 10 22:59:28 p1 kernel: HTB: bad diff in events, cl=10243 diff=19E26000 now=434192384 then=4294893568 j=1101578 ... Like this. Just before i left work, i left a file d/ling, to test what happens. Right now i cant reach outside world from that computer (128MB with speed of 128kbit/s have downloaded and it has halted). I can reach the computer from the computer where the traffic shaping is being done. But not from a computer which is a hop from traffic shaping computer internet - router1 - traffic_shaping - ... - me 80.81.33.1 is the router1 at the ISP providing us 8mbit like. It cant be reached from the box which was being shaped. me@myplace$ ping 80.81.33.1 PING 80.81.33.1 (80.81.33.1): 56 octets data --- 80.81.33.1 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss Tho it can be reached from box next to me. (my other workstation) me@myotherpc$ ping 80.81.33.1 PING 80.81.33.1 (80.81.33.1): 56 octets data 64 octets from 80.81.33.1: icmp_seq=0 ttl=252 time=62.6 ms 64 octets from 80.81.33.1: icmp_seq=1 ttl=252 time=20.8 ms --- 80.81.33.1 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 20.8/41.7/62.6 ms So there is a problem in the traffic shaping box. Traceroute also stops at the traffic shaping box. Huge problem. Ok, just a second ago i did ''/sbin/tc qdisc del dev eth2 root'' And added the classes again. me@myplace$ ping 80.81.33.1 PING 80.81.33.1 (80.81.33.1): 56 octets data 64 octets from 80.81.33.1: icmp_seq=0 ttl=252 time=24.6 ms 64 octets from 80.81.33.1: icmp_seq=1 ttl=252 time=21.9 ms --- 80.81.33.1 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 21.9/23.2/24.6 ms I can reach ISP''s gateway very smoothly now! Any idee? P.Krumins ____________________________________________________________ Reģistrē un lieto savu Apollo e-pastu www.e-apollo.lv www.apollo.lv _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/