From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Date: Fri, 03 Jun 2005 10:43:19 +0000 Subject: Re: [LARTC] How many (htb) tc classes and qdiscs are too many? Message-Id: <42A03447.30306@tlen.pl> List-Id: References: <000501c567bf$792fd700$650fa8c0@hotsitespencer> In-Reply-To: <000501c567bf$792fd700$650fa8c0@hotsitespencer> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Szymon Miotk wrote: > I have P4 3.0 GHz, 1 GB RAM. > I have 3500 potential users (top load about 800 users, average 400). I > have 3 interfaces (2 WAN + 1 LAN), so I have 10500 queues total (3500 on > each interface). > The traffic is 24Mbit max, average 20Mbit. OK... What's wrong? I can only use 4775 filters :/ This is a reslts of my small script... loops: 674 filters: 4718 classes: 2022 loops: 675 filters: 4725 classes: 2025 loops: 676 filters: 4732 classes: 2028 loops: 677 filters: 4739 classes: 2031 loops: 678 filters: 4746 classes: 2034 loops: 679 filters: 4753 classes: 2037 loops: 680 filters: 4760 classes: 2040 loops: 681 filters: 4767 classes: 2043 loops: 682 filters: 4774 classes: 2046 RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel loops: 683 filters: 4781 classes: 2049 RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel RTNETLINK answers: File exists We have an error talking to the kernel loops: 684 filters: 4788 classes: 2052 What's wrong? I need more filters :/ I have 2.6.11.11 kernel with new iproute2, u32 match mark support and IMQ (AB)... Everyone can make theoretically 0xffff (65535) classes and qdiscs on one device. And I think this is true, but I can't add more filters then 4775! :( --- v=1; cnt=0; tc qdisc add dev imq0 root handle 1:0 htb while : [ $v -le 11000 ]; do qu0=`printf "%x\n" $v` qu1=`printf "%x\n" $v` qu2=`printf "%x\n" $((v+1))` qu3=`printf "%x\n" $((v+2))` tc class add dev imq0 parent 1:0 classid 1:$qu1 htb rate 1000Mbit ceil 1000Mbit quantum 1500 tc class add dev imq0 parent 1:$qu1 classid 1:$qu2 htb rate 1kbit ceil 1kbit prio 1 quantum 1500 tc class add dev imq0 parent 1:$qu1 classid 1:$qu3 htb rate 1kbit ceil 1kbit prio 2 quantum 1500 tc qdisc add dev imq0 parent 1:$qu2 sfq tc qdisc add dev imq0 parent 1:$qu3 sfq tc filter add dev imq0 protocol ip parent 1:$qu0 pref 5 u32 match ip dst 192.168.0.5 flowid 1:$qu1 tc filter add dev imq0 protocol ip parent 1:$qu1 pref 6 u32 match ip protocol 6 0xff match ip sport 80 0xffff flowid 1:$qu2 tc filter add dev imq0 protocol ip parent 1:$qu1 pref 6 u32 match ip protocol 6 0xff match ip dport 80 0xffff flowid 1:$qu2 tc filter add dev imq0 protocol ip parent 1:$qu1 pref 6 u32 match ip protocol 17 0xff match ip sport 53 0xffff flowid 1:$qu2 tc filter add dev imq0 protocol ip parent 1:$qu1 pref 6 u32 match ip protocol 17 0xff match ip dport 53 0xffff flowid 1:$qu2 tc filter add dev imq0 protocol ip parent 1:$qu1 pref 6 u32 match ip protocol 1 0xff flowid 1:$qu2 tc filter add dev imq0 protocol ip parent 1:$qu1 pref 7 u32 match ip dst 192.168.0.5 flowid 1:$qu3 let "v=v+3" let "cnt=cnt+1" echo "loops: $cnt filters: $((cnt*7)) classes: $((cnt*3))" done _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc