All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] problem with htb rates | small rates question
@ 2003-07-15 13:18 Arkadiusz Miskiewicz
  2003-07-15 16:54 ` Atahualpa Jones
  2003-07-16 19:06 ` Arkadiusz Miskiewicz
  0 siblings, 2 replies; 3+ messages in thread
From: Arkadiusz Miskiewicz @ 2003-07-15 13:18 UTC (permalink / raw)
  To: lartc

Hi,

I'm using 2.4.20 kernel with htb updated to match htb from 2.4.21 +
patches on devik's page.

My setup is simple:
192.168.0.134(LAN machine)--eth0-linuxRT-ppp0 (adsl, pppoe involved)
192.168.0.234(LAN machine)+

tc qdisc add dev eth0 root handle 1:0 htb default 22 r2q 1
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 506kbit ceil 506kbit quantum 10000
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 98494kbit ceil 98494kbit prio 9
tc qdisc add dev eth0 parent 1:3 sfq perturb 10

tc class add dev eth0 parent 1:2 classid 1:21 htb rate 128kbit ceil 506kbit prio 2 quantum 1000
tc qdisc add dev eth0 parent 1:21 sfq perturb 10
tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 192.168.0.134 flowid 1:21

tc class add dev eth0 parent 1:2 classid 1:22 htb rate 384kbit ceil 506kbit prio 2 quantum 1000
tc qdisc add dev eth0 parent 1:22 sfq perturb 10

Wihtout any qdisc on eth0 I'm able to download (lftp on .134 machine)
from some host in internet with about 55 kbyte/s speed.

After setting htb as described above when downloading something from my
linuxRT .134 machine gets whole bandwidtch. When I start downloading
something from linuxRT at that time to machine .234 bandwidtch is
distributed between these machines correctly (.134 gets 13Kbyte/s
and .234 gets 43 Kbyte/s). So far everything ok.

Stats for this:
[root@router root]# tc -s class show dev eth0
class htb 1:22 parent 1:2 leaf 8023: prio 2 rate 384Kbit ceil 506Kbit
burst 2090b cburst 2246b
 Sent 8308169 bytes 5829 pkts (dropped 0, overlimits 0)
 rate 49167bps 34pps backlog 12p
 lended: 5817 borrowed: 0 giants: 0
 tokens: -44078 ctokens: -9826

class htb 1:2 root rate 506Kbit ceil 506Kbit burst 2246b cburst 2246b
 Sent 11417717 bytes 8765 pkts (dropped 0, overlimits 0)
 rate 65549bps 51pps
 lended: 168 borrowed: 0 giants: 0
 tokens: -1715862 ctokens: -1715862

class htb 1:3 root leaf 8021: prio 7 rate 98494Kbit ceil 98494Kbit burst
127648b cburst 127648b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 8295 ctokens: 8295

class htb 1:21 parent 1:2 leaf 8022: prio 2 rate 128Kbit ceil 506Kbit
burst 1762b cburst 2246b
 Sent 3159260 bytes 2976 pkts (dropped 0, overlimits 0)
 rate 16368bps 17pps backlog 28p
 lended: 2780 borrowed: 168 giants: 0
 tokens: -157002 ctokens: -11444


Same test but downloading from some internet machine.
no qdisc on eth0, inet->.134 download with 55 Kbyte/s speed
added qdisc as above, inet->.134 with ~20 Kbyte/s (if I remove
qdisc then I get back about 55 Kbyte/s)
added qdisc, .134 is downloading already, .234 starts downloading
and both are downloading with almost same speed 12-17 Kbyte/s

[root@router root]# tc -s class show dev eth0
class htb 1:22 parent 1:2 leaf 8026: prio 2 rate 384Kbit ceil 506Kbit
burst 2090b cburst 2246b
 Sent 4365142 bytes 3520 pkts (dropped 0, overlimits 0)
 rate 19243bps 14pps
 lended: 3207 borrowed: 313 giants: 0
 tokens: 19650 ctokens: 16885

class htb 1:2 root rate 506Kbit ceil 506Kbit burst 2246b cburst 2246b
 Sent 9911365 bytes 9904 pkts (dropped 0, overlimits 0)
 rate 32818bps 31pps
 lended: 3470 borrowed: 0 giants: 0
 tokens: 27004 ctokens: 27004

class htb 1:3 root leaf 8024: prio 7 rate 98494Kbit ceil 98494Kbit burst
127648b cburst 127648b
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 8295 ctokens: 8295

class htb 1:21 parent 1:2 leaf 8025: prio 2 rate 128Kbit ceil 506Kbit
burst 1762b cburst 2246b
 Sent 5546223 bytes 6384 pkts (dropped 0, overlimits 0)
 rate 12899bps 17pps
 lended: 3227 borrowed: 3157 giants: 0
 tokens: 82550 ctokens: 27004


What is going on here? :/


Also what's better for really small rates like 1kbit, 5kbit? cbq or htb?
-- 
Arkadiusz Mi¶kiewicz     CS at FoE, Wroclaw University of Technology
arekmatssedotpl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] problem with htb rates | small rates question
  2003-07-15 13:18 [LARTC] problem with htb rates | small rates question Arkadiusz Miskiewicz
@ 2003-07-15 16:54 ` Atahualpa Jones
  2003-07-16 19:06 ` Arkadiusz Miskiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: Atahualpa Jones @ 2003-07-15 16:54 UTC (permalink / raw)
  To: lartc

----- Original Message ----- 
From: "Arkadiusz Miskiewicz" <misiek@pld.org.pl>
To: "LARTC" <lartc@mailman.ds9a.nl>
Sent: Tuesday, July 15, 2003 5:17 PM
Subject: [LARTC] problem with htb rates | small rates question


> Hi,
>
> I'm using 2.4.20 kernel with htb updated to match htb from 2.4.21 +
> patches on devik's page.
>
> My setup is simple:
> 192.168.0.134(LAN machine)--eth0-linuxRT-ppp0 (adsl, pppoe involved)
> 192.168.0.234(LAN machine)+
>
> tc qdisc add dev eth0 root handle 1:0 htb default 22 r2q 1
> tc class add dev eth0 parent 1:1 classid 1:2 htb rate 506kbit ceil 506kbit
quantum 10000
> tc class add dev eth0 parent 1:1 classid 1:3 htb rate 98494kbit ceil
98494kbit prio 9
> tc qdisc add dev eth0 parent 1:3 sfq perturb 10

Its just a guess but are you sure this works? parent 1:1? where is the class
with classid 1:1? What are these classes children of?

try it with this setting, it should do the same:
tc qdisc add dev eth0 handle 1:0 root htb default 11
tc class add dev eth0 parent 1:0 classid 1:1 rate 512kbit ceil 512kbit  #
128+384 = 512
tc class add dev eth0 parent 1:1 classid 1:10 rate 128kbit ceil 512kbit
tc qdisc add dev eth0 handle 2:0 parent 1:10 sfq perturb 10
tc class add dev eth0 parent 1:1 classid 1:11 rate 384kbit ceil 512kbit
tc qdisc add dev eth0 handle 3:0 parent 1:11 sfq perturb 10
tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 192.168.0.134
flowid 1:10

In your config it shows you have two root classes (in your output). I dont
know if this affects anything, but I do not think this is desired. Let me
know if the setting above worked.

Andreas

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] problem with htb rates | small rates question
  2003-07-15 13:18 [LARTC] problem with htb rates | small rates question Arkadiusz Miskiewicz
  2003-07-15 16:54 ` Atahualpa Jones
@ 2003-07-16 19:06 ` Arkadiusz Miskiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: Arkadiusz Miskiewicz @ 2003-07-16 19:06 UTC (permalink / raw)
  To: lartc

On/Dnia Tue, Jul 15, 2003 at 06:54:30PM +0200, Atahualpa Jones wrote/napisa³(a)

> Its just a guess but are you sure this works? parent 1:1? where is the class
> with classid 1:1? What are these classes children of?
Weird but there is no class 1:1.

> try it with this setting, it should do the same:
> tc qdisc add dev eth0 handle 1:0 root htb default 11
> tc class add dev eth0 parent 1:0 classid 1:1 rate 512kbit ceil 512kbit  #
> 128+384 = 512
> tc class add dev eth0 parent 1:1 classid 1:10 rate 128kbit ceil 512kbit
> tc qdisc add dev eth0 handle 2:0 parent 1:10 sfq perturb 10
> tc class add dev eth0 parent 1:1 classid 1:11 rate 384kbit ceil 512kbit
> tc qdisc add dev eth0 handle 3:0 parent 1:11 sfq perturb 10
> tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 192.168.0.134
> flowid 1:10
Unfortunately that doesn't work either (btw. tc class add ... htb ... -
missed htb).

Now when I'm downloading only on .134 machine I get maks about
20 Kbyte/s - only at beggining in first second I get 40 Kbyte/s which
drops to 20 Kbyte/s...

# tc class show dev eth0

class htb 1:11 parent 1:1 leaf 3: prio 0 rate 384Kbit ceil 512Kbit burst 2090b cburst 2254b
 Sent 68140 bytes 205 pkts (dropped 0, overlimits 0)
 rate 159bps 1pps
 lended: 205 borrowed: 0 giants: 0
 tokens: 34050 ctokens: 27588

class htb 1:1 root rate 512Kbit ceil 512Kbit burst 2254b cburst 2254b
 Sent 6266075 bytes 6394 pkts (dropped 0, overlimits 0)
 rate 37034bps 38pps
 lended: 4160 borrowed: 0 giants: 0
 tokens: -32581 ctokens: -32581

class htb 1:10 parent 1:1 leaf 2: prio 0 rate 128Kbit ceil 512Kbit burst 1762b cburst 2254b
 Sent 6197935 bytes 6189 pkts (dropped 0, overlimits 0)
 rate 36871bps 37pps
 lended: 2029 borrowed: 4160 giants: 0
 tokens: -24430 ctokens: -32581

No drops?

Anyway rest works as I described in previous email... downloading
from linuxRT gives me as much bandwidtch as htb rules allow but
downloading from internet causes only half of bandwidtch to be
used even if rest is not used.

I'm going to try esfq because it seems that wrr doesn't work properly
with 2.4 kernels either (at least statistics shown by tc class are in
most cases zeros for each dynamicly created class).

> Andreas

-- 
Arkadiusz Mi¶kiewicz     CS at FoE, Wroclaw University of Technology
arekmatssedotpl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-16 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-15 13:18 [LARTC] problem with htb rates | small rates question Arkadiusz Miskiewicz
2003-07-15 16:54 ` Atahualpa Jones
2003-07-16 19:06 ` Arkadiusz Miskiewicz

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.