Discussion:
Fair que between 255 users
Thomas Elsgaard
2007-10-29 19:46:39 UTC
Permalink
Hello guys

I have a subnet with 255 users, which need to share 1 single slow internet
connection, so i would like to implement a kind of *fair queuing *on the
UPLOAD between them, which means that they all share the connection
equally..

The tools that i have available is: A linux box with IPROUTE2,HTB and TC..

I have looked at some examples, and my first idea was to make 255 entries in
iproute2, marking each source IP from 1-255 , and then adding one class in
HTB, with 255 childs... but isn't there a smarter way?

Does anyone have an example? or a good idea

Best regards

///Thomas
Peter V. Saveliev
2007-10-29 20:00:02 UTC
Permalink
Post by Thomas Elsgaard
Hello guys
I have a subnet with 255 users, which need to share 1 single slow internet
connection, so i would like to implement a kind of *fair queuing *on the
UPLOAD between them, which means that they all share the connection
equally..
The tools that i have available is: A linux box with IPROUTE2,HTB and TC..
I have looked at some examples, and my first idea was to make 255 entries
in iproute2, marking each source IP from 1-255 , and then adding one class
in HTB, with 255 childs... but isn't there a smarter way?
Does anyone have an example? or a good idea
<skip />

simply sfq -- is enough, isn't it?
--
Peter V. Saveliev
Jens Thiele
2007-10-30 16:50:19 UTC
Permalink
В сообщении от Monday 29 October 2007 22:46:39 Thomas Elsgaard
Post by Thomas Elsgaard
Hello guys
I have a subnet with 255 users, which need to share 1 single slow
internet connection, so i would like to implement a kind of *fair
queuing *on the UPLOAD between them, which means that they all share
the connection equally..
The tools that i have available is: A linux box with IPROUTE2,HTB and TC..
I have looked at some examples, and my first idea was to make 255
entries in iproute2, marking each source IP from 1-255 , and then
adding one class in HTB, with 255 childs... but isn't there a smarter
way?
Does anyone have an example? or a good idea
<skip />
simply sfq -- is enough, isn't it?
No (at least not yet?)

Quoting the man page (man sfq):
"SFQ does not shape traffic but only schedules the transmission of
packets, based on ’flows’. The goal is to ensure fairness so that each
flow is able to send data in turn, thus preventing any single flow from
drowning out the rest."

And:
"SFQ is work-conserving and therefore always delivers a packet if it
has one available."

ESFQ might help. Using google:
http://fatooh.org/esfq-2.6/

Note:
Corey Hickey is working on getting some ESFQ features into kernel
mainline SFQ:
Search for "SFQ: backport some features from ESFQ (try 5)" on netdev ml.

Greetings
Jens
Marco Aurelio
2007-10-30 17:01:50 UTC
Permalink
WRR worked for me in the past but it is not maintained anymore.
Post by Jens Thiele
÷ ÓÏÏÂÝÅÎÉÉ ÏÔ Monday 29 October 2007 22:46:39 Thomas Elsgaard
Post by Thomas Elsgaard
Hello guys
I have a subnet with 255 users, which need to share 1 single slow
internet connection, so i would like to implement a kind of *fair
queuing *on the UPLOAD between them, which means that they all share
the connection equally..
The tools that i have available is: A linux box with IPROUTE2,HTB and TC..
I have looked at some examples, and my first idea was to make 255
entries in iproute2, marking each source IP from 1-255 , and then
adding one class in HTB, with 255 childs... but isn't there a smarter
way?
Does anyone have an example? or a good idea
<skip />
simply sfq -- is enough, isn't it?
No (at least not yet?)
"SFQ does not shape traffic but only schedules the transmission of
packets, based on 'flows'. The goal is to ensure fairness so that each
flow is able to send data in turn, thus preventing any single flow from
drowning out the rest."
"SFQ is work-conserving and therefore always delivers a packet if it
has one available."
http://fatooh.org/esfq-2.6/
Corey Hickey is working on getting some ESFQ features into kernel
Search for "SFQ: backport some features from ESFQ (try 5)" on netdev ml.
Greetings
Jens
_______________________________________________
LARTC mailing list
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
--
Marco Casaroli
SapucaiNet Telecom
+55 35 34712377 ext. 5
Corey Hickey
2007-10-31 04:45:54 UTC
Permalink
Post by Jens Thiele
http://fatooh.org/esfq-2.6/
Corey Hickey is working on getting some ESFQ features into kernel
Search for "SFQ: backport some features from ESFQ (try 5)" on netdev ml.
Yep. :)

Unfortunately, the only missing feature from those patches is the
alternate hash types, which I will end up handling later, one way or
another.

My most recent ESFQ (tarball + incremental patch) still applies to
2.6.23.1 and builds fine. I haven't actually tested it, but I expect it
won't have any problems. That will suffice for now.

-Corey

Aleksander Kamenik
2007-10-30 14:18:06 UTC
Permalink
Post by Peter V. Saveliev
simply sfq -- is enough, isn't it?
sfq is great actually, but it works for connections. If you have say 10
users and 9 of them each have 1 active ftp RETR connections but the 10th
user has 100 active ftp RETR connections, then he gets 99,9% of traffic,
doesn't he? (just an example)

I think what the GP is looking for, as am I, is a simple way of giving
each user an equal share of the bandwidth.

This can be achieved for example by hundreds of HTB classes. But that's
the rub. I have 20 /24 internal networks which amounts to a maximum of
5000+ unique IP's which DHCP gives out. There are only about 500 active
users though and the total number of users (active at least once a
month) is probably around 1000.

I don't think it makes sense to create 5000 htb leaf classes and let
them all borrow from each other. 90% of them would be _only_ lending and
10% would be fighting over who gets the small bit of it.

What I'm looking for is something like the ISP's use. Like sfq which
creates fair queues per connections pools where each pool is a bunch of
connections from/to the same IP addr. Is there something like this for
linux?
--
Aleksander Kamenik
system administrator
+372 6659 649
***@krediidiinfo.ee

Krediidiinfo AS
http://www.krediidiinfo.ee/
Daniel
2007-10-30 13:50:09 UTC
Permalink
Post by Aleksander Kamenik
Post by Peter V. Saveliev
simply sfq -- is enough, isn't it?
sfq is great actually, but it works for connections. If you have say 10
users and 9 of them each have 1 active ftp RETR connections but the 10th
user has 100 active ftp RETR connections, then he gets 99,9% of traffic,
doesn't he? (just an example)
you can try esfq.

Daniel
PadiNet Makassar
Loading...