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 Here is what I tested and then the rules I´m using: With this tests: 1. Script with no r2q and no burst 2. Script with "r2q 1" and no burst 3. Script with no r2q and "burst 2k" 4. Script with "r2q 1" and "burst 2k" I get the same warnings: htb*g j=154890413 HTB: quantum of class 10001 is big. Consider r2q change HTB: quantum of class 10010 is big. Consider r2q change HTB: quantum of class 10021 is small. Consider r2q change ... ... ... HTB: quantum of class 10028 is small. Consider r2q change htb*g j=154890421 HTB: quantum of class 10001 is big. Consider r2q change HTB: quantum of class 10010 is big. Consider r2q change HTB: quantum of class 10021 is small. Consider r2q change ... ... ... HTB: quantum of class 10028 is small. Consider r2q change With this tests: 5. With "r2q 2" and no burst 6. With "r2q 2" and "burst 2k" I get only this: htb*g j=154890500 HTB: quantum of class 10001 is big. Consider r2q change HTB: quantum of class 10010 is big. Consider r2q change htb*g j=154890508 HTB: quantum of class 10001 is big. Consider r2q change HTB: quantum of class 10010 is big. Consider r2q change Here''s the script I´m using (with the burst parameter): #!/bin/sh #=====================# uploading #=====================tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 1: htb default 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 tc qdisc add dev eth0 parent 1:10 handle 10:0 sfq tc qdisc add dev eth0 parent 1:21 handle 21:0 sfq tc qdisc add dev eth0 parent 1:22 handle 22:0 sfq tc qdisc add dev eth0 parent 1:23 handle 23:0 sfq tc qdisc add dev eth0 parent 1:24 handle 24:0 sfq tc qdisc add dev eth0 parent 1:25 handle 25:0 sfq tc qdisc add dev eth0 parent 1:26 handle 26:0 sfq tc qdisc add dev eth0 parent 1:27 handle 27:0 sfq tc qdisc add dev eth0 parent 1:28 handle 28:0 sfq tc filter add dev eth0 protocol ip pref 1 parent 1: handle 1 fw classid 1:21 tc filter add dev eth0 protocol ip pref 1 parent 1: handle 2 fw classid 1:22 tc filter add dev eth0 protocol ip pref 1 parent 1: handle 3 fw classid 1:23 tc filter add dev eth0 protocol ip pref 1 parent 1: handle 4 fw classid 1:24 tc filter add dev eth0 protocol ip pref 1 parent 1: handle 5 fw classid 1:25 tc filter add dev eth0 protocol ip pref 1 parent 1: handle 6 fw classid 1:26 tc filter add dev eth0 protocol ip pref 1 parent 1: handle 7 fw classid 1:27 tc filter add dev eth0 protocol ip pref 1 parent 1: handle 8 fw classid 1:28 #======================# downloading #======================tc qdisc del dev eth1 root #=====================# uploading #=====================tc qdisc add dev eth1 root handle 1: htb default 10 tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit burst 2k tc class add dev eth1 parent 1:1 classid 1:10 htb rate 80mbit ceil 100mbit burst 2k tc class add dev eth1 parent 1:1 classid 1:11 htb rate 128kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:21 htb rate 16kbit ceil 56kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:22 htb rate 8kbit ceil 40kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:23 htb rate 16kbit ceil 72kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:24 htb rate 16kbit ceil 64kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:25 htb rate 16kbit ceil 40kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:26 htb rate 16kbit ceil 32kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:27 htb rate 16kbit ceil 32kbit burst 2k tc class add dev eth1 parent 1:11 classid 1:28 htb rate 16kbit ceil 56kbit burst 2k tc qdisc add dev eth1 parent 1:10 handle 10:0 sfq tc qdisc add dev eth1 parent 1:21 handle 21:0 sfq tc qdisc add dev eth1 parent 1:22 handle 22:0 sfq tc qdisc add dev eth1 parent 1:23 handle 23:0 sfq tc qdisc add dev eth1 parent 1:24 handle 24:0 sfq tc qdisc add dev eth1 parent 1:25 handle 25:0 sfq tc qdisc add dev eth1 parent 1:26 handle 26:0 sfq tc qdisc add dev eth1 parent 1:27 handle 27:0 sfq tc qdisc add dev eth1 parent 1:28 handle 28:0 sfq tc filter add dev eth1 protocol ip pref 1 parent 1: handle 9 fw classid 1:21 tc filter add dev eth1 protocol ip pref 1 parent 1: handle 10 fw classid 1:22 tc filter add dev eth1 protocol ip pref 1 parent 1: handle 11 fw classid 1:23 tc filter add dev eth1 protocol ip pref 1 parent 1: handle 12 fw classid 1:24 tc filter add dev eth1 protocol ip pref 1 parent 1: handle 14 fw classid 1:25 tc filter add dev eth1 protocol ip pref 1 parent 1: handle 15 fw classid 1:26 tc filter add dev eth1 protocol ip pref 1 parent 1: handle 16 fw classid 1:27 tc filter add dev eth1 protocol ip pref 1 parent 1: handle 17 fw classid 1:28 Thank you, Eduardo _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
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 chainChanging 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 10Default 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 2kSmallest 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@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/
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 workingas> 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 chainChanging 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 10Default 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 2kSmallest 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@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/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 13 March 2003 00:18, Eduardo Bejar wrote:> 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. =):) 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/