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 _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
В сообщении от Monday 29 October 2007 22:46:39 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
On Tuesday 30 October 2007 22:18, Aleksander Kamenik wrote:> Peter V. Saveliev wrote: > > 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
Peter V. Saveliev wrote:> 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 aleksander@krediidiinfo.ee Krediidiinfo AS http://www.krediidiinfo.ee/
On 29 Okt 2007, peet@altlinux.org wrote:> В сообщении от Monday 29 October 2007 22:46:39 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
WRR worked for me in the past but it is not maintained anymore. On 10/30/07, Jens Thiele <karme@berlios.de> wrote:> On 29 Okt 2007, peet@altlinux.org wrote: > > > В сообщении от Monday 29 October 2007 22:46:39 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 > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >-- Marco Casaroli SapucaiNet Telecom +55 35 34712377 ext. 5 _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Jens Thiele wrote:> 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.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