From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] htb2 with link sharing - the bandwidth dividing question
Date: Tue, 23 Jul 2002 18:49:00 +0000 [thread overview]
Message-ID: <marc-lartc-102745023529457@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102732759808222@msgid-missing>
> 1. Real measurement of bw (also in Calculation in previous mail)
(Sorry, missed that in the prevois mail)
> In my test the downstream bw was divided:
> class real bw
> ----------------------------------------
> class 1:10-RATE=4kbit....... 12 kbit/s
> class 1:40-RATE=4kbit....... 12 kbit/s
> class 1:80-RATE=15kbit...... 29.6 kbit/s
> ----------------------------------------
> Used bw .................... 53.6 kbit/s
So class 1:10 and 1:40 get's more bandwidth then they should.
Actually, the remaining bandwidth is not divided proportional to the rate,
but to quantum. Quantum is calculated as rate / r2q with 2rq = 10. But you
can overrule r2q when you add the htb qdisc and you can overrule quantum per
class. I have more info on www.docum.org, under FAQ, HTB, quantum.
If rate = 4kbit/s and r2q = 10, then quantum = 4kbit/10 = 400 byte
If rate = 15kbit/s and r2q = 10, then quantum = 15kbit/10 = 1500 byte
Each class can send an amount of bytes equal to it's quantum. But a packet
is most of time bigger then 400 byte so for the 4kbit class, more bytes are
sended then allowed and there is no payback
Solution : decrease quantum so the smallest quantum is big enough to send the
bigest packet. So setting r2q = 2 will give better results.
tc qdisc add dev eth0 root handle 1: htb default 100 r2q 2
You will also find some errors in the log file about htb that's complaining
that the quantum is too small. This is triggered because you want to send a
packet that's bigger then the quantum.
After decreasing the r2q parameter, these errors should disappear.
The default r2q parameter is OK for classes with rates > 15kbit/s.
(thx to Devik to explain me this some time ago)
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-07-23 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-22 8:44 [LARTC] htb2 with link sharing - the bandwidth dividing question Lumir Unzeitig
2002-07-22 14:38 ` Stef Coene
2002-07-23 9:26 ` Lumir Unzeitig
2002-07-23 18:49 ` Stef Coene [this message]
2002-09-23 3:29 ` Adi Nugroho
2002-09-29 20:33 ` 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-102745023529457@msgid-missing \
--to=stef.coene@docum.org \
--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.