From: Rusty Russell <rusty@rustcorp.com.au>
To: Alexander Viro <viro@math.psu.edu>
Cc: mbligh@aracnet.com, ahu@ds9a.nl, peter@chubb.wattle.id.au,
jw@pegasys.ws, linux-kernel@vger.kernel.org
Subject: Re: ps performance sucks (was Re: dcache_rcu [performance results])
Date: Thu, 7 Nov 2002 23:06:13 +1100 [thread overview]
Message-ID: <20021107230613.5194156c.rusty@rustcorp.com.au> (raw)
In-Reply-To: <Pine.GSO.4.21.0211051932140.6521-100000@steklov.math.psu.edu>
On Tue, 5 Nov 2002 19:34:47 -0500 (EST)
Alexander Viro <viro@math.psu.edu> wrote:
> On Tue, 5 Nov 2002, Martin J. Bligh wrote:
>
> > It's not a few files if you have large numbers of tasks. It's an
> > interface that fundamentally wasn't designed to scale, and futzing
> > around tweaking the thing isn't going to cut it, it needs a different
> > design. I'm not proposing throwing out any of the old simple interfaces,
> > just providing something efficient as a data gathering interface for
> > those people who wish to use it.
>
> That's odd, to say the least. Userland side is at least linear by
> number of tasks, regardless of the way you gather information. So
> I really wonder how opening O(number of tasks) files can show up
> when you scale the things up - pure userland parts will grow at
> least as fast as that.
And I look forward to your "du" interface the kernel, too. It uses
this terrible method of statting every file!
Now, according to wli, there's a real problem with starvation by saturating
the read side of the tasklist_lock so eg. the write_lock_irq(&tasklist_lock)
in exit.c's release_task causes a CPU to spin for ages (forever?) with
interrupts off. This needs fixing, be it RCU or making that particular
lock give way to writers, or some other effect.
But the "ps takes too much time from my benchmarks" is a "don't do that".
Or you may really hate the /dev/kmem hack, but it's simple and effective.
The "hundreds of users doing ps/top" is easily solved with a "ps" daemon.
Fixing top is probably a worthwhile thing to do, and you'll note that after
the first iteration it should be rarely neccessary to read every "stat"
proc file.
Optimize userspace before putting a hack into the kernel, *please*!
Rusty.
--
there are those who do and those who hang on and you don't see too
many doers quoting their contemporaries. -- Larry McVoy
next prev parent reply other threads:[~2002-11-08 0:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <993103655@toto.iv>
2002-11-05 22:49 ` ps performance sucks (was Re: dcache_rcu [performance results]) Peter Chubb
2002-11-06 0:06 ` Martin J. Bligh
2002-11-05 23:16 ` bert hubert
2002-11-06 0:57 ` Martin J. Bligh
2002-11-06 0:10 ` bert hubert
2002-11-06 1:23 ` Martin J. Bligh
2002-11-06 0:34 ` Alexander Viro
2002-11-07 12:06 ` Rusty Russell [this message]
2002-11-08 3:57 ` William Lee Irwin III
2002-11-08 4:17 ` Robert Love
2002-11-08 4:27 ` Daniel Jacobowitz
2002-11-08 4:29 ` William Lee Irwin III
2002-10-30 10:49 [PATCH 2.5.44] dcache_rcu Maneesh Soni
2002-10-31 10:53 ` dcache_rcu [performance results] Dipankar Sarma
2002-11-02 1:36 ` Andrew Morton
2002-11-02 9:13 ` Dipankar Sarma
2002-11-04 17:29 ` Martin J. Bligh
2002-11-05 0:00 ` jw schultz
2002-11-05 1:14 ` ps performance sucks (was Re: dcache_rcu [performance results]) Martin J. Bligh
2002-11-05 3:57 ` Werner Almesberger
2002-11-05 4:42 ` Erik Andersen
2002-11-05 5:44 ` Martin J. Bligh
2002-11-05 5:59 ` Alexander Viro
2002-11-05 6:05 ` Martin J. Bligh
2002-11-05 6:15 ` Robert Love
2002-11-05 6:13 ` Erik Andersen
2002-11-05 6:14 ` Werner Almesberger
2002-11-05 4:26 ` jw schultz
2002-11-05 5:51 ` Martin J. Bligh
2002-11-05 19:57 ` Kai Henningsen
2002-11-05 21:33 ` Erik Andersen
2002-11-05 22:09 ` Karim Yaghmour
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=20021107230613.5194156c.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=ahu@ds9a.nl \
--cc=jw@pegasys.ws \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
--cc=peter@chubb.wattle.id.au \
--cc=viro@math.psu.edu \
/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