Hi, On Wed, 20 Jun 2007 11:15:04 -0300 "Daniel van Ham Colchete" <[EMAIL PROTECTED]> wrote:
> I have a collocation server with a 2 Mbps bandwidth for my e-mail. I would > like to use SFQ to do a more fair split of this bandwidth between my users > (~500). I think SFQ is a very good idea: it will split the available > bandwidth between the current connections (almost) equally, and it's CPU > cheap. Yep. But remember: Connections, not users. > The problem is: from what I could read, SFQ can only read the available > bandwidth from the physical layer. Is it possible to tell SFQ something like > "I only have 2 Mbps, and not 100 Mbps, from eth0"? I didn't read anywhere it needs a bandwith parameter at all. And I think it really doesn't. From what I read in the source, /usr/src/linux/net/sched/sch_sfq.c, it merely just distributes incoming packets equally and it really only gets in between if the enqueuing rate exceeds the dequeuing rate -- by means of absolute packet buffer numbers, that is. In that case, using a TBF before giving packets to the SFQ would probably serve well. Also, you might want to use SFQ only for some connections, e.g. give precedence to DNS queries or similar stuff. Just put a TBF as root discipline, like (untested): $ tc qdisc add dev eth0 root handle :1 tbf rate 1920kbit latency 50ms burst 4096 and then set up a SFQ discipline: $ tc qdisc add dev eth0 parent 1:1 sfq If OTOH you decide to use PRIO scheduling for interactive traffic, you can probably fully replace the TBF by the HTB discipline and use SFQ at the ends of the subclasses. -hwh -- [EMAIL PROTECTED] mailing list