Subject: Re: large divisor for flow classifier

From: Jarek Poplawski <[email-masked]>
Date: Fri, 15 Oct 2010 23:10:25 +0200

Eric Dumazet wrote:
> Le vendredi 15 octobre 2010 à 14:14 -0400, Jonathan Thibault a écrit :
>> It appears that when setting a fairly large divisor on the flow classifier for sfq, traffic stops altogether.
>>
>> On my machine, anything above divisor 2200 seems to stop all traffic.  If I want to be fair between hosts (but not flows) for a large network (say 6000 hosts), I run into problems.  Obviously the rates here are quite low but this is just an example.
...
> SFQ is limited to a 1024 divisor
> 
> You might try following patch :
> 
> (8192 is the smallest power of two greater than 6144)
> 
> sizeof(struct sfq_sched_data) becomes 0x2ccc instead of 0x10cc
> 
> keep in mind hash distribution is not perfect.
> 
> What would be the real rate ?
> 
> 
> diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
> index 3cf478d..c4a53d6 100644
> --- a/net/sched/sch_sfq.c
> +++ b/net/sched/sch_sfq.c
> @@ -77,7 +77,7 @@
>  	It is easy to increase these values, but not in flight.  */
>  
>  #define SFQ_DEPTH		128
> -#define SFQ_HASH_DIVISOR	1024
> +#define SFQ_HASH_DIVISOR	8192

Because of low SFQ_DEPTH, which limits its queue to 127 packets,
SFQ isn't suitable for serving so many users. There is sch_drr as
a replacement, alas more complex and undocumented, but google should
help you enough.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=13d2a1d2b032de08d7dcab6a1edcd47802681f96

Jarek P.