Re: [LARTC] Warnings with and without r2q

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Stef,

Finally I understood the r2q value. I defined 'r2q 2'. And for the classes
that gave me the warning I found out that rate / r2q was < 1500. For this
case I use 'quantum 1500'. In the other classes that had warning; rate / r2q
was > 60000, so I use 'quantum 60000'.

Now I don´t get any warnings. =)

Edo


----- Mensaje original -----


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 (=10) = 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@xxxxxxxxx
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux