From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Warnings with and without r2q
Date: Wed, 12 Mar 2003 20:19:07 +0000 [thread overview]
Message-ID: <marc-lartc-104750051120930@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104749414411587@msgid-missing>
On Wednesday 12 March 2003 19:31, Eduardo Bejar wrote:
> Hi everyone,
>
> My HTB script is showing me those "r2q change" warnings. I read that I
> should test with r2q values to gain accuracy and stop the warnings but I
> made some tests with r2q and with burst and I still get the warnings. Any
> ideas on this issue will be very helpful. The script seems to be working as
> the bandwidth for the IPs is being shaped.
> The NIC works at 100mbit and the Internet link that is shared is 128kbit.
> iptable rules mark the packets on the PREROUTING and POSTROUTING chain
Changing burst will not remove the warning. r2q is "rate to quantum" is used
to calculate the quantum for each class : quantum = rate / r2q. Quantum must
be 1500 < quantum < 60000. Otherwise you will get warnings from the kernel.
Solution : choose r2q so for each class 1500 < quantum < 60000
Or choose the best r2q you can and specify the quantum manually if you add a
class.
> tc qdisc add dev eth0 root handle 1: htb default 10
Default r2q = 10.
> tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit burst 2k
> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 80mbit ceil 100mbit
> burst 2k
>
> tc class add dev eth0 parent 1:1 classid 1:11 htb rate 128kbit burst 2k
> tc class add dev eth0 parent 1:11 classid 1:21 htb rate 16kbit ceil 56kbit
> burst 2k
> tc class add dev eth0 parent 1:11 classid 1:22 htb rate 16kbit ceil 40kbit
> burst 2k
> tc class add dev eth0 parent 1:11 classid 1:23 htb rate 16kbit ceil 72kbit
> burst 2k
> tc class add dev eth0 parent 1:11 classid 1:24 htb rate 16kbit ceil 64kbit
> burst 2k
> tc class add dev eth0 parent 1:11 classid 1:25 htb rate 16kbit ceil 40kbit
> burst 2k
> tc class add dev eth0 parent 1:11 classid 1:26 htb rate 16kbit ceil 40kbit
> burst 2k
> tc class add dev eth0 parent 1:11 classid 1:27 htb rate 16kbit ceil 32kbit
> burst 2k
> tc class add dev eth0 parent 1:11 classid 1:28 htb rate 16kbit ceil 56kbit
> burst 2k
Smallest rate : 16kbit = 2 kilobyt / r2q (\x10) = 200. And this is < 1500. So
you get warnings.
Biggest rate : 100mbit = 12.5 mbyte / r2q = 1.2 Mbyte > 60.000. So you get
warnings.
If you do
tc qdisc add dev eth0 root handle 1: htb default 10 r2q 1
Smallest rate : 16kbit = 2kilobyte / r2k = 2000. And this is > 1500. So no
warnings.
Biggest rate : 100mbit = 12.5 mbyte / r2q = 12.5 Mbyte > 60.000. So you get
warnings. But you can overrule the quantum :
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 128kbit burst 2k
quantum 60000
Quantum is used when 2 classes are getting more bandwidth then the rate. So
it's only important for sharing the remaining bandwidth. In that case, each
class may send quantum bytes.
I hope this helps.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.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:[~2003-03-12 20:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-12 18:31 [LARTC] Warnings with and without r2q Eduardo Bejar
2003-03-12 20:19 ` Stef Coene [this message]
2003-03-12 23:18 ` Eduardo Bejar
2003-03-13 16:05 ` 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-104750051120930@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.