Subject: Re: [PATCH] net: Saner thash_entries default with much memory

From: Andi Kleen <[email-masked]>
Date: Fri, 26 Oct 2007 17:34:17 +0200

On Fri, Oct 26, 2007 at 05:21:31PM +0200, Jean Delvare wrote:
> I know that /proc/net/tcp is
> deprecated in favor of tcp_diag, however at the moment netstat only
> knows of the former.

Even tcp_diag will be slow when all slots are dumped. It's a fundamental
problem of the data structure. /proc has slightly higher constant
factor overhead, that's all.

Also there are some tricks to make it a little faster (e.g.
the old patches to not take the lock for empty buckets) but again
it's only just patching constant factors, not the fundamental
scaling issue.

> I propose 2 millions of entries as the arbitrary high limit. This

It's probably still far too large.

-Andi