All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Is ESFQ working?
@ 2007-02-11 12:01 Alejandro Lorenzo Gallego
  2007-02-11 12:28 ` Tomasz Chilinski
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Alejandro Lorenzo Gallego @ 2007-02-11 12:01 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 798 bytes --]

Hi there, i am trying to shape a network for a college dorms...

INTERNET---- ETH0--------Nat Box-------ETH1--------LAN

I have set up  classes of traffic (HTTP, FTP, MAIL, IM, OTHER) and i have 
assigned a rate for everyone with a HTB qdisc. The limit based in traffic is 
working flawlessly.

However, under every HTB class i have set up a ESFQ queue discipline with hash 
value set to 'dst'  int eth1 to control the rate of download of every user, 
but it appears to do nothing.

and in eth0 there is a prio handler

According to documentation, every user should get a fair amount of bandwidth 
but currently, users with some kind of download accelerator gets a higher 
amount of bandwidth

Is ESFQ working right for someone?

¿Should i go for imq for this kind of shaping?

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
@ 2007-02-11 12:28 ` Tomasz Chilinski
  2007-02-11 13:15 ` Alejandro Lorenzo Gallego
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomasz Chilinski @ 2007-02-11 12:28 UTC (permalink / raw)
  To: lartc

On Sun, 11 Feb 2007 13:01:45 +0100, Alejandro Lorenzo Gallego wrote
> Hi there, i am trying to shape a network for a college dorms...

Hi Alejandro.

> INTERNET---- ETH0--------Nat Box-------ETH1--------LAN
> 
> I have set up  classes of traffic (HTTP, FTP, MAIL, IM, OTHER) and i 
> have assigned a rate for everyone with a HTB qdisc. The limit based 
> in traffic is working flawlessly.
> 
> However, under every HTB class i have set up a ESFQ queue discipline 
> with hash value set to 'dst'  int eth1 to control the rate of 
> download of every user, but it appears to do nothing.
> 
> and in eth0 there is a prio handler
> 
> According to documentation, every user should get a fair amount of 
> bandwidth but currently, users with some kind of download 
> accelerator gets a higher amount of bandwidth
> 
> Is ESFQ working right for someone?
> 
> ¿Should i go for imq for this kind of shaping?

Can you show a snippet of your script here?

Bests, Tomasz Chilinski.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
  2007-02-11 12:28 ` Tomasz Chilinski
@ 2007-02-11 13:15 ` Alejandro Lorenzo Gallego
  2007-02-11 14:20 ` Tomasz Chilinski
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Lorenzo Gallego @ 2007-02-11 13:15 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 4294 bytes --]

On Sunday 11 February 2007 13:28:33 Tomasz Chilinski wrote:
> On Sun, 11 Feb 2007 13:01:45 +0100, Alejandro Lorenzo Gallego wrote
>
> > Hi there, i am trying to shape a network for a college dorms...
>
> Hi Alejandro.
>
> > INTERNET---- ETH0--------Nat Box-------ETH1--------LAN
> >
> > I have set up  classes of traffic (HTTP, FTP, MAIL, IM, OTHER) and i
> > have assigned a rate for everyone with a HTB qdisc. The limit based
> > in traffic is working flawlessly.
> >
> > However, under every HTB class i have set up a ESFQ queue discipline
> > with hash value set to 'dst'  int eth1 to control the rate of
> > download of every user, but it appears to do nothing.
> >
> > and in eth0 there is a prio handler
> >
> > According to documentation, every user should get a fair amount of
> > bandwidth but currently, users with some kind of download
> > accelerator gets a higher amount of bandwidth
> >
> > Is ESFQ working right for someone?
> >
> > żShould i go for imq for this kind of shaping?
>
> Can you show a snippet of your script here?
>
> Bests, Tomasz Chilinski.
 
There you go:

#!/bin/sh
echo "Borrando todo"
tc qdisc del dev eth1 root

tc qdisc add dev eth1 parent root handle 1: htb default 900
tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 100mbit
tc class add dev eth1 parent 1:1 classid 1:20 htb rate 2500kbit ceil 4mbit

echo "Clases base creadas"
#Para permitir a la clase del proxy llegar al tope de la tarjeta, si fuese 
necesario
echo "clase pal proxy"
tc class add dev eth1 parent 1:20 classid 1:50 htb rate 800kbit  ceil 4mbit
echo "Insertando reglas de clases"
tc class add dev eth1 parent 1:20 classid 1:100 htb rate 400kbit ceil 4mbit
tc class add dev eth1 parent 1:20 classid 1:200 htb rate 300kbit ceil 4mbit
tc class add dev eth1 parent 1:20 classid 1:300 htb rate 200kbit ceil 4mbit
tc class add dev eth1 parent 1:20 classid 1:900 htb rate 300kbit ceil 4mbit
tc class add dev eth1 parent 1:20 classid 1:700 htb rate 300kbit
echo "Clases insertadas"
echo "Esfq"
tc-esfq qdisc add dev eth1 parent 1:100 handle 100: esfq hash dst  perturb 20
tc-esfq qdisc add dev eth1 parent 1:200 handle 200: esfq hash dst
tc-esfq qdisc add dev eth1 parent 1:300 handle 300: esfq hash dst
tc-esfq  qdisc add dev eth1 parent 1:900 handle 900: esfq hash dst

tc-esfq qdisc add dev eth1 parent 1:50 handle 50: esfq hash dst perturb 20 
limit 10 depth 20
tc-esfq qdisc add dev eth1 parent 1:10 handle 10: esfq hash dst

#!/bin/sh

IPTABLES="iptables -t mangle"
ANADIR="iptables -t mangle -A POSTROUTING -o eth1"
INSERTAR="iptables -t mangle -I POSTROUTING  -o eth1"

echo "Borrando el postrouting de iptables"

$IPTABLES -F POSTROUTING

$ANADIR -p tcp --sport 443 -j CLASSIFY --set-class 1:100
$ANADIR -p tcp --sport 22 -j CLASSIFY --set-class 1:100
$ANADIR -p tcp --sport 53 -j CLASSIFY --set-class 1:100
$ANADIR -p tcp --sport 8080 -j CLASSIFY --set-class 1:100
$ANADIR -p tcp --sport 587 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 6667 -j CLASSIFY --set-class 1:300
$ANADIR -p tcp --sport 1863 -j CLASSIFY --set-class 1:300
$ANADIR -p tcp --sport 123 -j CLASSIFY --set-class 1:200
$ANADIR -p udp --sport 123 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 115 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 69 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 23 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 5223 -j CLASSIFY --set-class 1:300
$ANADIR -p tcp --sport 10025 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 3690 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 3306 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 143 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 995 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 990 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 110 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 993 -j CLASSIFY --set-class 1:200
$ANADIR -p tcp --sport 220 -j CLASSIFY --set-class 1:200
#$ANADIR -d 192.168.20.49 -j CLASSIFY --set-class 1:700

$INSERTAR -s 192.168.0.0/16 -p tcp --sport 3128 -j CLASSIFY --set-class 1:50
$INSERTAR -s 192.168.0.0/16 -d 192.168.0.0/16 -p tcp -j CLASSIFY --set-class 
1:10


[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
  2007-02-11 12:28 ` Tomasz Chilinski
  2007-02-11 13:15 ` Alejandro Lorenzo Gallego
@ 2007-02-11 14:20 ` Tomasz Chilinski
  2007-02-11 15:19 ` Alejandro Lorenzo Gallego
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomasz Chilinski @ 2007-02-11 14:20 UTC (permalink / raw)
  To: lartc

On Sun, 11 Feb 2007 14:15:49 +0100, Alejandro Lorenzo Gallego wrote
> [cut]
>
> $IPTABLES -F POSTROUTING
> 
> $ANADIR -p tcp --sport 443 -j CLASSIFY --set-class 1:100
> $ANADIR -p tcp --sport 22 -j CLASSIFY --set-class 1:100
> $ANADIR -p tcp --sport 53 -j CLASSIFY --set-class 1:100
> $ANADIR -p tcp --sport 8080 -j CLASSIFY --set-class 1:100
> $ANADIR -p tcp --sport 587 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 6667 -j CLASSIFY --set-class 1:300
> $ANADIR -p tcp --sport 1863 -j CLASSIFY --set-class 1:300
> $ANADIR -p tcp --sport 123 -j CLASSIFY --set-class 1:200
> $ANADIR -p udp --sport 123 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 115 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 69 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 23 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 5223 -j CLASSIFY --set-class 1:300
> $ANADIR -p tcp --sport 10025 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 3690 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 3306 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 143 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 995 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 990 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 110 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 993 -j CLASSIFY --set-class 1:200
> $ANADIR -p tcp --sport 220 -j CLASSIFY --set-class 1:200
> #$ANADIR -d 192.168.20.49 -j CLASSIFY --set-class 1:700
>
> [cut]

Have u tried to replace CLASSIFY target by MARK target and then using
fw filter? I have got bad experience with CLASSIFY target.

Bests, Tomasz Chilinski.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
                   ` (2 preceding siblings ...)
  2007-02-11 14:20 ` Tomasz Chilinski
@ 2007-02-11 15:19 ` Alejandro Lorenzo Gallego
  2007-02-11 15:48 ` Tomasz Chilinski
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Lorenzo Gallego @ 2007-02-11 15:19 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 358 bytes --]


> >
> > [cut]
>
> Have u tried to replace CLASSIFY target by MARK target and then using
> fw filter? I have got bad experience with CLASSIFY target.
>

Behaviour is identical if i use classify or mark, however, i expected this, 
because the packets do go to the right classes, it's just it looks that ESFQ 
is not assuring fairness between users

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
                   ` (3 preceding siblings ...)
  2007-02-11 15:19 ` Alejandro Lorenzo Gallego
@ 2007-02-11 15:48 ` Tomasz Chilinski
  2007-02-11 15:59 ` Alejandro Lorenzo Gallego
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomasz Chilinski @ 2007-02-11 15:48 UTC (permalink / raw)
  To: lartc

On Sun, 11 Feb 2007 16:19:54 +0100, Alejandro Lorenzo Gallego wrote
> > >
> > > [cut]
> >
> > Have u tried to replace CLASSIFY target by MARK target and then using
> > fw filter? I have got bad experience with CLASSIFY target.
> >
> 
> Behaviour is identical if i use classify or mark, however, i 
> expected this, because the packets do go to the right classes, it's 
> just it looks that ESFQ is not assuring fairness between users

Which version of ESFQ? Patch for 2.6.15.1 or 2.6.19.2?

Bests, Tomasz Chilinski.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
                   ` (4 preceding siblings ...)
  2007-02-11 15:48 ` Tomasz Chilinski
@ 2007-02-11 15:59 ` Alejandro Lorenzo Gallego
  2007-02-11 19:10 ` Corey Hickey
  2007-02-11 21:49 ` Alejandro Lorenzo Gallego
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Lorenzo Gallego @ 2007-02-11 15:59 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 840 bytes --]

On Sunday 11 February 2007 16:48:10 Tomasz Chilinski wrote:
> On Sun, 11 Feb 2007 16:19:54 +0100, Alejandro Lorenzo Gallego wrote
>
> > > > [cut]
> > >
> > > Have u tried to replace CLASSIFY target by MARK target and then using
> > > fw filter? I have got bad experience with CLASSIFY target.
> >
> > Behaviour is identical if i use classify or mark, however, i
> > expected this, because the packets do go to the right classes, it's
> > just it looks that ESFQ is not assuring fairness between users
>
> Which version of ESFQ? Patch for 2.6.15.1 or 2.6.19.2?
>
> Bests, Tomasz Chilinski.
>

Actually for 2.6.29.2 

And i made some progress, using a depth parameter higher than default (800) it 
behaves better and closer to fairness.... 

¿Can some explain the exact meaning of limit and depth options?

Thank you

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
                   ` (5 preceding siblings ...)
  2007-02-11 15:59 ` Alejandro Lorenzo Gallego
@ 2007-02-11 19:10 ` Corey Hickey
  2007-02-11 21:49 ` Alejandro Lorenzo Gallego
  7 siblings, 0 replies; 9+ messages in thread
From: Corey Hickey @ 2007-02-11 19:10 UTC (permalink / raw)
  To: lartc

Alejandro Lorenzo Gallego wrote:
> On Sunday 11 February 2007 16:48:10 Tomasz Chilinski wrote:
>> On Sun, 11 Feb 2007 16:19:54 +0100, Alejandro Lorenzo Gallego wrote
>>
>>>>> [cut]
>>>> Have u tried to replace CLASSIFY target by MARK target and then using
>>>> fw filter? I have got bad experience with CLASSIFY target.
>>> Behaviour is identical if i use classify or mark, however, i
>>> expected this, because the packets do go to the right classes, it's
>>> just it looks that ESFQ is not assuring fairness between users
>> Which version of ESFQ? Patch for 2.6.15.1 or 2.6.19.2?
>>
>> Bests, Tomasz Chilinski.
>>
> 
> Actually for 2.6.29.2 

I assume that's a typo and you mean '2.6.19.2'.

> And i made some progress, using a depth parameter higher than default (800) it 
> behaves better and closer to fairness.... 

The default for depth is only 128. You're hashing by dst, right? On your
network, how many destinations will be receiving packets concurrently?
In other words, how many of your users will be downloading at the same time?

> ¿Can some explain the exact meaning of limit and depth options?

I am 95% sure of the following, which isn't in the ESFQ documentation
yet because I just recently read the relevant paperwork and tried to
understand more of the code.

'Limit' is the total number of packets ESFQ will queue before it starts
finding packets to drop.

ESFQ divides traffic into a number of smaller queues ("slots"), one for
each flow. Flows are distinguished based on whatever aspect of the
packets is hashed, such as source or destination. 'Depth' is the maximum
number of slots.

If there are more flows than 'depth', some flows might actually start
sharing slots. Obviously, this is not good, and fairness will suffer.

If there are 'limit' number of packets, ESFQ will simply drop a packet
from the slot that has the most packets. This doesn't hurt fairness,
since the longest slot will generally correspond to whichever flow has
tried to transfer the most packets recently.

-Corey
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Is ESFQ working?
  2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
                   ` (6 preceding siblings ...)
  2007-02-11 19:10 ` Corey Hickey
@ 2007-02-11 21:49 ` Alejandro Lorenzo Gallego
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Lorenzo Gallego @ 2007-02-11 21:49 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 2462 bytes --]

On Sunday 11 February 2007 20:10:34 Corey Hickey wrote:
> Alejandro Lorenzo Gallego wrote:
> > On Sunday 11 February 2007 16:48:10 Tomasz Chilinski wrote:
> >> On Sun, 11 Feb 2007 16:19:54 +0100, Alejandro Lorenzo Gallego wrote
> >>
> >>>>> [cut]
> >>>>
> >>>> Have u tried to replace CLASSIFY target by MARK target and then using
> >>>> fw filter? I have got bad experience with CLASSIFY target.
> >>>
> >>> Behaviour is identical if i use classify or mark, however, i
> >>> expected this, because the packets do go to the right classes, it's
> >>> just it looks that ESFQ is not assuring fairness between users
> >>
> >> Which version of ESFQ? Patch for 2.6.15.1 or 2.6.19.2?
> >>
> >> Bests, Tomasz Chilinski.
> >
> > Actually for 2.6.29.2
>
> I assume that's a typo and you mean '2.6.19.2'.
>

Yep, these fat fingers >_<

> > And i made some progress, using a depth parameter higher than default
> > (800) it behaves better and closer to fairness....
>
> The default for depth is only 128. You're hashing by dst, right? On your
> network, how many destinations will be receiving packets concurrently?
> In other words, how many of your users will be downloading at the same
> time?
>

I know default is 128, i tried 800 to see if it improved fairness, and it 
did :?

> > ¿Can some explain the exact meaning of limit and depth options?
>
> I am 95% sure of the following, which isn't in the ESFQ documentation
> yet because I just recently read the relevant paperwork and tried to
> understand more of the code.
>
> 'Limit' is the total number of packets ESFQ will queue before it starts
> finding packets to drop.
>
> ESFQ divides traffic into a number of smaller queues ("slots"), one for
> each flow. Flows are distinguished based on whatever aspect of the
> packets is hashed, such as source or destination. 'Depth' is the maximum
> number of slots.
>
> If there are more flows than 'depth', some flows might actually start
> sharing slots. Obviously, this is not good, and fairness will suffer.
>

So i only need as many flows as concurrent expected downloaders

> If there are 'limit' number of packets, ESFQ will simply drop a packet
> from the slot that has the most packets. This doesn't hurt fairness,
> since the longest slot will generally correspond to whichever flow has
> tried to transfer the most packets recently.
>

So limit is nearly a free value in what affects fairness


[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

end of thread, other threads:[~2007-02-11 21:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
2007-02-11 12:28 ` Tomasz Chilinski
2007-02-11 13:15 ` Alejandro Lorenzo Gallego
2007-02-11 14:20 ` Tomasz Chilinski
2007-02-11 15:19 ` Alejandro Lorenzo Gallego
2007-02-11 15:48 ` Tomasz Chilinski
2007-02-11 15:59 ` Alejandro Lorenzo Gallego
2007-02-11 19:10 ` Corey Hickey
2007-02-11 21:49 ` Alejandro Lorenzo Gallego

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.