Skip to contentSkip to conversation

HTB: messages in my log

LARTC Robert Penz 2 participants 4 messages Aug 29, 2002

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I'm getting following messages in my log, don't know what I'm doing wrong. I have that messages on 2.419 and 20pre1

first call of my TC script, after the boot

Aug 29 14:30:06 whitestar kernel: HTB init, kernel part version 3.6
Aug 29 14:30:06 whitestar kernel: HTB: quantum of class 10001 is big. Consider 

r2q change.<4>HTB: quantum of class 10010 is big. Consider r2q change.<6>HTB init, kernel part version 3.6

second call

Aug 29 15:35:25 whitestar kernel: HTB: quantum of class 10001 is big. Consider 
r2q change.<4>HTB: quantum of class 10010 is big. Consider r2q 
change.<7>htb*g j=1476817
Aug 29 15:35:25 whitestar kernel: HTB init, kernel part version 3.6
Aug 29 15:35:25 whitestar kernel: HTB: quantum of class 10001 is big. Consider 

r2q change.<4>HTB: quantum of class 10010 is big. Consider r2q change.<6>HTB init, kernel part version 3.6

here is my script

#!/bin/bash

# Written by Robert Penz ([email protected])
# Script is under GPL
# Thx for the help goes to the Linux Advanced Routing & Traffic Control HOWTO

# at http://lartc.org/HOWTO//cvs/2.4routing/lartc.html
# and http://www.docum.org/ and http://luxik.cdi.cz/~patrick/imq/index.html

#
=========================================================================================
#
=========================================================================================

#

# all in Mbit
# $1 = max bandwidth down
# $2 = max bandwidth up
# first check the parameter
[ -z "$1" ] && echo "parameter 1 missing" && exit 1
[ -z "$2" ] && echo "parameter 2 missing" && exit 1

if [ -n "tc -s qdisc ls dev imq0 | grep "htb"" ] ; then
tc qdisc del dev imq0 root handle 1:0
tc qdisc del dev eth0 root handle 1:0 echo old stuff killed
fi

# start with the download stuff
# we use htb
tc qdisc add dev eth0 root handle 1: htb default 10

# 100mbit nic
tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit

# 80mbit is just a fake value, the ceil value is more important tc class add dev eth0 parent 1:1 classid 1:10 htb rate 80mbit ceil 100mbit

# traffic shaping to $1 mbit
tc class add dev eth0 parent 1:1 classid 1:11 htb rate $1mbit
# we use sfq for all
tc qdisc add dev eth0 parent 1:10 handle 30:0 sfq
tc qdisc add dev eth0 parent 1:11 handle 40:0 sfq

## now call the filters

# put the capped marked stuff into that chain, uncapped is default so we don't
# need to do anythink
# mark with -j MARK --set-mark 1
tc filter add dev eth0 protocol ip pref 1 parent 1: handle 1 fw classid 1:11
## continue with the upload stuff
# we use HTB
# all traffic to this device is to the ip 141 .. put it by default into the TC
tc qdisc add dev imq0 handle 1: root htb default 10

# 100mbit virtual nic
tc class add dev imq0 parent 1: classid 1:1 htb rate 100mbit

# 80mbit is just a fake value, the ceil value is more important tc class add dev imq0 parent 1:1 classid 1:10 htb rate 80mbit ceil 100mbit

# traffic shaping to $2
tc class add dev imq0 parent 1:1 classid 1:11 htb rate $2Mbit
# we use sfq for both
tc qdisc add dev imq0 parent 1:10 handle 30:0 sfq
tc qdisc add dev imq0 parent 1:11 handle 40:0 sfq

## now call the filters

# put the capped marked stuff into that chain, uncapped is default so we don't
# need to do anythink
# mark with -j MARK --set-mark 2
tc filter add dev imq0 protocol ip pref 2 parent 1: handle 2 fw classid 1:11

## bring up the imq virtual nic
ip link set imq0 up

- --
Regards,
Robert
- ----------------
Robert Penz
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9biO48tTsQqJDUBMRAgxKAJwKbnPrqDbfl4Il6OGXyQc0CGkGHgCgl16J FxcZjs4+Rovn92EWiR8c2tA=
=r2/R
-----END PGP SIGNATURE-----

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 17 lines · Robert Penz

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I'm getting following messages in my log, don't know what I'm doing wrong. I have that messages on 2.419 and 20pre1

first call of my TC script, after the boot

Aug 29 14:30:06 whitestar kernel: HTB init, kernel part version 3.6
Aug 29 14:30:06 whitestar kernel: HTB: quantum of class 10001 is big.

Consider r2q change.<4>HTB: quantum of class 10010 is big. Consider r2q change.<6>HTB init, kernel part version 3.6

second call

Quoted 7 lines
Aug 29 15:35:25 whitestar kernel: HTB: quantum of class 10001 is big.
Consider r2q change.<4>HTB: quantum of class 10010 is big. Consider r2q
change.<7>htb*g j=1476817
Aug 29 15:35:25 whitestar kernel: HTB init, kernel part version 3.6
Aug 29 15:35:25 whitestar kernel: HTB: quantum of class 10001 is big.

Consider r2q change.<4>HTB: quantum of class 10010 is big. Consider r2q change.<6>HTB init, kernel part version 3.6

All you have to do is chaning r2q so quantum is smaller :)

Quantum is the amount of bytes a class may send when 2 classes are fighting for excess bandwidth. When quantum is too big, it can create extra bursts. When quantum is too small (smaller then 1 packet) it can will disturb the htb calculations.
quantum = rate / r2q
with r2q = 10 (can be overruled when you add a qdisc)

Solution :

     r2q = smallest_rate_you_have / 1500

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Robert Penz

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 1 line

All you have to do is chaning r2q so quantum is smaller :)

ok, I've done that, set r2q to 60, but still the same message, my problem is also that I don't know a class 10010

now my qdisc line looks that way

tc qdisc add dev eth0 root handle 1: htb default 10 r2q 60

- --
Regards,
Robert
- ----------------
Robert Penz
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9bijy8tTsQqJDUBMRAq7OAKCCmYs9GrDntAXBFIq8ncdAJMjSFQCdEX1V tUq54Ojsmd4K+fdIe61nEBY=
=EOE7
-----END PGP SIGNATURE-----

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to Robert Penz
Quoted 7 lines · Robert Penz

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 1 line

All you have to do is chaning r2q so quantum is smaller :)

ok, I've done that, set r2q to 60, but still the same message, my problem is also that I don't know a class 10010

That's an internal number.

Quoted 3 lines

now my qdisc line looks that way

tc qdisc add dev eth0 root handle 1: htb default 10 r2q 60

The biggest quantum allowed is 60000 (I think). So if you calculate all quantums, make sure none of them is bigger then 60000. or smaller then 1500

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/