Re: Really slow netstat and /proc/net/tcp in 2.4

From: Andi Kleen (
Date: Sat Oct 13 2001 - 11:07:43 EST

In article <Pine.LNX.4.21.0110131537470.931-100000@localhost.localdomain>,
Hugh Dickins <> writes:
> On Sat, 13 Oct 2001, Andi Kleen wrote:
>> I attached a patch. It allows you to get some simple statistics from
>> /proc/net/sockstat (unfortunately costly too). It also adds a new kernel
>> boot argument tcpehashgoal=order. Order is the log2 of how many pages you
>> want to use for the hash table (so it needs 2^order * 4096 bytes on i386)
>> You can experiment with various sizes and check which one gives still
>> reasonable hash distribution under load.

> Wouldn't something like "tcpehashbuckets" make a better boot tunable
> than "tcpehashorder"? Rounded up to next power of two before used.

I just hacked something quickly together so that people can test what
impact different hash tables sizes have on their workload, and for
that using the order was easiest. The goal is of course to do
automatic hash table tuning. I don't expect it to be an permanent
tunable. My hope is that it'll turn out that smaller hash tables will
be good enough.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:49 EST