public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Kirby <sim@netnation.com>
To: linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@redhat.com>
Subject: Really slow netstat and /proc/net/tcp in 2.4
Date: Thu, 11 Oct 2001 11:47:36 -0700	[thread overview]
Message-ID: <20011011114736.A13722@netnation.com> (raw)

Is there something that changed from 2.2 -> 2.4 with regards to the
speed of netstat and /proc/net/tcp?  We have some webservers we just
upgraded from 2.2.19 to 2.4.12, and some in-house monitoring tools that
check /proc/net/tcp have begun to suck up a lot of CPU cycles trying to
read that file.

A simple cat or wc -l on the file feels like about on the order of two
magnitudes slower ("time" reports around a second when the file has 450
entries).  Some servers seem to be worse than others, and it does not
appear to be proportional to the number of entries across servers.

netstat -tn just crawls along on these servers.  Should I enable
profile=1 or something to see what's happening here?

Examples:

2.2.19:

[sroot@marble:/root]# time wc -l /proc/net/tcp
    858 /proc/net/tcp
0.000u 0.010s 0:00.01 100.0%    0+0k 0+0io 112pf+0w

2.4.12:

[sroot@pro:/root]# time wc -l /proc/net/tcp
    463 /proc/net/tcp
0.000u 0.640s 0:00.64 100.0%    0+0k 0+0io 69pf+0w

Simon-

[  Stormix Technologies Inc.  ][  NetNation Communications Inc. ]
[       sim@stormix.com       ][       sim@netnation.com        ]
[ Opinions expressed are not necessarily those of my employers. ]

             reply	other threads:[~2001-10-11 18:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-11 18:47 Simon Kirby [this message]
2001-10-11 19:30 ` Really slow netstat and /proc/net/tcp in 2.4 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
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=20011011114736.A13722@netnation.com \
    --to=sim@netnation.com \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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