Re: [LARTC] htb v3 not as good as htb v2?

2003-10-09 Thread Anton Yurchenko
[EMAIL PROTECTED] wrote:

Hello Anton,

Wednesday, October 8, 2003, 4:49:30 PM, you wrote:

I am using HTB3 with more than 10 megabits customers, and
amount of classes about 100-200 without any problem.
Only one what i do - i make filter with lowest priority, to not pass
ass unclassified traffic to default class, just to drop it. I think
you just need review your classes, because also if you have any rate
more 468 Kbit, you need change r2q or quantum.
 

the problem was observed even when only adding a qdisc, no classes. how 
can this be?

AY> Hello,

AY> I`ve been using htb v2 for more then a year without any major problems. 
AY> Recently I needed to upgrade to newer kernel becouse of non LARTC 
AY> related issues. After installing 2.4.22 when the htb qdisc was attached 
AY> to the interface even without any rules, I was not able to send more 
AY> ~1mbit through the interface. After I reversed the htb3 patch and 
AY> rebuild with htb2 everything works as normal. Has anyone experienced the 
AY> same issue? thanks



 



--

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] htb v3 not as good as htb v2?

2003-10-08 Thread Anton Yurchenko
Hello,

I`ve been using htb v2 for more then a year without any major problems. 
Recently I needed to upgrade to newer kernel becouse of non LARTC 
related issues. After installing 2.4.22 when the htb qdisc was attached 
to the interface even without any rules, I was not able to send more 
~1mbit through the interface. After I reversed the htb3 patch and 
rebuild with htb2 everything works as normal. Has anyone experienced the 
same issue? thanks

--

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Mark packets based on nexthop?

2003-01-29 Thread Anton Yurchenko
hello,

is there a patch or a way to mark packets with IPtables marking based on 
 the nexthop for the packet?

Thnks
--

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation

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


Re: [LARTC] shaping redirected traffic

2002-08-01 Thread Anton Yurchenko

[EMAIL PROTECTED] wrote:

>
>Hi I have the following situation :
>
>CableTV-NET (128-254)
>  | 
>  |(c0) 
>Cisco7233 -(s0)-> Internet
>  |(e0)
>  |
>QoS Server
>
>Now I will route all traffic coming from Cable-net to Internet trought the QoS server 
>AND then back from internet trought the QoS-Server again to the Cable-net, how I will 
>do is another matter, i have some ideas.. ( if u have ideas too mail directly to me, 
>i will be very glad if u can help me on this too  i'm still one week cisco user 
>:") ) but the main question is not this. I'm wondering will I be able to SHAPE 
>the traffic in both directions  My worries are that I'm using only one Ethernet 
>interface on the QoS-Server ? Do U have any ideas will I be able to do this ?
>
>Or I have to put 2 Ethernet cards on the QoS-Server, one for incoming and one for 
>outgoing traffic ? I don't want to do this :"[, it becomes too weird .
>One more thing I will use tcng (preffer it instead tc, 'cause i will have a very 
>complex setup and i worry if i use directly tc that i will mess everything)
>
>(I will probably get a separate serial-card (Frame realay), but it is not an option 
>at the moment and wont be soon)
>  
>
You can shape on one interface with no problems at all, just create for 
example one parent class for outbound and one for inbound packets, and 
use iptables with marks to place packets on respactive classes under 
those parent classes. Its just you have to set up the routes right. And 
that depends on you physical setup. If the interfaces of Cisco and QoS 
are connected directly, you could create two VLAN interfaces on linux 
and route traffic as if QoS box had 2 interfaces. Or if you have some 
switch that connects Cisco Cable-Net and QoS, than you just make Qos 
default gateway for Cable-Net and QoS default gateway is Cisco, and from 
Cisco route the Cable-Net networks to the QoS box.
Bottom line is that how the routing goes is dependent on your physical 
connections setup, but shaping on one interface is definitely possible :)

>Thanx alot in advance
>
>[EMAIL PROTECTED]
>PS. These days I'm very busy... but when i have free time i will redo the 
>2.4-NETWORK-DIAGRAM with some updates that Leonardo was so generous to send me...
>_______
>LARTC mailing list / [EMAIL PROTECTED]
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
>  
>


-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation



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



Re: [LARTC] definition of burst

2002-07-30 Thread Anton Yurchenko

Christian Hammers wrote:

>Hi
>
>On Tue, Jul 30, 2002 at 01:28:56PM +0300, Anton Yurchenko wrote:
>  
>
>>How does HTB define burst. What does it consider a burst, I mean how 
>>does it destinguish when to allow traffic above rate(ceil), within 
>>burst(cburst) values?
>>
>>
>
>>From just reading the docs (not the actual source) I would say that
>"rate" is only the rate in which the bucket is filled with tokens.
>"burst" defines the size of the bucket. I.e. when the bucket is filled up
>after a pause, you can send out as much packets as the bucket is large as
>fast as you want. The burst therefore starts at a sometimes undefined point
>in time but definetly ends when the bucket is simple empty. Because then,
>the packets have to wait for new tokens which only arrives at the "rate" 
>frequency.
>
>So "burst" defines the endurance of the burst.
>
>(if you want those small-burst-until-the-bucket-is-empty to be not as fast 
>as possible but shaped as well then you have to use the maxpeak parameter.
>  
>
maxpeak?  is that an undocumented HTB param?

>HTH,
>
>-christian-
>
>  
>


-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation



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



[LARTC] definition of burst

2002-07-30 Thread Anton Yurchenko

Hello,

How does HTB define burst. What does it consider a burst, I mean how 
does it destinguish when to allow traffic above rate(ceil), within 
burst(cburst) values?

-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation


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



Re: [LARTC] Priority Queueing on Linux

2002-07-10 Thread Anton Yurchenko

Michael T. Babcock wrote:

> bert hubert wrote:
>
>> On Tue, Jul 09, 2002 at 12:02:40PM +0800, Patrick Chan wrote:
>>  
>>
>>> There is priority queueing in Cisco router.
>>>   
>>
>> Please dig up a link so we can see what 'priority queueing' actually 
>> *is*.
>> But I bet that tc has it.  
>>
> I can almost guarantee Patrick is asking about diffserv support.

nope, here it is.
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/qos_c/qcprt2/qcdconmg.htm#23965

-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation



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



Re: [LARTC] HTB stats

2002-06-30 Thread Anton Yurchenko

Stef Coene wrote:

>>>>1. why do I have "lended" for children classes almost the same as
>>>>"sent", who do they lend to? the neighboring classes?
>>>>
>>>>
>>>Yes, to other classes.
>>>"lended is # of packets donated by this class (from its rate)"
>>>  
>>>
>>I did some experimenting, and had a root class and just 1 child class,
>>and this child class still had lended pkts to smbody. Who did it lend it
>>
>>
>>
>Can you send me your script so I know the settings of rate and ceil ?  Or 
>maybe Devik knows the answer.
>  
>



Here goes



tc qd add dev eth0 root handle 1: htb default 2500

tc cl add dev eth0 root classid 1:1 htb rate 100mbit
tc cl add dev eth0 parent 1:1 classid 1:100 rate 100kbit
tc cl add dev eth0 parent 1:1 classid 1:101 rate 100kbit
# to catch all that goes to default
tc cl add dev eth0 parent 1:1 classid 1:2500 rate 1Mbit

iptables -t mangle -A PREROUTING -s 172.20.0.1 -j MARK --set-mark 1
iptables -t mangle -A PREROUTING -d 172.20.0.1 -j MARK --set-mark 2

tc fi add dev eth0 protocol ip handle 1 fw classid 1:100
tc fi add dev eth0 protocol ip handle 2 fw classid 1:101

#> tc fi ls dev eth0

filter parent 1: protocol ip pref 49151 fw 
filter parent 1: protocol ip pref 49151 fw handle 0x2 classid 1:101 
filter parent 1: protocol ip pref 49152 fw 
filter parent 1: protocol ip pref 49152 fw handle 0x1 classid 1:100 

#> tc qd ls dev eth0
qdisc htb 1: r2q 10 default 2500 dcache 0
 deq_util 1/100 deq_rate 33 trials_per_deq 0
 dcache_hits 0 direct_packets 13403


#> iptables -t mangle -L

Chain PREROUTING (policy ACCEPT)
target prot opt source   destination 
MARK   all  --  dg   anywhere   MARK set 0x1 
MARK   all  --  anywhere dg MARK set 0x2 

Chain INPUT (policy ACCEPT)
target prot opt source   destination 
MARK   all  --  dg   anywhere   MARK set 0x1 

Chain FORWARD (policy ACCEPT)
target prot opt source   destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination 
MARK   all  --  anywhere dg MARK set 0x2 

Chain POSTROUTING (policy ACCEPT)
target prot opt source   destination 


#> tc -s -d cl ls dev eth0

class htb 1:101 parent 1:1 prio 0 rate 100Kbit ceil 100Kbit burst 1727b/8 mpu 0b 
cburst 1727b/8 mpu 0b quantum 1280 level 0 
 Sent 42103 bytes 638 pkts (dropped 0, overlimits 698) 
 lended: 638 borrowed: 0 giants: 0 injects: 0
 tokens: 105984 ctokens: 105984

class htb 1:1 root prio 0 rate 100Mbit ceil 100Mbit burst 132644b/8 mpu 0b cburst 
132644b/8 mpu 0b quantum 6 level 3 
 Sent 1994248 bytes 4890 pkts (dropped 0, overlimits 0) 
 rate 6934bps 15pps 
 lended: 0 borrowed: 0 giants: 0 injects: 0
 tokens: 8289 ctokens: 8289

class htb 1:100 parent 1:1 prio 0 rate 100Kbit ceil 100Kbit burst 1727b/8 mpu 0b 
cburst 1727b/8 mpu 0b quantum 1280 level 0 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
 lended: 0 borrowed: 0 giants: 0 injects: 0
 tokens: 110592 ctokens: 110592

class htb 1:2500 parent 1:1 prio 0 rate 1Mbit ceil 1Mbit burst 2909b/8 mpu 0b cburst 
2909b/8 mpu 0b quantum 13107 level 0 
 Sent 1952145 bytes 4252 pkts (dropped 0, overlimits 12) 
 rate 6958bps 14pps 
 lended: 4252 borrowed: 0 giants: 0 injects: 0
 tokens: 17031 ctokens: 17031




so who does 1:2500 and 1:101 lend the tokens too, when none of the 
classes show borrowed > 0

>  
>
>>>>2. What is overlimits? is it incremented when certain pkt goest above
>>>>"rate", what if both "rate" and "ceil"? incremented twice?
>>>>
>>>>
>>>overlimits : Packet is not sended due to ceil or rate restrictions  So
>>>there was to much data in the class.  But don't believe this too much. 
>>>It depends on how often the qdisc looked for packet.
>>>  
>>>
>>What does "looked" mean? could you pleases explain it a bit more? How
>>does it look for a pkt? I`m very interested in finding out what that
>>value means.
>>
>>
>I quoted it from Devik, he his also reading this list, so Devik, can clear 
>this out.
>
>  
>
>>>>3. "dropped"- if the pkt is overlimit it may be dropped right? if it
>>>>cannot be delayed, right? is  this the reason why I have such a
>>>>difference between them?
>>>>
>>>>
>>>Between what?
>>>  
>>>
>>Between "overlimits" and "dropped"
>>
>>
>If the packet is overlimit, it can also be delayed to be send later.  
>
>Stef
>
>  
>


-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation



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



Re: [LARTC] HTB stats

2002-06-30 Thread Anton Yurchenko




Stef Coene wrote:

  On Wednesday 26 June 2002 23:43, Anton Yurchenko wrote:
  
  
hello,

about output of tc -s -d .

about my setup:
all input and output is done on one interface, box recives on it and
from it it forwards.
very simple, a root 1:1 for output  and 1:2 for input classes at
100mbit. and below lots of children with different rates.
ceil for children is 1/3 of rate.

  
  So the ceil is smaller then the rate?
  

Sorry mistype. ceil is "rate" + 1/3 rate

  
  
  
questions:
1. why do I have "lended" for children classes almost the same as
"sent", who do they lend to? the neighboring classes?

  
  Yes, to other classes.
"lended is # of packets donated by this class (from its rate)"
  

I did some experimenting, and had a root class and just 1 child class, and
this child class still had lended pkts to smbody. Who did it lend it to?

  
  
  
2. What is overlimits? is it incremented when certain pkt goest above
"rate", what if both "rate" and "ceil"? incremented twice?

  
  overlimits : Packet is not sended due to ceil or rate restrictions  So there 
was to much data in the class.  But don't believe this too much.  It depends 
on how often the qdisc looked for packet.
  

What does "looked" mean? could you pleases explain it a bit more? How does
it look for a pkt? I`m very interested in finding out what that value means.

  
  
  
3. "dropped"- if the pkt is overlimit it may be dropped right? if it
cannot be delayed, right? is  this the reason why I have such a
difference between them?

  
  Between what?
  

Between "overlimits" and "dropped"

  
  
  
4. what is "level", the level in classes tree?

  
  "Level of class determines its position in hierarchy. Leaves has level 0, 
root classes LEVEL_COUNT-1 and each inner class has level one less than its 
parent. See pictures below (LEVEL_COUNT=3 there). "

I quoted some info from http://luxik.cdi.cz/~devik/qos/htb/

Stef

  



-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation





[LARTC] HTB stats

2002-06-26 Thread Anton Yurchenko

hello,

about output of tc -s -d .

about my setup:
all input and output is done on one interface, box recives on it and 
from it it forwards.
very simple, a root 1:1 for output  and 1:2 for input classes at 
100mbit. and below lots of children with different rates.
ceil for children is 1/3 of rate.

questions:
1. why do I have "lended" for children classes almost the same as 
"sent", who do they lend to? the neighboring classes?
2. What is overlimits? is it incremented when certain pkt goest above 
"rate", what if both "rate" and "ceil"? incremented twice?
3. "dropped"- if the pkt is overlimit it may be dropped right? if it 
cannot be delayed, right? is  this the reason why I have such a 
difference between them?
4. what is "level", the level in classes tree?

I think I am getting it right , but am asking to be shure.

-- 


Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation


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



Re: [LARTC] "HTB delay" log messges

2002-06-18 Thread Anton Yurchenko

Stef Coene wrote:

>On Tuesday 18 June 2002 23:22, Anton Yurchenko wrote:
>  
>
>>hello,
>>
>>What are those messages that I get in in /var/log/messages?
>>
>>HTB delay 4058 > 5 sec
>>
>>they go on and on, so that syslog even suppresses them.
>>
>>
>I think it's fixed in a more recent release of htb.
>
>Stef
>
>  
>
after some digging it came out to be, that if you try to shape to a rate 
LOTS less then the rate going through the class, then delay 
_to_be_introduced_  would be very large, that is more then 5 sec. That 
is what those msgs are all bout. Fix me if I`m wrong.


-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation



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



[LARTC] "HTB delay" log messges

2002-06-18 Thread Anton Yurchenko

hello,

What are those messages that I get in in /var/log/messages?

HTB delay 4058 > 5 sec

they go on and on, so that syslog even suppresses them.

Thnx,

-- 

Anton Yurchenko<[EMAIL PROTECTED]>
Digital Generation


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



Re: [Fwd: Re: [LARTC] borrowing only from parent]

2002-04-26 Thread Anton Yurchenko

Martin Devera wrote:

>You are trying to shape downloads !? It will not work of course
>in this setup. You can shape output only. Or what do you want to shape ?
>devik
>

ok I got it :)) that is what I suspected :)) finaly. that is common 
logic, I`m sorry, after reading some of the docs you go mad. my bad, 
thank you and Stef Coene very much for you help.

Anton


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



Re: [Fwd: Re: [LARTC] borrowing only from parent]

2002-04-26 Thread Anton Yurchenko

Hello,

After your explaining now I think I get the meaning of htb options and 
here is my config , which still sadly doesnt work. Downloads from 
srchost1 and srchost2 go at full speed, and are not shaped. Though 
counters for respective classes increase.

tc -s -d show class dev eth0
-

class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 100Kbit burst 1650b/8 mpu 0b cburst 
1727b/8 mpu 0b quantum 512 level 0 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
 lended: 0 borrowed: 0 giants: 0 injects: 0
 tokens: 628545 ctokens: 263144

class htb 1:1 root prio 0 rate 100Kbit ceil 100Kbit burst 1599b/8 mpu 0b cburst 
1599b/8 mpu 0b quantum 1280 level 3 
 Sent 3131025 bytes 23836 pkts (dropped 0, overlimits 0) 
 rate 281bps 3pps 
 lended: 751 borrowed: 0 giants: 0 injects: 0
 tokens: -8719 ctokens: -8719

class htb 1:100 parent 1:1 prio 0 rate 60Kbit ceil 100Kbit burst 1675b/8 mpu 0b cburst 
1727b/8 mpu 0b quantum 768 level 0 
 Sent 36068 bytes 504 pkts (dropped 0, overlimits 538) 
 rate 281bps 3pps 
 lended: 319 borrowed: 185 giants: 0 injects: 0
 tokens: -12135 ctokens: 10773

-
tc qdisc show dev eth0
-
qdisc htb 1: r2q 10 default 400 dcache 0
 deq_util 1/8 deq_rate 4 trials_per_deq 0
 dcache_hits 0 direct_packets 94066

-

tc filter show dev eth0
-

filter parent 1: protocol ip pref 3 fw 
filter parent 1: protocol ip pref 3 fw handle 0x1 classid 1:100 
filter parent 1: protocol ip pref 3 fw handle 0x2 classid 1:101 

-

iptables -t mangle -L
-

Chain PREROUTING (policy ACCEPT)
target prot opt source   destination 


Chain INPUT (policy ACCEPT)
target prot opt source   destination 
MARK   all  -- sourcehost1   anywhere   MARK set 0x1 
MARK   all  -- sourcehost2  anywhere   MARK set 0x2 

Chain FORWARD (policy ACCEPT)
target prot opt source   destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination 
MARK   all  --  anywheresourcehost1 MARK set 0x1 
MARK   all  --  anywheresourcehost2 MARK set 0x2 

Chain POSTROUTING (policy ACCEPT)
target prot opt source   destination 



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



Re: [Fwd: Re: [LARTC] borrowing only from parent]

2002-04-26 Thread Anton Yurchenko

Martin Devera wrote:

>>I just tried to change {,c}burst to 1600, or leaving them by default but
>>no visible result.
>>here is the latest tc -s -d class show dev eth0
>>
>>class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 40Kbit burst 1599b/8
>>mpu 0b cburst 1599b/8 mpu 0b quantum 512 level 0 Sent 392526 bytes 5898
>>pkts (dropped 0, overlimits 15394) lended: 5898 borrowed: 0 giants: 0
>>injects: 0
>>tokens: -11905 ctokens: -11905
>>
>>class htb 1:1 root prio 0 rate 100Kbit ceil 1Kbit burst 1599b/8 mpu 0b
>>cburst 1599b/8 mpu 0b quantum 1280 level 3 Sent 956111 bytes 14168 pkts
>>(dropped 0, overlimits 0) rate 12bps lended: 566 borrowed: 0 giants: 0
>>injects: 0
>>tokens: 224179 ctokens: -5999
>>
>
>ceil 1kbit !!??
>
Wouldn`t it prevent 1:1 from borrowing from 1: ? I think I`m 
missunderstanding the ceil. As I see it it is if I fe. have rate 100kbit 
and ceil 100kbit then 1:1 would go at at least 100kbit and can borrow 
100kbit from 1: . Which is in my case unwanted. I want to limit 1:1 to 
100kbit without abilyti to borrow. 1:100 and 1:101 could borrow from one 
another up to the max rate of 1:1 ( 100 kbit) that is what I want ot 
achieve.

thanks,

Anton

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



[Fwd: Re: [LARTC] borrowing only from parent]

2002-04-26 Thread Anton Yurchenko

Martin Devera wrote:

> If you read the manual, the algorithm will not work correctly
> with {,c}burst < MTU ...
> devik
>
I just tried to change {,c}burst to 1600, or leaving them by default but 
no visible result.
here is the latest tc -s -d class show dev eth0

class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 40Kbit burst 1599b/8 
mpu 0b cburst 1599b/8 mpu 0b quantum 512 level 0 Sent 392526 bytes 5898 
pkts (dropped 0, overlimits 15394) lended: 5898 borrowed: 0 giants: 0 
injects: 0
tokens: -11905 ctokens: -11905

class htb 1:1 root prio 0 rate 100Kbit ceil 1Kbit burst 1599b/8 mpu 0b 
cburst 1599b/8 mpu 0b quantum 1280 level 3 Sent 956111 bytes 14168 pkts 
(dropped 0, overlimits 0) rate 12bps lended: 566 borrowed: 0 giants: 0 
injects: 0
tokens: 224179 ctokens: -5999

class htb 1:100 parent 1:1 prio 0 rate 60Kbit ceil 60Kbit burst 1599b/8 
mpu 0b cburst 1599b/8 mpu 0b quantum 768 level 0 Sent 563585 bytes 8270 
pkts (dropped 0, overlimits 20093) rate 11bps lended: 7704 borrowed: 566 
giants: 0 injects: 0
tokens: -14100 ctokens: -14100

thanks,

Anton


--- Begin Message ---

Martin Devera wrote:

>If you read the manual, the algorithm will not work correctly
>with {,c}burst < MTU ...
>devik
>
I just tried to change {,c}burst to 1600, or leaving them by default but 
no visible result.
here is the latest tc -s -d class show dev eth0

class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 40Kbit burst 1599b/8 mpu 0b cburst 
1599b/8 mpu 0b quantum 512 level 0 
 Sent 392526 bytes 5898 pkts (dropped 0, overlimits 15394) 
 lended: 5898 borrowed: 0 giants: 0 injects: 0
 tokens: -11905 ctokens: -11905

class htb 1:1 root prio 0 rate 100Kbit ceil 1Kbit burst 1599b/8 mpu 0b cburst 1599b/8 
mpu 0b quantum 1280 level 3 
 Sent 956111 bytes 14168 pkts (dropped 0, overlimits 0) 
 rate 12bps 
 lended: 566 borrowed: 0 giants: 0 injects: 0
 tokens: 224179 ctokens: -5999

class htb 1:100 parent 1:1 prio 0 rate 60Kbit ceil 60Kbit burst 1599b/8 mpu 0b cburst 
1599b/8 mpu 0b quantum 768 level 0 
 Sent 563585 bytes 8270 pkts (dropped 0, overlimits 20093) 
 rate 11bps 
 lended: 7704 borrowed: 566 giants: 0 injects: 0
 tokens: -14100 ctokens: -14100

thanks,

Anton


--- End Message ---


[Fwd: Re: [LARTC] borrowing only from parent]

2002-04-26 Thread Anton Yurchenko



--- Begin Message ---

Stef Coene wrote:

>On Friday 26 April 2002 12:14, Anton Yurchenko wrote:
>
>>Hello,
>>
>>for example I have a parent class 1:1 defined as:
>>
>>tc qdisc add dev eth0 root handle 1: htb default 12
>>
>># shape at 15 kbit almost no borrowing and no bursts
>>tc class add dev eth0 parent 1: classid 1:1 htb rate 15kbit ceil 1kbit
>>burst 1b cburst 1b
>>
>># and sibling classes
>># shape at 5kbit and borrow up to 5 kbit no burst
>>tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5kbit ceil 5kbit
>>burst 1b cburst 1b # shape at 10kbit and borrow up to 10 kbit no burst
>>tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10kbit ceil 10kbps
>>burst 1b cburst 1b
>>
>Try ceil 15kbit for the  class 1:10 and 1:11.
>
>
>And 15kbit is a very low speed to shape at.  Why are you doing so ?  And you 
>also typed kbps, but kbps = kilobyte/s = 8 kilobit/s = 8 kbit.
>
That was just a mistype i typed in actualy your test config for htb, 
modified for my expalme purposes :))
this is the actual config:

tc -s -d class show dev eth0:
---
class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 100Kbit burst 0b/8 mpu 0b cburst 
0b/8 mpu 0b quantum 512 level 0 
 Sent 279738 bytes 4197 pkts (dropped 0, overlimits 9703) 
 lended: 4197 borrowed: 0 giants: 0 injects: 0
 tokens: -95938 ctokens: -191877

class htb 1:1 root prio 0 rate 100Kbit ceil 1Kbit burst 0b/8 mpu 0b cburst 0b/8 mpu 0b 
quantum 1280 level 3 
 Sent 605011 bytes 9017 pkts (dropped 0, overlimits 0) 
 rate 233bps 3pps 
 lended: 566 borrowed: 0 giants: 0 injects: 0
 tokens: -9594 ctokens: -5999

class htb 1:100 parent 1:1 prio 0 rate 60Kbit ceil 100Kbit burst 0b/8 mpu 0b cburst 
0b/8 mpu 0b quantum 768 level 0 
 Sent 325273 bytes 4820 pkts (dropped 0, overlimits 12652) 
 rate 233bps 3pps 
 lended: 4254 borrowed: 566 giants: 0 injects: 0
 tokens: -15989 ctokens: -9594

---
tc qdisc show dev eth0
---
qdisc htb 1: dev eth0 r2q 10 default 400 dcache 0
 deq_util 1/25 deq_rate 1 trials_per_deq 0
 dcache_hits 0 direct_packets 71955
Chain PREROUTING (policy ACCEPT)
target prot opt source   destination 
---

tc filter show dev eth0
---
Chain POSTROUTING (policy ACCEPT)
target prot opt source   destination 
filter parent 1: protocol ip pref 3 fw 
filter parent 1: protocol ip pref 3 fw handle 0x1 classid 1:100 
filter parent 1: protocol ip pref 3 fw handle 0x2 classid 1:101 

---

iptables -t mangle -L:
---

Chain INPUT (policy ACCEPT)
target prot opt source   destination 
MARK   all  --  srchost1   anywhere   MARK set 0x1 
MARK   all  -- srchost2  anywhere   MARK set 0x2 

Chain FORWARD (policy ACCEPT)
target prot opt source   destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination 
MARK   all  --  anywheresrchost1 MARK set 0x1 
MARK   all  --  anywheresrchost2 MARK set 0x2 

---

Also: whe I mark pakets for example only on OUTPUT chain, it will apply 
only to packets from me? so I should do it for in and out right?

Anyway with this config when I download from srchost1 (I use wget to 
measure) via ftp wget shows from 140 to 240 KB/s
and for srchost2 via http I get from 70 to 100 KB/s. nothing like I 
expected :)

Thanks
Anton


--- End Message ---


[Fwd: Re: [LARTC] borrowing only from parent]

2002-04-26 Thread Anton Yurchenko



--- Begin Message ---

If you read the manual, the algorithm will not work correctly
with {,c}burst < MTU ...
devik

On Fri, 26 Apr 2002, Anton Yurchenko wrote:

>
> Hello,
>
> for example I have a parent class 1:1 defined as:
>
> tc qdisc add dev eth0 root handle 1: htb default 12
>
> # shape at 15 kbit almost no borrowing and no bursts
> tc class add dev eth0 parent 1: classid 1:1 htb rate 15kbit ceil 1kbit burst 1b 
>cburst 1b

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


--- End Message ---


[LARTC] borrowing only from parent

2002-04-26 Thread Anton Yurchenko


Hello,

for example I have a parent class 1:1 defined as:

tc qdisc add dev eth0 root handle 1: htb default 12

# shape at 15 kbit almost no borrowing and no bursts
tc class add dev eth0 parent 1: classid 1:1 htb rate 15kbit ceil 1kbit burst 1b cburst 
1b

# and sibling classes
# shape at 5kbit and borrow up to 5 kbit no burst
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5kbit ceil 5kbit burst 1b 
cburst 1b
# shape at 10kbit and borrow up to 10 kbit no burst
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10kbit ceil 10kbps burst 1b 
cburst 1b

I want 1:10 and 1:11 to be able to borrow only from 1:1 so that any one of them ( 1:10 
or 1:10)
go as high as 15kbit ( up to the max that 1:1 allows). But from testing that is not 
the situation.
1:11 goes at ~ 20kbit and 1:10 at ~ 10kbit when going at full speed at the same time. 
it looks like 
that they borrow not from 1:1. stats show from "tc -s -d class show" that they are not 
borrowing
only lending. Are they cross lending or smthn?
Bottom line is I want to have a parent class with siblings that can borrow from each 
other but not more 
then the rate of the parent.

Am I doing somthing wrong?

Thanks,

Anton



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