mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: bcrl@redhat.com
Cc: ak@muc.de, sim@netnation.com, linux-kernel@vger.kernel.org
Subject: Re: Awfully slow /proc/net/tcp, netstat, in.identd in 2.4 (updated)
Date: Fri, 19 Oct 2001 14:56:39 -0700 (PDT)	[thread overview]
Message-ID: <20011019.145639.59667516.davem@redhat.com> (raw)
In-Reply-To: <20011019173055.G9206@redhat.com>
In-Reply-To: <k23d4fwkv6.fsf@zero.aec.at> <20011019.135924.112609345.davem@redhat.com> <20011019173055.G9206@redhat.com>

   From: Benjamin LaHaise <bcrl@redhat.com>
   Date: Fri, 19 Oct 2001 17:30:55 -0400

   On Fri, Oct 19, 2001 at 01:59:24PM -0700, David S. Miller wrote:
   > And, for a 640MB ram machine, a 4MB hash table is perfectly
   > reasonable.
   
   That isn't wholly true.  A 4MB hash table can never fit in the cache of 
   an Athlon, and for one that's being used as a workstation with 1GB of 
   ram and maybe 60 connections active on average, that's a huge waste of 
   ram, and a guarantee that there will be lots of cache misses which just 
   aren't required.  Keep the cache footprint as low as possible -- it 
   results in a system that performs better.
   
It doesn't need to "fit in the cache" to perform optimally, that's
a load of crap Ben.

I actually tested this, and in fact on a cpu that has a meager 512K
cache at the time, and it did turn out to be more important to keep
the hash chains short than to keep it fitting in the cache.

So please don't give me any crap about "fitting in the cache" unless
you can show me hard numbers that show that it does in fact perform
worse.

Let me clue you in.  If the hash chains get long, you (instead of
cache missing on the table itself) are missing the cache several
times over walking the long hash chains.

Franks a lot,
David S. Miller
davem@redhat.com

  parent reply	other threads:[~2001-10-19 21:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18 16:42 Simon Kirby
2001-10-18 16:49 ` David S. Miller
2001-10-18 17:05   ` Simon Kirby
2001-10-19 12:57 ` Andi Kleen
2001-10-19 15:59   ` Simon Kirby
2001-10-19 18:22     ` Andi Kleen
2001-10-19 20:59     ` David S. Miller
2001-10-19 21:30       ` Benjamin LaHaise
2001-10-19 21:56       ` David S. Miller [this message]
2001-10-19 22:04         ` Benjamin LaHaise
2001-10-19 22:11         ` David S. Miller
2001-10-19 22:13           ` Benjamin LaHaise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011019.145639.59667516.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=ak@muc.de \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sim@netnation.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome