From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: [LARTC] HTB rate, borrowing, and dequeuing
Date: Sat, 05 Apr 2003 22:33:06 +0000 [thread overview]
Message-ID: <marc-lartc-104958207226941@msgid-missing> (raw)
Hello all,
I seem to recall having read answers to some of these questions before,
but I cannot find the answers now, and there are other answers I don't
think I have ever known!
- How is rate calculated in HTB?
- Over what number of seconds is rate averaged?
- Is it calculated using exponential weighted moving average (EWMA)?
- Do children borrow tokens or ctokens from parent classes?
- What does it mean when a class lends (tokens?, ctokens?) to itself? [1]
This seems illogical to me. Is this a LARTC FAQ typo, Stef? Why would
a class borrow from itself?
- According to the LARTC HOWTO (9.5.2.2) [1], the kernel asks the root
qdisc on an interface to dequeue a packet, and the qdisc hands this
opportunity to dequeue to each subclass. Is this also accurate for
HTB? (If so, this explains for me why only leaf classes can perform
shaping, and why children classes can exceed lower parent class rates.)
Thanks in advance for any replies,
-Martin
[1] http://www.docum.org/stef.coene/qos/faq/cache/33.html
[2] http://lartc.org/howto/lartc.qdisc.classful.html#AEN866
[3] http://mailman.ds9a.nl/pipermail/lartc/2003q1/006636.html
[4] http://mailman.ds9a.nl/pipermail/lartc/2002q3/004713.html
During my research in preparing these questions, I found an answer to one
of them in the LARTC mail archive, and I figured I'd post this answer
along with my other related HTB questions.
- According to this LARTC thread [3], child classes borrow from their
parent up to ceil in quantum increments. I thought bandwidth was
divided between child classes by rate. Can anybody disambiguate or
elucidate on this discrepancy?
The answer, Martin, is as follows (see [4] for a restatement). All
borrowing from the parent is done as each class has the opportunity to ask
the parent for tokens. This means that during each turn, a class has the
opportunity to borrow a maximum of quantum tokens, before another class
gets serviced.
The confusion is understandable, since HTB calculates a reasonable quantum
(when it is not specified) from rate and r2q at the creation of the HTB
class. So, practically speaking, unless the user is supplying r2q and
quantum, bandwidth will be borrowed from the parent in a ratio derived
from rate.
As always, quantum must be greater than or equal to MTU for HTB
calculations to be accurate.
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2003-04-05 22:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-05 22:33 Martin A. Brown [this message]
2003-04-06 13:33 ` [LARTC] HTB rate, borrowing, and dequeuing Stef Coene
2003-04-13 2:40 ` Martin A. Brown
2003-04-13 20:40 ` Stef Coene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-104958207226941@msgid-missing \
--to=mabrown-lartc@securepipe.com \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.