[LARTC] esfq test !!
Hi Alex !! I use esfq with src ip hash type in htb for www and ftp traffic. All working fine !! src ip hash type work almost such as WRR - if user open many connections esfq give to all his connections same priority such as user with little number of connections, yes !! I use esfq with many other patches, all work and compile fine ! list of patches : from patch-o-matic (iptables-1.2.7-20020527) arptables,netfilter-arp,REJECT-dont_fragment,ulog-module-unload, 0-newnat13,conntrack,dscp,DCSP,ownercmd,pkttype,iplimit,ipv4options, mport,NETMAP,nth,psd,quota,random,realm,SAME,time,TTL,CONNMARK,h323-conntrack-nat, helper,IMQ,pptp-conntrack-nat,recent,string,tcp-window-tracking also htb-3.6,IMQ , patch for pfifo_fast from Patrick McHardy and esfq of course ! Now I start test it (for a long time) at our internet gw with 64kbit DSL and 1,5 mbit DVB (one direction) Thanks for great work Alex !! I have fun !! :) --- mailto:[EMAIL PROTECTED] BR Alexey Talikov FORTEK --- ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Some work to extend SFQ to be more configurable
Hi there! On Tue, 4 Jun 2002, Martin Devera wrote: > This is often discussed and is on "TODO" for someone ;) > > > > > SFQ is connection oriented. right? > > Would be a good idea to make the queues per ip rather than per tcp flow? > > So there would be per host fairnes. I've done some in this direction , probably needs more work, and it's poorly tested - expect b00ms ;) This adds a new qdisc for now - esfq which is a 100% clone of original sfq. - You can set all sfq parameters: hash table size, queue depths, queue limits. - You can choose from 3 hash types: original(classic), dst ip, src ip. Things to consider: perturbation with dst and src hashes is not good IMHO, you can try with perturb 0 if it couses trouble. Please, see the attached files. Plaing with it gives interesting results: higher depth -> makes flows equal slower small depth -> makes flows equal faster limit kills big delays when set at about 75-85% of depth. Needs testings and mesurements - that's why i made it separate qdisc and not a patch over sfq, i wanted to compare both. Any feedback good or bad is welcome. -- have fun, alex You need: iproute2-2.2.4-now-ss001007.tar.gz linux-2.4.18.tar.gz This may work with next versions too. Example Step by Step install -- Install kernel: tar zxvf linux-2.4.18.tar.gz cd linux cat linux-2.4.18-esfq.diff | patch -p1 make menuconfig Now you have it in: Networking options ---> QoS and/or fair queueing ---> ESFQ queue Configure and install kernel make dep clean bzImage modules_install cp System.map /boot/ cp arch/i386/boot/bzImage /boot/bzImage Edit lilo.conf and add your new kernel. -- Install iproute: tar zxvf iproute2-2.2.4-now-ss001007.tar.gz cd iproute2 cat iproute2-2.2.4-now-ss001007-esfq.diff | patch -p1 make /* Note: If you get an error in lib/ll_proto.c comment _PF(ECHO,echo) */ cp tc/tc your_favourite_iproute_path/tc cp ip/ip your_favourite_iproute_path/ip -- Usage: ... esfq [ perturb SECS ] [ quantum BYTES ] [ depth FLOWS ] [ divisor HASHBITS ] [ limit PKTS ] [ hash HASHTYPE] Where: HASHTYPE := { classic | src | dst } Examples: tc qdisc add dev eth0 root esfq limit 128 depth 128 divisor 10 \ hash classic perturb 15 Setups a classic SFQ. tc qdisc add dev eth0 root esfq limit 64 depth 64 divisor 11 \ hash dst Setups a dst SFQ with limit and depth of 64 packets and 11bits (2048 rows) hash table. 1:1 with sch_sfq. You can experiment with the values as you like to find the best which sfq can do for you. More can be found in: linux/net/sched/sch_sfq.c linux/net/sched/sch_esfq.c Limits: - limit must be less than depth - divisor must be less than 15 diff -urN iproute2.orig/tc/Makefile iproute2/tc/Makefile --- iproute2.orig/tc/Makefile Sun Apr 16 20:42:53 2000 +++ iproute2/tc/MakefileTue May 14 23:04:10 2002 @@ -5,6 +5,7 @@ TCMODULES := TCMODULES += q_fifo.o TCMODULES += q_sfq.o +TCMODULES += q_esfq.o TCMODULES += q_red.o TCMODULES += q_prio.o TCMODULES += q_tbf.o diff -urN iproute2.orig/tc/q_esfq.c iproute2/tc/q_esfq.c --- iproute2.orig/tc/q_esfq.c Thu Jan 1 02:00:00 1970 +++ iproute2/tc/q_esfq.cThu May 16 02:13:30 2002 @@ -0,0 +1,169 @@ +/* + * q_esfq.cESFQ. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors:Alexey Kuznetsov, <[EMAIL PROTECTED]> + * + * Changes:Alexander Atanasov, <[EMAIL PROTECTED]> + * Added depth,limit,divisor,hash_kind options. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "utils.h" +#include "tc_util.h" + +static void explain(void) +{ + fprintf(stderr, "Usage: ... esfq [ perturb SECS ] [ quantum BYTES ] [ depth +FLOWS ]\n\t[ divisor HASHBITS ] [ limit PKTS ] [ hash HASHTYPE]\n"); + fprintf(stderr,"Where: \n"); + fprintf(stderr,"HASHTYPE := { classic | src | dst }\n"); +} + +#define
RE: [LARTC] SFQ buckets
> This is often discussed and is on "TODO" for someone > > > SFQ is connection oriented. right? > > Would be a good idea to make the queues per ip rather than per tcp > > flow? So there would be per host fairnes. And all the discussions tend to lead to the conclusion that there should be an sfq option (when the queue is created) for: a) how big the hash is b) whether to take into account source ports or not c) whether to take into account destination ports or not d) etc. :) Maybe someone who's written a qdisc would feel up to this? -- Michael T. Babcock CTO, FibreSpeed Ltd. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] SFQ buckets
This is often discussed and is on "TODO" for someone ;) > > SFQ is connection oriented. right? > Would be a good idea to make the queues per ip rather than per tcp flow? > So there would be per host fairnes. > > Regards. > > -- > ... ___ ... > | /| |\ | > | /-| Pedro Larroy Tovar. PiotR | http://omega.resa.es/piotr |-\ | > | /--|No MS-Office attachments please. |--\ | > o-|--| e-mail: [EMAIL PROTECTED]|--|-o > | \-|finger [EMAIL PROTECTED] for public key and info |-/ | > |...\|_|/...| > ___ > LARTC mailing list / [EMAIL PROTECTED] > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] SFQ buckets
On Tue, Jun 04, 2002 at 08:39:14PM +0200, Martin Devera wrote: > Probably the more cheap way is to simply increase no of buckets. > With adaptive bin number you will probably end up with linear > hashing which is still fast but increasing no of bucket and keep > single level search will probably be yet faster. > Just my opinion ... > devik SFQ is connection oriented. right? Would be a good idea to make the queues per ip rather than per tcp flow? So there would be per host fairnes. Regards. -- ... ___ ... | /| |\ | | /-| Pedro Larroy Tovar. PiotR | http://omega.resa.es/piotr |-\ | | /--|No MS-Office attachments please. |--\ | o-|--| e-mail: [EMAIL PROTECTED]|--|-o | \-|finger [EMAIL PROTECTED] for public key and info |-/ | |...\|_|/...| ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] SFQ buckets
Probably the more cheap way is to simply increase no of buckets. With adaptive bin number you will probably end up with linear hashing which is still fast but increasing no of bucket and keep single level search will probably be yet faster. Just my opinion ... devik On Tue, 4 Jun 2002, Michael T. Babcock wrote: > Just a thought, after talking to a friend who's doing his master's work > on RED and other queueing algorithms ... > > ... What if SFQ were to start with a minimal number of buckets, and > track how 'deep' each bucket was, then go to a larger number of bits > (2/4 at a time?) if the buckets hit a certain depth? Theoretically, > this would mean that 'fairness' would be achieved more often in current > collision situations but that a smaller number of buckets would be > necessary to achieve fairness in currently low-collision situations. > > I haven't looked at the SFQ code in a while, so I don't know how much > benefit this would be in terms of processing time, or even how expensive > it would be to change hash sizes on the fly, but at a certain level of > resolution (+/- 2-4 bits), the changes wouldn't be terribly frequent > anyway. > > I've always been a bit of a fan of self-tuning algorithms anyway :) > -- > Michael T. Babcock > CTO, FibreSpeed Ltd. > > ___ > LARTC mailing list / [EMAIL PROTECTED] > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Isolated Class in HTB
On Tuesday 04 June 2002 18:50, [EMAIL PROTECTED] wrote: > I see.. But Can I attach more than one root class in one Device > (Ethernet)..? I am sorry but I don`t find any case or example like this > before.. You can only attach one qdisc to a device. If you want to have a class that will not borrow, nor lend from/to other classes, you can do this (copied from your setup) : root qdisc class 1:1 rate = ceil = 426 Kbit class 1:40 rate = ceil = 86 Kbit class 1:2 rate = ceil = 340 Kbit (426 - 86) class 1:20 rate = 86, ceil = 340 Kbit class 1:30 rate = 86, ceil = 340 Kbit class 1:50 rate = 64, ceil = 64 Kbit class 1:60 rate = 1, ceil = 10Mbit (Why ???) class 1:40 will never lend nor borrow bandwidth from the other classes. Stef -- [EMAIL PROTECTED] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] SFQ buckets
Just a thought, after talking to a friend who's doing his master's work on RED and other queueing algorithms ... ... What if SFQ were to start with a minimal number of buckets, and track how 'deep' each bucket was, then go to a larger number of bits (2/4 at a time?) if the buckets hit a certain depth? Theoretically, this would mean that 'fairness' would be achieved more often in current collision situations but that a smaller number of buckets would be necessary to achieve fairness in currently low-collision situations. I haven't looked at the SFQ code in a while, so I don't know how much benefit this would be in terms of processing time, or even how expensive it would be to change hash sizes on the fly, but at a certain level of resolution (+/- 2-4 bits), the changes wouldn't be terribly frequent anyway. I've always been a bit of a fan of self-tuning algorithms anyway :) -- Michael T. Babcock CTO, FibreSpeed Ltd. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Isolated Class in HTB
I see.. But Can I attach more than one root class in one Device (Ethernet)..? I am sorry but I don`t find any case or example like this before.. Thnx In Advanced > Use independent root. I.e. create 1:40 with 1:0 as root not 1:2. > Roots of hierarchy are isolated each against other. > And like someone other wrote, use ceil to bound both 1:2 and 1:40 > to appropriate values. > devik > >> My problem is One faculty (Class 1:40) don`t want to borrow and lend >> bandwith to other classes. >> I use SFQ as queing discipline. In CBQ with TBF we can do ISOLATED and >> BOUNDED.. How to do it in HTB .? >> >> Thnx >> >> >> ___ >> LARTC mailing list / [EMAIL PROTECTED] >> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Policy Routing (Again)
> Then I decided to mark all outgoing SMTP packets with fwmark 1 (marked > using iptables). I've marked them like this: > > iptables -t mangle -A OUTPUT - p tcp --dport 25 -j MARK --set-mark 1 > > I have, then, added a rule pointing to alternative routing table: > > ip rule add priority 15000 fwmark 1 table mail > > I have flushed routing cache with: > > ip route flush cache > > And have generated some traffic trying to telnet port 25 of an external > route from the router/SMTP (see picture above). Try this: ip ro del default ip ro add default via x.y.z.t table default Let me know if it works. > > Sniffing network shown me that packets have exited with source address > 10.11.0.1, which means my set up is completly useless. > > Just for the records, I am using v1.2.5 in a Debian (woody) with kernel > 2.4.18 (only HTB patch). > > Any help would be very welcome. > > Thank you in advnace for your time. > -- > Sellaro > > Agente Livre - Linux Community (www.agentelivre.org) > > PGP Key ID: 3ADF8645 > PGP Key Fingerprint: 6AB0 D60B 69B5 B3F9 4553 2242 A1D0 17C0 3ADF 8645 > > ___ > LARTC mailing list / [EMAIL PROTECTED] > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > --- Catalin(ux) BOIE [EMAIL PROTECTED] openh323://dino.rdsbv.ro ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Isolated Class in HTB
Use independent root. I.e. create 1:40 with 1:0 as root not 1:2. Roots of hierarchy are isolated each against other. And like someone other wrote, use ceil to bound both 1:2 and 1:40 to appropriate values. devik > My problem is One faculty (Class 1:40) don`t want to borrow and lend > bandwith to other classes. > I use SFQ as queing discipline. In CBQ with TBF we can do ISOLATED and > BOUNDED.. How to do it in HTB .? > > Thnx > > > ___ > LARTC mailing list / [EMAIL PROTECTED] > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/