Re: [LARTC] tc filter + bridging + htb -- works only if ip_forward = 0

2004-07-11 Thread Michael Vasilenko
Michael Vasilenko ([EMAIL PROTECTED]) wrote:
> Andrew Athan ([EMAIL PROTECTED]) wrote:
> > 
> > I thought that the below email would be of interest to LARTC readers.  I
> > wasted quite a bit of time tracking down this "feature" (bug?).  Any
> > comments that shed light on this would be appreciated.  In short, "tc
> > filter" + htb + bridging works only with ip_forward off.
> > 
> > Andrew Athan
>  
> 
> tc filter + class + shape htb + sfq works fine for me, but I'm matching
> packets on bridge - br0 interface and build htb classes for input and output on 
> eth0 and eth1 interfaces. And, I agree, tc doesn't show correct statistics in some
> cases. I'm still unable to find out, why.

and ip_forward is "ON"
  
> > ---
> > All:
> > 
> > It seems that Fedora Core 2 (Linux Kernel 2.6)
> > 
> > echo "1" > /proc/sys/net/ipv4/ip_forward
> > 
> > will cause tc filter rules not to work.  I am not sure if this is unique to
> > cases of bridging or if turning ip forwarding on also breaks tc filter rules
> > on "true", non-promiscuous, non-bridged (e.g., eth0) interfaces.  I would
> > assume it would but don't have time to test this case right now (i.e., this
> > is probably not specific to bridging).
> > 
> > A.
> > 
> > -Original Message-
> > 
> > Folks:
> > 
> > I am having trouble making linux-2.6.5-1.358 (Fedora Core 2) configured as a
> > bridge work.  See below.  Wether I set the tc filter's parent as 1: or 1:1
> > or rename 1: to 1:0 and use 1:0 etc I never get any traffic classified in
> > the htb.  If I set a default class, all the traffic ends up in the default
> > class.
> > 
> > This leads me to believe that the u32 classifier simply never matches,
> > although it probably gets the packets.  Perhaps there is a wrong offset or
> > mismatched struct somewhere?  I'd be glad to investigate if pointed in the
> > right direction, I will start by diffing cls_u32.c between linux-2.4.26 and
> > linux-2.6.5 (people have reported there are no issues with packet
> > classification + bridging under linux-2.4).
> > 
> > A.
> > 
> > 
> > # lspci
> > 00:00.0 Host bridge: Intel Corp. 82810E DC-133 GMCH [Graphics Memory
> > Controller Hub] (rev 03)
> > 00:01.0 VGA compatible controller: Intel Corp. 82810E DC-133 CGC [Chipset
> > Graphics Controller] (rev 03)
> > 00:1e.0 PCI bridge: Intel Corp. 82801AA PCI Bridge (rev 02)
> > 00:1f.0 ISA bridge: Intel Corp. 82801AA ISA Bridge (LPC) (rev 02)
> > 00:1f.1 IDE interface: Intel Corp. 82801AA IDE (rev 02)
> > 00:1f.2 USB Controller: Intel Corp. 82801AA USB (rev 02)
> > 00:1f.3 SMBus: Intel Corp. 82801AA SMBus (rev 02)
> > 00:1f.5 Multimedia audio controller: Intel Corp. 82801AA AC'97 Audio (rev
> > 02)
> > 01:0a.0 Ethernet controller: Lite-On Communications Inc LNE100TX (rev 20)
> > 01:0c.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev
> > 78)
> > 
> > #!/bin/bash
> > #
> > # qos Add traffic shaping to eth0
> > #
> > # chkconfig: 2345 86 14
> > # description: Add traffic shaping to eth0
> > #
> > # processname: none
> > 
> > WAN=br0   # external interface
> > LAN=eth1   # internal interface
> > TC=/usr/local/tc
> > 
> > CMD="$1"
> > if [ "$CMD" == "stop" ]
> > then
> >TCOP="del"
> >IPTOP="-D"
> >#iptables -t mangle -D POSTROUTING -o $WAN -j MYSHAPER-OUT 2>
> > /dev/null > /dev/null
> >#iptables -t mangle -F MYSHAPER-OUT 2> /dev/null > /dev/null
> >#iptables -t mangle -X MYSHAPER-OUT 2> /dev/null > /dev/null
> >$TC qdisc del dev ${WAN} root handle 1: htb
> > fi
> > 
> > if [ "$CMD" == "start" ]
> > then
> > brctl addbr br0
> > brctl addif br0 eth0
> > brctl addif br0 eth1
> > ifconfig eth0 0.0.0.0
> > ifconfig eth1 0.0.0.0
> > ifconfig br0 up
> > ifconfig br0 10.100.82.252 netmask 255.255.255.0 broadcast 10.100.82.255
> > up
> > echo "1" > /proc/sys/net/ipv4/ip_forward
> > route add default gw 10.100.82.1
> > 
> > sysctl -w net.core.rmem_max=8388608
> > sysctl -w net.core.wmem_max=8388608
> > sysctl -w net.core.rmem_default=65536
> > sysctl -w net.core.wmem_default=65536
> &g

Re: [LARTC] tc filter + bridging + htb -- works only if ip_forward = 0

2004-07-11 Thread Michael Vasilenko
 ip parent 1: prio 1 u32 match ip
> dport 22 0x flowid 1:30
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> sport 5190 0x flowid 1:30
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> dport 5190 0x flowid 1:30
> #
> ##web
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> sport 80 0x flowid 1:102
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> dport 80 0x flowid 1:102
> ##ftp
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> sport 21 0x flowid 1:102
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> dport 21 0x flowid 1:102
> ##tftp
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> sport 69 0x flowid 1:102
> #$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match ip
> dport 69 0x flowid 1:102
> ##dhcp?
> ##$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match
> ip dst 0.0.0.0/0 flowid 1:10
> ##$TC filter ${TCOP} dev ${WAN} protocol ip parent 1: prio 1 u32 match
> ip dst 0.0.0.0/0 flowid 1:10
> #
> #$TC filter ${TCOP} dev ${WAN} parent 1: prio 2 protocol ip handle 10 fw
> flowid 1:10
> #$TC filter ${TCOP} dev ${WAN} parent 1: prio 2 protocol ip handle 100
> fw flowid 1:100
> #$TC filter ${TCOP} dev ${WAN} parent 1: prio 2 protocol ip handle 101
> fw flowid 1:101
> #$TC filter ${TCOP} dev ${WAN} parent 1: prio 2 protocol ip handle 102
> fw flowid 1:102
> #$TC filter ${TCOP} dev ${WAN} parent 1: prio 2 protocol ip handle 30 fw
> flowid 1:30
> #
> ##TOS min delay
> #$TC filter ${TCOP} dev ${WAN} parent 1: protocol ip prio 3 u32 \
> #  match ip tos 0x10 0xff  \
> #  flowid 1:30
> #
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --dport 5190 -j
> MARK --set-mark 30   # aol instant messenger
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --dport ssh -j
> MARK --set-mark 30# secure shell
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --sport ssh -j
> MARK --set-mark 30# secure shell
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --dport x11 -j
> MARK --set-mark 30# secure shell
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --sport 0:1024 -j
> MARK --set-mark 101 # Default for low port traffic
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --dport 0:1024 -j
> MARK --set-mark 101 # ""
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --sport http -j
> MARK --set-mark 102   # Web
> ##iptables -t mangle -A MYSHAPER-OUT -p tcp --sport https -j
> MARK --set-mark 102   # Web
> ##iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -j MARK --set-mark
> 102  # redundant- mark any unmarked packets as 26 (low prio)
> fi
> 
> if [ "$CMD" = "status" ]
> then
> echo "[qdisc-$WAN]"
> $TC -s qdisc show dev $WAN
> echo "[class-$WAN]"
> $TC -s class show dev $WAN
> echo "[filter-$WAN]"
> $TC -s filter show dev $WAN
> echo "[iptables]"
> iptables -t mangle -L MYSHAPER-OUT -v -x 2> /dev/null
> exit
> fi
> 
> 
> 
> 
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb2 -> htb3 problems

2004-04-07 Thread Michael Vasilenko
Martin Devera ([EMAIL PROTECTED]) wrote:
> > > remove cburst 1
> >
> > thanks!
> >
> > class htb 1:5500 parent 1:2 leaf 5500: prio 0 quantum 65536 rate 5Mbit
> > ceil 5Mbit burst 20Kb/8 mpu 0b cburst 8151b/8 mpu 0b level 0
> >  Sent 45107618 bytes 42138 pkts (dropped 0, overlimits 0)
> >  rate 608617bps 548pps backlog 40p
> >  lended: 42098 borrowed: 0 giants: 0
> >  tokens: 3908 ctokens: -11502
> >
> > but I see only 330Kbytes/sec flow (half of 5Mbit rate)
> 
> >From above I see rate 608617bps = 4.7MBit. Probably it will settle down
> after some while. I suspect there is problem in your way of measuring the
> rate. Also you can deliberately increase (c)burst to more than default,
> say to 20kB - the larger the burst it the more insensitive to CPU load
> it is ...

OK, I removed all manual settings of burst/cburst, and it works just
fine. htb3 rocks! 30%/90% CPU Usage on 80Mbit stream with >500 classes
on htb3/htb2 (P4 2Ghz, 2.4.25 kernel with APIC, e1000 NIC)

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb2 -> htb3 problems

2004-04-06 Thread Michael Vasilenko
devik ([EMAIL PROTECTED]) wrote:
> remove cburst 1

thanks!


class htb 1:5500 parent 1:2 leaf 5500: prio 0 quantum 65536 rate 5Mbit ceil 5Mbit 
burst 20Kb/8 mpu 0b cburst 8151b/8 mpu 0b level 0
 Sent 45107618 bytes 42138 pkts (dropped 0, overlimits 0)
 rate 608617bps 548pps backlog 40p
 lended: 42098 borrowed: 0 giants: 0
 tokens: 3908 ctokens: -11502

class htb 1:1 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
mpu 0b level 7
 Sent 369059 bytes 6711 pkts (dropped 0, overlimits 0)
 rate 5706bps 104pps
 lended: 0 borrowed: 0 giants: 0
 tokens: 8241 ctokens: 8241

class htb 1:2 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
mpu 0b level 7
 Sent 45055458 bytes 42098 pkts (dropped 0, overlimits 0)
 rate 613755bps 549pps
 lended: 0 borrowed: 0 giants: 0
 tokens: 7822 ctokens: 7822

class htb 1:3500 parent 1:1 leaf 3500: prio 0 quantum 131072 rate 10Mbit ceil 10Mbit 
burst 20Kb/8 mpu 0b cburst 14704b/8 mpu 0b level 0
 Sent 369059 bytes 6711 pkts (dropped 0, overlimits 0)
 rate 5833bps 106pps
 lended: 6711 borrowed: 0 giants: 0
 tokens: 12713 ctokens: 9104

but I see only 330Kbytes/sec flow (half of 5Mbit rate)

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb2 -> htb3 problems

2004-04-06 Thread Michael Vasilenko
devik ([EMAIL PROTECTED]) wrote:
> I see you have cburst 0 ! It is not allowed
> and is described in docs. What was commands to
> create the classes ?

 
/sbin/tc.3 qdisc add dev eth0 root handle 1:0 htb default 2500 r2q 100
/sbin/tc.3 class add dev eth0 parent 1:0 classid 1:1 htb rate 200mbit ceil 200mbit 
quantum 20
/sbin/tc.3 class add dev eth0 parent 1:0 classid 1:2 htb rate 200mbit ceil 200mbit 
quantum 20
/sbin/tc.3 class add dev eth0 parent 1:1 classid 1:3500 htb rate 10Mbit ceil 10Mbit 
burst 2048b cburst 1
/sbin/tc.3 qdisc add dev eth0 parent 1:3500 handle 3500: sfq perturb 5
/sbin/tc.3 class add dev eth0 parent 1:2 classid 1:5500 htb rate 20Mbit ceil 20Mbit 
burst 2048b cburst 1 quantum 6
/sbin/tc.3 qdisc add dev eth0 parent 1:5500 handle 5500: sfq perturb 5
/sbin/tc.3 filter add dev eth0 parent 1:0 protocol ip prio 50 handle 3500 fw classid 
1:3500
/sbin/tc.3 filter add dev eth0 parent 1:0 protocol ip prio 50 handle 5500 fw classid 
1:5500



tc.3 -V
tc utility, iproute2-ss020116

> On Tue, 6 Apr 2004, Michael Vasilenko wrote:
> 
> > devik ([EMAIL PROTECTED]) wrote:
> > > > > I suppose the drop you see is CPU bound ? Did you profiled it
> > > > > again ?
> > > >
> > > > No, CPU is about times more in idle state in htb3, and
> > > > 5x lowest data rate. AFAIK, htb3 scheduler is faster, so that is the
> > > > reason of moving to htb3.
> > >
> > > ok then it is config issue probably. you should pin it down
> > > to smallest possible number of classes for test (say up to
> > > 5 classes) and then use tc -s show class ... to see internal
> > > statistics. Look for classes with small (or negative)
> > > tokens or ctokens - these are in throttling state and are
> > > slowing throughtput - then think if it is ok ..
> >
> > ok
> > I'm creating root with 200Mbit
> > and parent with 10Mbit/1Mbit
> >
> >
> > class htb 1:5500 parent 1:2 leaf 5500: prio 0 quantum 131072 rate 10Mbit ceil 
> > 12Mbit burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
> >  Sent 25443954 bytes 17155 pkts (dropped 0, overlimits 0)
> >  rate 143050bps 97pps backlog 25p
> >  lended: 17130 borrowed: 0 giants: 0
> >  tokens: 335 ctokens: -787
> >
> > class htb 1:1 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 
> > 263690b/8 mpu 0b level 7
> >  Sent 482570 bytes 8712 pkts (dropped 0, overlimits 0)
> >  rate 2723bps 49pps
> >  lended: 0 borrowed: 0 giants: 0
> >  tokens: 8241 ctokens: 8241
> >
> > class htb 1:2 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 
> > 263690b/8 mpu 0b level 7
> >  Sent 25406104 bytes 17130 pkts (dropped 0, overlimits 0)
> >  rate 144147bps 98pps
> >  lended: 0 borrowed: 0 giants: 0
> >  tokens: 8195 ctokens: 8195
> >
> > class htb 1:3500 parent 1:1 leaf 3500: prio 0 quantum 13107 rate 1Mbit ceil 1Mbit 
> > burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
> >  Sent 482570 bytes 8712 pkts (dropped 0, overlimits 0)
> >  rate 2739bps 49pps
> >  lended: 8712 borrowed: 0 giants: 0
> >  tokens: 12501 ctokens: -294
> >
> >
> > so, rate is 1,2Mbit
> > and what is meaning of negative ctokens?
> >
> > > >From data you send one can't decide what's bad. In any case
> > > and as I said before, behavioue changed a bit so that results
> > > can be a bit different a may need tc script changes.
> > >
> > > devik
> > >
> > > ___
> > > LARTC mailing list / [EMAIL PROTECTED]
> > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> >
> > --
> > Michael Vasilenko
> >
> >
> 
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb2 -> htb3 problems

2004-04-06 Thread Michael Vasilenko
Michael Vasilenko ([EMAIL PROTECTED]) wrote:
> devik ([EMAIL PROTECTED]) wrote:
> > > > I suppose the drop you see is CPU bound ? Did you profiled it
> > > > again ?
> > >
> > > No, CPU is about times more in idle state in htb3, and
> > > 5x lowest data rate. AFAIK, htb3 scheduler is faster, so that is the
> > > reason of moving to htb3.
> > 
> > ok then it is config issue probably. you should pin it down
> > to smallest possible number of classes for test (say up to
> > 5 classes) and then use tc -s show class ... to see internal
> > statistics. Look for classes with small (or negative)
> > tokens or ctokens - these are in throttling state and are
> > slowing throughtput - then think if it is ok ..
> 
> ok
> I'm creating root with 200Mbit
> and parent with 10Mbit/1Mbit

and qdisc stats (I have sfq attached to each leaf htb class):

 
qdisc sfq 5500: quantum 1514b limit 128p flows 128/1024 perturb 5sec
 Sent 52611108 bytes 35988 pkts (dropped 0, overlimits 0)
 backlog 22p

 qdisc sfq 3500: quantum 1514b limit 128p flows 128/1024 perturb 5sec
 Sent 1004864 bytes 18073 pkts (dropped 0, overlimits 0)

 qdisc htb 1: r2q 10 default 2500 direct_packets_stat 130 ver 3.13
 Sent 53627322 bytes 54191 pkts (dropped 0, overlimits 89908)
 backlog 22p

 
> class htb 1:5500 parent 1:2 leaf 5500: prio 0 quantum 131072 rate 10Mbit ceil 12Mbit 
> burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
>  Sent 25443954 bytes 17155 pkts (dropped 0, overlimits 0)
>  rate 143050bps 97pps backlog 25p
>  lended: 17130 borrowed: 0 giants: 0
>  tokens: 335 ctokens: -787
> 
> class htb 1:1 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
> mpu 0b level 7
>  Sent 482570 bytes 8712 pkts (dropped 0, overlimits 0)
>  rate 2723bps 49pps
>  lended: 0 borrowed: 0 giants: 0
>  tokens: 8241 ctokens: 8241
> 
> class htb 1:2 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
> mpu 0b level 7
>  Sent 25406104 bytes 17130 pkts (dropped 0, overlimits 0)
>  rate 144147bps 98pps
>  lended: 0 borrowed: 0 giants: 0
>  tokens: 8195 ctokens: 8195
> 
> class htb 1:3500 parent 1:1 leaf 3500: prio 0 quantum 13107 rate 1Mbit ceil 1Mbit 
> burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
>  Sent 482570 bytes 8712 pkts (dropped 0, overlimits 0)
>  rate 2739bps 49pps
>  lended: 8712 borrowed: 0 giants: 0
>  tokens: 12501 ctokens: -294
> 
> 
> so, rate is 1,2Mbit
> and what is meaning of negative ctokens?
>  
> > >From data you send one can't decide what's bad. In any case
> > and as I said before, behavioue changed a bit so that results
> > can be a bit different a may need tc script changes.
> > 
> > devik
> > 
> > ___
> > LARTC mailing list / [EMAIL PROTECTED]
> > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> 
> -- 
> Michael Vasilenko

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb2 -> htb3 problems

2004-04-06 Thread Michael Vasilenko
devik ([EMAIL PROTECTED]) wrote:
> > > I suppose the drop you see is CPU bound ? Did you profiled it
> > > again ?
> >
> > No, CPU is about times more in idle state in htb3, and
> > 5x lowest data rate. AFAIK, htb3 scheduler is faster, so that is the
> > reason of moving to htb3.
> 
> ok then it is config issue probably. you should pin it down
> to smallest possible number of classes for test (say up to
> 5 classes) and then use tc -s show class ... to see internal
> statistics. Look for classes with small (or negative)
> tokens or ctokens - these are in throttling state and are
> slowing throughtput - then think if it is ok ..

ok
I'm creating root with 200Mbit
and parent with 10Mbit/1Mbit


class htb 1:5500 parent 1:2 leaf 5500: prio 0 quantum 131072 rate 10Mbit ceil 12Mbit 
burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
 Sent 25443954 bytes 17155 pkts (dropped 0, overlimits 0)
 rate 143050bps 97pps backlog 25p
 lended: 17130 borrowed: 0 giants: 0
 tokens: 335 ctokens: -787

class htb 1:1 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
mpu 0b level 7
 Sent 482570 bytes 8712 pkts (dropped 0, overlimits 0)
 rate 2723bps 49pps
 lended: 0 borrowed: 0 giants: 0
 tokens: 8241 ctokens: 8241

class htb 1:2 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
mpu 0b level 7
 Sent 25406104 bytes 17130 pkts (dropped 0, overlimits 0)
 rate 144147bps 98pps
 lended: 0 borrowed: 0 giants: 0
 tokens: 8195 ctokens: 8195

class htb 1:3500 parent 1:1 leaf 3500: prio 0 quantum 13107 rate 1Mbit ceil 1Mbit 
burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
 Sent 482570 bytes 8712 pkts (dropped 0, overlimits 0)
 rate 2739bps 49pps
 lended: 8712 borrowed: 0 giants: 0
 tokens: 12501 ctokens: -294


so, rate is 1,2Mbit
and what is meaning of negative ctokens?
 
> >From data you send one can't decide what's bad. In any case
> and as I said before, behavioue changed a bit so that results
> can be a bit different a may need tc script changes.
> 
> devik
> 
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb2 -> htb3 problems

2004-04-05 Thread Michael Vasilenko
devik ([EMAIL PROTECTED]) wrote:
> > I need to switch from htb2 to htb3, because of speed issues (for me,
> > htb2 is unable to handle more then 100mbit duplex with ~550 classes),
> > kernel profiling shows htb_dequeue_prio at 1st place with 3x isolation.
> >
> > So, I've moved from 2.4.19 to 2.4.25 kernel (hi-pac for classification/marking
> > and htb3 for queueing), and traffic rate drop from 100 to 20mbit.
> >
> > What can be wrong? The only change I see is htb2 -> htb3
> 
> Hello,
> 
> I suppose the drop you see is CPU bound ? Did you profiled it
> again ?

No, CPU is about times more in idle state in htb3, and 
5x lowest data rate. AFAIK, htb3 scheduler is faster, so that is the
reason of moving to htb3. 

> Both HTB algorithms are very different  so that one can expect
> different behavior with different data/rules. But I can admit
> that this 5x drop is rather big and unfortunate.

any ideas?

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] htb2 -> htb3 problems

2004-04-05 Thread Michael Vasilenko
Hello!

I need to switch from htb2 to htb3, because of speed issues (for me,
htb2 is unable to handle more then 100mbit duplex with ~550 classes),
kernel profiling shows htb_dequeue_prio at 1st place with 3x isolation.

So, I've moved from 2.4.19 to 2.4.25 kernel (hi-pac for classification/marking
and htb3 for queueing), and traffic rate drop from 100 to 20mbit.

What can be wrong? The only change I see is htb2 -> htb3


Here is my qdiscs/classes/filters example

qdisc htb 1: dev eth0 r2q 10 default 2500 direct_packets_stat 4604 ver 3.13
qdisc sfq 100: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
qdisc sfq 3300: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
qdisc sfq 3301: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
qdisc sfq 3302: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
qdisc sfq 3304: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
qdisc sfq 3305: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
qdisc sfq 3306: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
qdisc sfq 3308: dev eth0 quantum 1514b limit 128p flows 128/1024 perturb 5sec
[skip]


class htb 1:1 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
mpu 0b level 7
class htb 1:2 root rate 200Mbit ceil 200Mbit burst 263690b/8 mpu 0b cburst 263690b/8 
mpu 0b level 7
class htb 1:3300 parent 1:1 leaf 3300: prio 0 quantum 13107 rate 1Mbit ceil 1126Kbit 
burst 1023b/8 mpu 0b cburst 0b/8 mpu 0b level 0
class htb 1:3301 parent 1:1 leaf 3301: prio 0 quantum 10240 rate 800Kbit ceil 1Mbit 
burst 1023b/8 mpu 0b cburst 0b/8 mpu 0b level 0
class htb 1:3302 parent 1:1 leaf 3302: prio 0 quantum 13107 rate 1Mbit ceil 1200Kbit 
burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
class htb 1:3304 parent 1:1 leaf 3304: prio 0 quantum 4915 rate 384Kbit ceil 384Kbit 
burst 2Kb/8 mpu 0b cburst 0b/8 mpu 0b level 0
[skip]


filter parent 1: protocol ip pref 50 fw
filter parent 1: protocol ip pref 50 fw handle 0x14b4 classid 1:5300
filter parent 1: protocol ip pref 50 fw handle 0x14b5 classid 1:5301
filter parent 1: protocol ip pref 50 fw handle 0x14b6 classid 1:5302
filter parent 1: protocol ip pref 50 fw handle 0x14b8 classid 1:5304
filter parent 1: protocol ip pref 50 fw handle 0x14b9 classid 1:5305
filter parent 1: protocol ip pref 50 fw handle 0x14ba classid 1:5306
[skip]

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] htb v3 question - quantum and r2q again

2004-04-05 Thread Michael Vasilenko
Hello!

One simple question regaring htb2->htb3 way.
I'm using 2.4.25 kernel with tc3 from Devik's site, RH9.

My data flow is about 100Mbit duplex and is subject to grow, so
I'm creating root class with 200Mbit rate, with r2q=10,

quantum = rate/r2q, and 1500 < quantum < 20 (sch_htb.c)

with such r2q my default shaping window will be from 120Kbit to 16Mbit, right?

So, the question is choosing r2q=10 -> max bandwith for root class=16M,
or it affects only leafs?

-- 
Michael Vasilenko
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/