[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1282797931.2681.663.camel@edumazet-laptop>
Date: Thu, 26 Aug 2010 06:45:31 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Anton Blanchard <anton@...ba.org>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
miltonm@....com
Subject: Re: [PATCH] tcp: Fix sysctl_tcp_max_orphans when PAGE_SIZE != 4k
Le jeudi 26 août 2010 à 10:38 +1000, Anton Blanchard a écrit :
> Hi Dave,
>
> > Yeah, something like the following, Anton?
>
> Thanks! I tested on a 512GB box. One thing:
>
> # cat /proc/sys/net/ipv4/tcp_max_syn_backlog
> 128
>
> We probably want to use max():
>
> > - sysctl_max_syn_backlog = min(128, cnt / 256);
> > + sysctl_max_syn_backlog = max(128, cnt / 256);
>
I believe I make this min()/max() error once per week, sorry ;)
In my mind, I say "I want a minimum value of 128", then I write :
val = min(128, val);
instead of
val = max(128, val);
Oh well...
> With that change:
>
> # cat /proc/sys/net/ipv4/tcp_max_orphans
> 262144
> # cat /proc/sys/net/ipv4/tcp_max_tw_buckets
> 262144
> # cat /proc/sys/net/ipv4/tcp_max_syn_backlog
> 2048
>
>
> Tested-by: Anton Blanchard <anton@...ba.org>
>
> Anton
Seems pretty good to me, thanks !
BTW, we now auto-limit ehash to 512*1024 slots, so you probably have
same results on a 128GB or 4096GB machine ;)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists