All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad <kcem@tlen.pl>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] How many (htb) tc classes and qdiscs are too many?
Date: Fri, 03 Jun 2005 10:43:19 +0000	[thread overview]
Message-ID: <42A03447.30306@tlen.pl> (raw)
In-Reply-To: <000501c567bf$792fd700$650fa8c0@hotsitespencer>

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

  parent reply	other threads:[~2005-06-03 10:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 22:07 [LARTC] How many (htb) tc classes and qdiscs are too many? Spencer
2005-06-03  2:55 ` threaded
2005-06-03  6:37 ` Szymon Miotk
2005-06-03 10:43 ` Konrad [this message]
2005-06-03 10:52 ` Paweł Staszewski
2005-06-03 13:57 ` gypsy
2005-06-03 14:19 ` Konrad
2005-06-03 15:10 ` Andy Furniss
2005-06-03 17:39 ` Konrad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42A03447.30306@tlen.pl \
    --to=kcem@tlen.pl \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.