public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Simon Kirby <sim@netnation.com>
Cc: linux-kernel@vger.kernel.org, kuznet@ms2.inr.ac.ru
Subject: Re: Really slow netstat and /proc/net/tcp in 2.4
Date: 12 Oct 2001 21:56:01 +0200	[thread overview]
Message-ID: <k2sncok4z2.fsf@zero.aec.at> (raw)
In-Reply-To: <20011011114736.A13722@netnation.com> <200110111930.XAA28404@ms2.inr.ac.ru> <20011011125538.C10868@netnation.com>
In-Reply-To: Simon Kirby's message of "Thu, 11 Oct 2001 12:55:38 -0700"

In article <20011011125538.C10868@netnation.com>,
Simon Kirby <sim@netnation.com> writes:
> On Thu, Oct 11, 2001 at 11:30:25PM +0400, kuznet@ms2.inr.ac.ru wrote:
>> Hello!
>> 
>> > Is there something that changed from 2.2 -> 2.4 with regards to the
>> > speed of netstat and /proc/net/tcp?
>> 
>> Incredibly high size of hash table, I think.
>> At least here size is ~1MB. And all this is read each 1K of data read
>> via /proc/ :-)

> So it's walking the hash table per block read, and the hash table is very
> large?  Hmm.  I notice it's a bit faster if I use dd if=/proc/net/tcp
> of=/dev/null bs=1024k, but not much.

> Is it possible to fix this?  Was the 2.2 hash table just that much
> smaller?

The hash table is likely to big anyways; eating cache and not helping that
much. If you're interested in some testing
I can send you patches to change it by hand and collect statistics for
average hash queue length. Then you can figure out a good size for your
workload with some work. Longer time I think the table sizing heuristics
are far too aggressive and need to be throttled back; but that needs more
data from real servers.

-Andi


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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-11 18:47 Really slow netstat and /proc/net/tcp in 2.4 Simon Kirby
2001-10-11 19:30 ` kuznet
2001-10-11 19:55   ` Simon Kirby
2001-10-12 16:44     ` kuznet
2001-10-12 19:36       ` Simon Kirby
2001-10-12 19:43         ` kuznet
2001-10-12 19:56     ` Andi Kleen [this message]
2001-10-12 22:10       ` Simon Kirby
2001-10-12 23:57         ` Andi Kleen
2001-10-13 15:07           ` Hugh Dickins
2001-10-13 16:07             ` Andi Kleen

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=k2sncok4z2.fsf@zero.aec.at \
    --to=andi@firstfloor.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --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