From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-2?Q?Tak=E1cs=20B=E1lint?= Date: Sat, 31 Aug 2002 22:59:38 +0000 Subject: [LARTC] HTB shares equally when borrowing enabled :( Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi, I'm fighting seriously with a most simple HTB setup. I'd like to share=20 the incoming 64kbps into 5 and 59 for two different machines under NAT.=20 HTB seems to hold the required limits when ceil is not set (no=20 borrowing), but when borrowing enabled it seems to share equally rather=20 then keeping the specified ratio. My setup is below. A typical output of "tc -s -d qdisc show dev eth1"=20 and "tc -s -d class show dev eth1" is given. HTB seems to disobey the=20 specified rate (last entry: rate 40Kbit is set for 1:10 and 16466bps is=20 measured, while rate 472Kbit is set for 1:11 and rate 20755bps is=20 measured). Setting the explicit bandwith (ceildkbps everywhere) does not work.=20 Playing with burst and cburst did not any change. I've tried CBQ but it seems to do the same... :( Please help. Thank you, B=E1lint #################################### # add root HTB disc run_tc qdisc add dev eth1 root handle 1: htb default 11 r2q 1 # be optimistic about input rates :) run_tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit # setup classes for the local nodes run_tc class add dev eth1 parent 1:1 classid 1:10 htb rate 5kbps ceil=20 10mbit prio 2 run_tc class add dev eth1 parent 1:1 classid 1:11 htb rate 59kbps ceil=20 10mbit prio 1 # create leaves run_tc qdisc add dev eth1 parent 1:10 sfq perturb 10 run_tc qdisc add dev eth1 parent 1:11 sfq perturb 10 # setup filtering rules : packets going to 192.168.1.2 will go into=20 class 1:10 run_tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip=20 dst 192.168.1.2 flowid 1:10 ################################ # tc -s -d qdisc show dev eth1 qdisc sfq 8002: quantum 1514b limit 128p flows 128/1024 perturb 10sec Sent 3401706 bytes 2650 pkts (dropped 0, overlimits 0) qdisc sfq 8001: quantum 1514b limit 128p flows 128/1024 perturb 10sec Sent 2039284 bytes 1363 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 1 default 11 dcache 0 deq_util 1/1000000 deq_rate 5 trials_per_deq 0 dcache_hits 0 direct_packets 0 Sent 5440990 bytes 4013 pkts (dropped 0, overlimits 0) ################################ # tc -s -d class show dev eth1 class htb 1:11 parent 1:1 leaf 8002: prio 1 rate 472Kbit ceil 10Mbit=20 burst 2203b/8 mpu 0b cburst 14704b/8 mpu 0b quantum 60000 level 0 Sent 3284592 bytes 2545 pkts (dropped 0, overlimits 0) rate 20755bps 15pps lended: 2545 borrowed: 0 giants: 0 injects: 0 tokens: 28909 ctokens: 9147 class htb 1:1 root prio 0 rate 10Mbit ceil 10Mbit burst 14704b/8 mpu 0b=20 cburst 14704b/8 mpu 0b quantum 60000 level 3 Sent 5140628 bytes 3786 pkts (dropped 0, overlimits 0) rate 37374bps 26pps lended: 888 borrowed: 0 giants: 0 injects: 0 tokens: 9147 ctokens: 9147 class htb 1:10 parent 1:1 leaf 8001: prio 2 rate 40Kbit ceil 10Mbit=20 burst 1650b/8 mpu 0b cburst 14704b/8 mpu 0b quantum 5120 level 0 Sent 1856036 bytes 1241 pkts (dropped 0, overlimits 0) rate 16466bps 10pps lended: 353 borrowed: 888 giants: 0 injects: 0 tokens: -71171 ctokens: 8247 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/