* [LARTC] Wrapping prio in tbf
@ 2004-05-04 13:05 John Meeks
2004-05-04 16:18 ` Stef Coene
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: John Meeks @ 2004-05-04 13:05 UTC (permalink / raw)
To: lartc
The manual says (about prio):
> Because it doesn't actually shape, the same warning as for SFQ holds:
> either use it only if your physical link is really full or wrap it
> inside a classful qdisc that does shape. The latter holds for almost all
> cable modems and DSL devices.
I want to wrap prio inside of tbf. Here's why: I have a server on a DSL
line, which has both hobby and business websites. I want to make it so
that, if the bandwidth starts to get saturated, the hobby sites will slow
down, while the business sites will not be affected. In other words, I
want to limit the total bandwidth to 700kbit (the max upload is 768kbit on
the modem) with tbf, but have a priority queue so that the business site
can take all available bandwidth if it's being used. The two sets of
sites are on different IP's, so I can either filter by IP or set the TOS
flags with iptables.
I'm using kernel 2.4.18, so htb doesn't work (although it looks like it
might be good) and I also can't seem to get cbq to work (it accepts the
commands, but nothing changes, the bandwidth isn't being limited). I'm
running tests on a spare server so I can try things without messing up the
production server.
Here's what I was trying with cbq:
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100Mbit avpkt 64 cell
8
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
5kbit weight .5kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded
I'd rather not compile a custom kernel because this is a production
server, and I'm using the latest one available for Debian (with security
patches) 2.4.18-686.
Any suggestions would be appreciated. Keep in mind I'm new at this (never
heard of tc before yesterday).
Thanks.
--- Moose
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Wrapping prio in tbf
2004-05-04 13:05 [LARTC] Wrapping prio in tbf John Meeks
@ 2004-05-04 16:18 ` Stef Coene
2004-05-04 17:34 ` John Meeks
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2004-05-04 16:18 UTC (permalink / raw)
To: lartc
On Tuesday 04 May 2004 15:05, John Meeks wrote:
> The manual says (about prio):
> > Because it doesn't actually shape, the same warning as for SFQ holds:
> > either use it only if your physical link is really full or wrap it
> > inside a classful qdisc that does shape. The latter holds for almost all
> > cable modems and DSL devices.
>
> I want to wrap prio inside of tbf. Here's why: I have a server on a DSL
> line, which has both hobby and business websites. I want to make it so
> that, if the bandwidth starts to get saturated, the hobby sites will slow
> down, while the business sites will not be affected. In other words, I
> want to limit the total bandwidth to 700kbit (the max upload is 768kbit on
> the modem) with tbf, but have a priority queue so that the business site
> can take all available bandwidth if it's being used. The two sets of
> sites are on different IP's, so I can either filter by IP or set the TOS
> flags with iptables.
>
> I'm using kernel 2.4.18, so htb doesn't work (although it looks like it
> might be good) and I also can't seem to get cbq to work (it accepts the
> commands, but nothing changes, the bandwidth isn't being limited). I'm
> running tests on a spare server so I can try things without messing up the
> production server.
Htb should work.
> Here's what I was trying with cbq:
>
> tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100Mbit avpkt 64 cell
> 8
>
> tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
> 5kbit weight .5kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
> bounded
Euh, 5kbit ???
See http://docum.org, you can find cbq scripts on the test pages.
> Any suggestions would be appreciated. Keep in mind I'm new at this (never
> heard of tc before yesterday).
No problem.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Wrapping prio in tbf
2004-05-04 13:05 [LARTC] Wrapping prio in tbf John Meeks
2004-05-04 16:18 ` Stef Coene
@ 2004-05-04 17:34 ` John Meeks
2004-05-05 2:06 ` gypsy
2004-05-05 19:29 ` Stef Coene
3 siblings, 0 replies; 5+ messages in thread
From: John Meeks @ 2004-05-04 17:34 UTC (permalink / raw)
To: lartc
On Tue, 4 May 2004, Stef Coene wrote:
> On Tuesday 04 May 2004 15:05, John Meeks wrote:
[snip]
> > I'm using kernel 2.4.18, so htb doesn't work
> Htb should work.
(from FAQ section 9.5.5.1)
:~# tc qdisc add dev eth0 root handle 1: htb default 30
RTNETLINK answers: Invalid argument
>
> > Here's what I was trying with cbq:
> >
> > tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100Mbit avpkt 64 cell
> > 8
> >
> > tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
> > 5kbit weight .5kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
> > bounded
> Euh, 5kbit ???
I use 5kbit to test, to see if it's working at all.
The above doesn't work (it doesn't limit bandwidth). Can you tell me
what's wrong with what I'm doing?
> See http://docum.org, you can find cbq scripts on the test pages.
The scripts use filters and limit it to ports, I want to try limiting the
whole bandwidth. I tried to modify the scripts but I can't get it to
limit the bandwidth.
I want to come up with a script to do what I want, the first step is to
figure out how to just limit bandwidth with cbq with no other options, but
I haven't figured this out yet.
What would I need to do, with cbq, to limit total bandwidth to 5kbps? I
think I can figure it out from there.
>
> > Any suggestions would be appreciated. Keep in mind I'm new at this (never
> > heard of tc before yesterday).
> No problem.
Thanks.
>
> Stef
>
> --
> stef.coene@docum.org
> "Using Linux as bandwidth manager"
> http://www.docum.org/
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
--- Moose
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Wrapping prio in tbf
2004-05-04 13:05 [LARTC] Wrapping prio in tbf John Meeks
2004-05-04 16:18 ` Stef Coene
2004-05-04 17:34 ` John Meeks
@ 2004-05-05 2:06 ` gypsy
2004-05-05 19:29 ` Stef Coene
3 siblings, 0 replies; 5+ messages in thread
From: gypsy @ 2004-05-05 2:06 UTC (permalink / raw)
To: lartc
John Meeks wrote:
>
> On Tue, 4 May 2004, Stef Coene wrote:
>
> > On Tuesday 04 May 2004 15:05, John Meeks wrote:
> [snip]
> > > I'm using kernel 2.4.18, so htb doesn't work
WRONG!
> (from FAQ section 9.5.5.1)
> :~# tc qdisc add dev eth0 root handle 1: htb default 30
> RTNETLINK answers: Invalid argument
Then either your tc executable does not include HTB or your kernel
doesn't. You can handle either or both of those problems pretty easily
because there are kernel patches for HTB here:
http://luxik.cdi.cz/~devik/qos/htb/
or
http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz (includes tc)
and my tc is here:
ftp://andthatsjazz.net/pub/tc
gypsy
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Wrapping prio in tbf
2004-05-04 13:05 [LARTC] Wrapping prio in tbf John Meeks
` (2 preceding siblings ...)
2004-05-05 2:06 ` gypsy
@ 2004-05-05 19:29 ` Stef Coene
3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2004-05-05 19:29 UTC (permalink / raw)
To: lartc
On Tuesday 04 May 2004 19:34, John Meeks wrote:
> On Tue, 4 May 2004, Stef Coene wrote:
> > On Tuesday 04 May 2004 15:05, John Meeks wrote:
>
> [snip]
>
> > > I'm using kernel 2.4.18, so htb doesn't work
> >
> > Htb should work.
>
> (from FAQ section 9.5.5.1)
>
> :~# tc qdisc add dev eth0 root handle 1: htb default 30
>
> RTNETLINK answers: Invalid argument
Try to load the htb module
lsmod sch_htb
and to see if your kernel supports htb
grep htb ksyms
Also check out the tc binary to see it has htb support.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-05-05 19:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-04 13:05 [LARTC] Wrapping prio in tbf John Meeks
2004-05-04 16:18 ` Stef Coene
2004-05-04 17:34 ` John Meeks
2004-05-05 2:06 ` gypsy
2004-05-05 19:29 ` 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.