All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] HTB: messages in my log
@ 2002-08-29 13:37 Robert Penz
  2002-08-29 13:48 ` Stef Coene
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert Penz @ 2002-08-29 13:37 UTC (permalink / raw)
  To: lartc

-----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 (robert.penz@outertech.com)
# 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
robert.penz@outertech.com
-----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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] HTB: messages in my log
  2002-08-29 13:37 [LARTC] HTB: messages in my log Robert Penz
@ 2002-08-29 13:48 ` Stef Coene
  2002-08-29 14:00 ` Robert Penz
  2002-08-29 14:17 ` Stef Coene
  2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2002-08-29 13:48 UTC (permalink / raw)
  To: lartc

On Thursday 29 August 2002 15:37, Robert Penz wrote:
> -----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
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

-- 

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] HTB: messages in my log
  2002-08-29 13:37 [LARTC] HTB: messages in my log Robert Penz
  2002-08-29 13:48 ` Stef Coene
@ 2002-08-29 14:00 ` Robert Penz
  2002-08-29 14:17 ` Stef Coene
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Penz @ 2002-08-29 14:00 UTC (permalink / raw)
  To: lartc

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

> 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
robert.penz@outertech.com
-----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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] HTB: messages in my log
  2002-08-29 13:37 [LARTC] HTB: messages in my log Robert Penz
  2002-08-29 13:48 ` Stef Coene
  2002-08-29 14:00 ` Robert Penz
@ 2002-08-29 14:17 ` Stef Coene
  2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2002-08-29 14:17 UTC (permalink / raw)
  To: lartc

On Thursday 29 August 2002 16:00, Robert Penz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > 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.

> 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

-- 

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-29 14:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-29 13:37 [LARTC] HTB: messages in my log Robert Penz
2002-08-29 13:48 ` Stef Coene
2002-08-29 14:00 ` Robert Penz
2002-08-29 14:17 ` Stef Coene

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.