Gael Mauleon wrote:
Hi again,
I keep posting about my problem with HTB ->
http://mailman.ds9a.nl/pipermail/lartc/2005q3/016611.html
I had a go with what you posted there over lan and with 2 tcp streams it
behaves as expected (see below for exact test).
Can you reproduce the failiure shaping over a lan rather than your
internet connection?
If your upstream bandwidth is sold as 2meg then ceil 2000kbit is likely
to be too high.
You could also try specifying quantum = 1500 on all the leafs as you get
it auto calculated from rates otherwise (you can see them with tc -s -d
class ls ...). It didn't affect my test though.
If you are looking at htbs rate counters remember that they use a really
long average (about 100 sec) so they can mislead.
I tested below with two netperf tcp send tests to ips I added to another
PC on my lan.
# /usr/local/netperf/netperf -H 192.168.0.60 -f k -l 60 &
/usr/local/netperf/netperf -f k -H 192.168.0.102 -l 60 &
which gave -
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^3bits/sec
43689 16384 16384 60.09 1884.66
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^3bits/sec
43689 16384 16384 60.22 51.58
The script -
QOSIN=eth0
tc qdisc del dev $QOSIN root &>/dev/null
tc qdisc add dev $QOSIN root handle 1:0 htb
tc class add dev $QOSIN parent 1:0 classid 1:1 htb rate 2000kbit
### SUBCLASS1
tc class add dev $QOSIN parent 1:1 classid 1:10 htb rate 750kbit ceil
2000kbit prio 1
tc class add dev $QOSIN parent 1:10 classid 1:101 htb rate 250kbit ceil
2000kbit prio 1
tc qdisc add dev $QOSIN parent 1:101 handle 101: pfifo limit 10
tc class add dev $QOSIN parent 1:10 classid 1:102 htb rate 250kbit ceil
2000kbit prio 1
tc qdisc add dev $QOSIN parent 1:102 handle 102: pfifo limit 10
tc class add dev $QOSIN parent 1:10 classid 1:103 htb rate 250kbit ceil
2000kbit prio 1
tc qdisc add dev $QOSIN parent 1:103 handle 103: pfifo limit 10
tc filter add dev $QOSIN parent 1:0 protocol ip u32 match ip dst
192.168.0.102 flowid 1:102
###HIGH PRIO ###
tc class add dev $QOSIN parent 1:1 classid 1:50 htb rate 50kbit ceil
2000kbit prio 0 quantum 1500
tc qdisc add dev $QOSIN parent 1:50 handle 50: pfifo limit 10
### LOW PRIO ###
tc class add dev $QOSIN parent 1:1 classid 1:60 htb rate 50kbit ceil
2000kbit prio 5 quantum 1500
tc qdisc add dev $QOSIN parent 1:60 handle 60: pfifo limit 10
tc filter add dev $QOSIN parent 1:0 protocol ip u32 match ip dst
192.168.0.60 flowid 1:60
Andy.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc