public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* Does HTB traffic shaping happen on leaf classes only or could it happen at root qdisc
@ 2008-03-18 12:39 Djalel Chefrour
  2008-03-20 11:51 ` Jarek Poplawski
  0 siblings, 1 reply; 4+ messages in thread
From: Djalel Chefrour @ 2008-03-18 12:39 UTC (permalink / raw)
  To: netdev

Hi

According to Traffic-Control-HOWTO
(http://tldp.org/HOWTO/Traffic-Control-HOWTO/classful-qdiscs.html),
with HTB scheduler, traffic is only throttled in leaf classes.
I wonder if this is true in recent implementations ?

In the log below, with kernel 2.6.12.6, "overlimits" increases only
for "root qdisc",
While uplink rate is 256kbs and I am sending 100kbps to high prio class 1:110
and doing ftp upload through class 1:20.

# tc -s -d qdisc show dev ppp0
qdisc htb 1: r2q 10 default 20 direct_packets_stat 2 ver 3.17
 Sent 8926254 bytes 23133 pkts (dropped 0, overlimits 37101 )
 backlog 82p
qdisc pfifo 110: parent 1:110 limit 50p
 Sent 3887561 bytes 19364 pkts (dropped 0, overlimits 0 )
qdisc pfifo 120: parent 1:120 limit 50p
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 )
qdisc sfq 20: parent 1:20 limit 128p quantum 1492b flows 128/1024 perturb 10sec
 Sent 5037436 bytes 3767 pkts (dropped 0, overlimits 0 )
 backlog 82p

# tc -s -d class show dev ppp0
class htb 1:110 parent 1:10 leaf 110: prio 0 quantum 1375 rate 110Kbit
ceil 220Kbit burst 323b/2 mpu 0b overhead 18b atm cburst 392b/2 mpu 0b
overhead 18b atm level 0
 Sent 3888361 bytes 19368 pkts (dropped 0, overlimits 0)
 rate 7160bit 35pps
 lended: 19348 borrowed: 20 giants: 50
 tokens: 2404 ctokens: 3813

class htb 1:1 root rate 256Kbit ceil 256Kbit burst 1760b/8 mpu 0b
overhead 18b atm cburst 1760b/8 mpu 0b overhead 18b atm level 7
 Sent 8806437 bytes 23055 pkts (dropped 0, overlimits 0)
 rate 26913bit 49pps
 lended: 2365 borrowed: 0 giants: 0
 tokens: -86236 ctokens: -86236

class htb 1:10 parent 1:1 rate 210Kbit ceil 256Kbit burst 1730b/8 mpu
0b overhead 18b atm cburst 1760b/8 mpu 0b overhead 18b atm level 6
 Sent 3888361 bytes 19368 pkts (dropped 0, overlimits 0)
 rate 7279bit 36pps
 lended: 20 borrowed: 0 giants: 0
 tokens: 45750 ctokens: 38273

class htb 1:20 parent 1:1 leaf 20: prio 7 quantum 1500 rate 46Kbit
ceil 256Kbit burst 1627b/8 mpu 0b overhead 18b atm cburst 1760b/8 mpu
0b overhead 18b atm level 0
 Sent 5038928 bytes 3768 pkts (dropped 0, overlimits 0)
 rate 160Kbit 13pps backlog 81p
 lended: 1322 borrowed: 2365 giants: 0
 tokens: -154108 ctokens: -41778

class htb 1:120 parent 1:10 leaf 120: prio 1 quantum 1250 rate 100Kbit
ceil 100Kbit burst 317b/2 mpu 0b overhead 18b atm cburst 317b/2 mpu 0b
overhead 18b atm level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 20840 ctokens: 20840


Normally traffic sent to 1:110 should not be delayed, but I am
experiencing an important latency there,
also traffic going 1:20 should is not dropped as one would expect !!!

Does this mean traffic is shaped at the root qdisc before it is
classified and sent down ?

TIA
-- 
Dr Djalel Chefrour,
Software Consultant

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

* Re: Does HTB traffic shaping happen on leaf classes only or could it happen at root qdisc
  2008-03-18 12:39 Does HTB traffic shaping happen on leaf classes only or could it happen at root qdisc Djalel Chefrour
@ 2008-03-20 11:51 ` Jarek Poplawski
  2008-03-20 14:07   ` Djalel Chefrour
  0 siblings, 1 reply; 4+ messages in thread
From: Jarek Poplawski @ 2008-03-20 11:51 UTC (permalink / raw)
  To: Djalel Chefrour; +Cc: netdev

On 18-03-2008 13:39, Djalel Chefrour wrote:
> Hi
> 
> According to Traffic-Control-HOWTO
> (http://tldp.org/HOWTO/Traffic-Control-HOWTO/classful-qdiscs.html),
> with HTB scheduler, traffic is only throttled in leaf classes.
> I wonder if this is true in recent implementations ?
> 
> In the log below, with kernel 2.6.12.6, "overlimits" increases only
> for "root qdisc",
> While uplink rate is 256kbs and I am sending 100kbps to high prio class 1:110
> and doing ftp upload through class 1:20.
> 
> # tc -s -d qdisc show dev ppp0
> qdisc htb 1: r2q 10 default 20 direct_packets_stat 2 ver 3.17
>  Sent 8926254 bytes 23133 pkts (dropped 0, overlimits 37101 )
>  backlog 82p
> qdisc pfifo 110: parent 1:110 limit 50p
>  Sent 3887561 bytes 19364 pkts (dropped 0, overlimits 0 )
> qdisc pfifo 120: parent 1:120 limit 50p
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0 )
> qdisc sfq 20: parent 1:20 limit 128p quantum 1492b flows 128/1024 perturb 10sec
>  Sent 5037436 bytes 3767 pkts (dropped 0, overlimits 0 )
>  backlog 82p
> 
> # tc -s -d class show dev ppp0
> class htb 1:110 parent 1:10 leaf 110: prio 0 quantum 1375 rate 110Kbit
> ceil 220Kbit burst 323b/2 mpu 0b overhead 18b atm cburst 392b/2 mpu 0b

Are these default quantum, burst and cburst parameters?

> overhead 18b atm level 0
>  Sent 3888361 bytes 19368 pkts (dropped 0, overlimits 0)
>  rate 7160bit 35pps
>  lended: 19348 borrowed: 20 giants: 50

giants (>mtu) means something goes out of band here.

>  tokens: 2404 ctokens: 3813
> 
> class htb 1:1 root rate 256Kbit ceil 256Kbit burst 1760b/8 mpu 0b
> overhead 18b atm cburst 1760b/8 mpu 0b overhead 18b atm level 7
>  Sent 8806437 bytes 23055 pkts (dropped 0, overlimits 0)
>  rate 26913bit 49pps
>  lended: 2365 borrowed: 0 giants: 0
>  tokens: -86236 ctokens: -86236
> 
> class htb 1:10 parent 1:1 rate 210Kbit ceil 256Kbit burst 1730b/8 mpu
> 0b overhead 18b atm cburst 1760b/8 mpu 0b overhead 18b atm level 6
>  Sent 3888361 bytes 19368 pkts (dropped 0, overlimits 0)
>  rate 7279bit 36pps
>  lended: 20 borrowed: 0 giants: 0
>  tokens: 45750 ctokens: 38273
> 
> class htb 1:20 parent 1:1 leaf 20: prio 7 quantum 1500 rate 46Kbit
> ceil 256Kbit burst 1627b/8 mpu 0b overhead 18b atm cburst 1760b/8 mpu
> 0b overhead 18b atm level 0
>  Sent 5038928 bytes 3768 pkts (dropped 0, overlimits 0)
>  rate 160Kbit 13pps backlog 81p
>  lended: 1322 borrowed: 2365 giants: 0
>  tokens: -154108 ctokens: -41778
> 
> class htb 1:120 parent 1:10 leaf 120: prio 1 quantum 1250 rate 100Kbit
> ceil 100Kbit burst 317b/2 mpu 0b overhead 18b atm cburst 317b/2 mpu 0b
> overhead 18b atm level 0
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>  lended: 0 borrowed: 0 giants: 0
>  tokens: 20840 ctokens: 20840
> 
> 
> Normally traffic sent to 1:110 should not be delayed, but I am
> experiencing an important latency there,
> also traffic going 1:20 should is not dropped as one would expect !!!

Looks like all is within (below) rates, so no need to drop. Latency
could be caused by various reasons, mainly wrong parameters. Usually
defaults are reasonable with normal size packets. But these questions
aren't the preferred subject of this list...

> Does this mean traffic is shaped at the root qdisc before it is
> classified and sent down ?

No, HTB root qdisc doesn't even have parameter for shaping.
BTW, did you read this fine manual?:
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm

Regards,
Jarek P.

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

* Re: Does HTB traffic shaping happen on leaf classes only or could it happen at root qdisc
  2008-03-20 11:51 ` Jarek Poplawski
@ 2008-03-20 14:07   ` Djalel Chefrour
  2008-03-20 19:49     ` Jarek Poplawski
  0 siblings, 1 reply; 4+ messages in thread
From: Djalel Chefrour @ 2008-03-20 14:07 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: netdev

THX for your reply.

>  > # tc -s -d class show dev ppp0
>  > class htb 1:110 parent 1:10 leaf 110: prio 0 quantum 1375 rate 110Kbit
>  > ceil 220Kbit burst 323b/2 mpu 0b overhead 18b atm cburst 392b/2 mpu 0b
>
>  Are these default quantum, burst and cburst parameters?
>
Yes they are. I forget to mention that I am also using tc-atm pacth with:
atm overhead 18 nohys mtu 256, for 1:10
atm overhead 18 nohys, for 1:20

>
>  > overhead 18b atm level 0
>  >  Sent 3888361 bytes 19368 pkts (dropped 0, overlimits 0)
>  >  rate 7160bit 35pps
>  >  lended: 19348 borrowed: 20 giants: 50
>
>  giants (>mtu) means something goes out of band here.
>
Hmmm, that could be explained with mtu set to 256

>
>  No, HTB root qdisc doesn't even have parameter for shaping.
>  BTW, did you read this fine manual?:
>  http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
>

Yes, thats what I read too, but the output shows 0 overlimits for all
nodes but root !!!
So how to interpret this?

TIA

-- 
Dr Djalel Chefrour,
Software Consultant

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

* Re: Does HTB traffic shaping happen on leaf classes only or could it happen at root qdisc
  2008-03-20 14:07   ` Djalel Chefrour
@ 2008-03-20 19:49     ` Jarek Poplawski
  0 siblings, 0 replies; 4+ messages in thread
From: Jarek Poplawski @ 2008-03-20 19:49 UTC (permalink / raw)
  To: Djalel Chefrour; +Cc: netdev

On Thu, Mar 20, 2008 at 03:07:05PM +0100, Djalel Chefrour wrote:
...
> >  > # tc -s -d class show dev ppp0
> >  > class htb 1:110 parent 1:10 leaf 110: prio 0 quantum 1375 rate 110Kbit
> >  > ceil 220Kbit burst 323b/2 mpu 0b overhead 18b atm cburst 392b/2 mpu 0b
> >
> >  Are these default quantum, burst and cburst parameters?
> >
> Yes they are. I forget to mention that I am also using tc-atm pacth with:
> atm overhead 18 nohys mtu 256, for 1:10
> atm overhead 18 nohys, for 1:20

I don't know this patch, but if it's about some fine graining, maybe
it's better to get it working with a vanilla version first. Anyway,
you wondered why 1:110 could be treated unfair vs. 1:20, so I wonder,
why it has worse parameters than 1:20 (also by default?).

> >  > overhead 18b atm level 0
> >  >  Sent 3888361 bytes 19368 pkts (dropped 0, overlimits 0)
> >  >  rate 7160bit 35pps
> >  >  lended: 19348 borrowed: 20 giants: 50
> >
> >  giants (>mtu) means something goes out of band here.
> >
> Hmmm, that could be explained with mtu set to 256

I'm not sure where you set this mtu, or if it's changed by this atm
patch, but HTB gets packets bigger than it can rate, so you probably
should set HTB's mtu parameter higher, until these giants are not
reported.

> >  No, HTB root qdisc doesn't even have parameter for shaping.
> >  BTW, did you read this fine manual?:
> >  http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
> >
> 
> Yes, thats what I read too, but the output shows 0 overlimits for all
> nodes but root !!!
> So how to interpret this?

I'm not sure if HTB uses these overlimits for classes yet. But, I
don't see why should you care about this so much: it only tells
generally how much classes delay sending - not about overloading.

If I don't miss something in your problem, you should check first
if 1:110 class works OK without any traffic in 1:20, and if so, than
limit 1:20 parameters until it doesn't affect 1:110 anymore.

Jarek P.

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

end of thread, other threads:[~2008-03-20 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18 12:39 Does HTB traffic shaping happen on leaf classes only or could it happen at root qdisc Djalel Chefrour
2008-03-20 11:51 ` Jarek Poplawski
2008-03-20 14:07   ` Djalel Chefrour
2008-03-20 19:49     ` Jarek Poplawski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox