All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Simple PRIO + TBF at high rates
@ 2003-09-23 17:02 Javier Martin
  2003-09-23 18:59 ` Jose Luis Domingo Lopez
  2003-09-25 13:02 ` Javier Martin
  0 siblings, 2 replies; 3+ messages in thread
From: Javier Martin @ 2003-09-23 17:02 UTC (permalink / raw)
  To: lartc

Hi,

I'm trying to slow down http traffic on Gigabit link. The outbound rates on
that interface range 0 .. 400 Mbit/s and I would like to throttle accurately
to any rate between these while keeping non-http traffic unthrottled.

What I do is to create a PRIO qdisc with the 3 usual bands (default prio
mask) and a 4th band with a TBF attached with the desired rate. Like this
(for 300 mbit/s):


 tc qdisc add dev eth0 root handle 1: prio bands 4

 tc qdisc add dev eth0 parent 1:4 handle 40: tbf \
          rate 300mbit buffer 600kb latency 600ms

 tc filter add dev eth0 parent 1:0 protocol ip u32 \
          match ip sport 80 0xffff flowid 1:4


What it happens is that I actually get a slow-down but at rates of 200-250
instead of 300.

What am I doing wrong?

Javier

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

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

* Re: [LARTC] Simple PRIO + TBF at high rates
  2003-09-23 17:02 [LARTC] Simple PRIO + TBF at high rates Javier Martin
@ 2003-09-23 18:59 ` Jose Luis Domingo Lopez
  2003-09-25 13:02 ` Javier Martin
  1 sibling, 0 replies; 3+ messages in thread
From: Jose Luis Domingo Lopez @ 2003-09-23 18:59 UTC (permalink / raw)
  To: lartc

On Tuesday, 23 September 2003, at 19:02:21 +0200,
Javier Martin wrote:

> I'm trying to slow down http traffic on Gigabit link. The outbound rates on
> that interface range 0 .. 400 Mbit/s and I would like to throttle accurately
> to any rate between these while keeping non-http traffic unthrottled.
> 
> What I do is to create a PRIO qdisc with the 3 usual bands (default prio
> mask) and a 4th band with a TBF attached with the desired rate. Like this
> (for 300 mbit/s):
> 
Well, I am in no way an expert, but it seems to me that you could use
simply HTB on your outgoing ethernet link, create a class with rate
equal to ceil and equal to the greater bandwidth you will ever HTTP
allow to eat. Create another class to be the default one and let it grow
up to your link's bandwidth borrowing from HTTP traffic when there is
not 400 Mbps of them.

Then create a couple of filters to send traffic to the correct classes
and, maybe, attach a "sfq" qdisc to your HTTP and default leaves to 
guarantee fairness for individual connections.

Hope it helps.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.0-test5-mm3)
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* RE: [LARTC] Simple PRIO + TBF at high rates
  2003-09-23 17:02 [LARTC] Simple PRIO + TBF at high rates Javier Martin
  2003-09-23 18:59 ` Jose Luis Domingo Lopez
@ 2003-09-25 13:02 ` Javier Martin
  1 sibling, 0 replies; 3+ messages in thread
From: Javier Martin @ 2003-09-25 13:02 UTC (permalink / raw)
  To: lartc


>> I'm trying to slow down http traffic on Gigabit link. The outbound rates
on
>> that interface range 0 .. 400 Mbit/s and I would like to throttle
accurately
>> to any rate between these while keeping non-http traffic unthrottled.

>Then create a couple of filters to send traffic to the correct classes
>and, maybe, attach a "sfq" qdisc to your HTTP and default leaves to
>guarantee fairness for individual connections.

Ok, first of all I was trying to use PRIO + TBF because I thought it was the
simpler. You suggest me HTB, which is far more flexible, and I guess
flexibility goes along with more overhead. Then my question is: will HTB
behave accuratetly at those rates (100-600 mbits) with moderate CPU impact?

Or better yet: Has anyone tried it in a production environment?

Javier

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

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

end of thread, other threads:[~2003-09-25 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-23 17:02 [LARTC] Simple PRIO + TBF at high rates Javier Martin
2003-09-23 18:59 ` Jose Luis Domingo Lopez
2003-09-25 13:02 ` Javier Martin

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.