linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] /proc/<pid>/stat access stalls badly for swapping process,  2.4.0-test10
@ 2000-11-01 18:38 David Mansfield
  2000-11-01 18:48 ` Rik van Riel
  0 siblings, 1 reply; 16+ messages in thread
From: David Mansfield @ 2000-11-01 18:38 UTC (permalink / raw)
  To: lkml

Hi VM/procfs hackers,

System is UP Athlon 700mhz with 256mb ram running vanilla 2.4.0-test10.
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

I'd like to report what seems like a performance problem in the latest
kernels.  Actually, all recent kernels have exhibited this problem, but
I was waiting for the new VM stuff to stabilize before reporting it. 

My test is: run 7 processes that each allocate and randomly access 32mb
of ram (on a 256mb machine).  Even though 7*32MB = 224MB, this still
sends the machine lightly into swap.  The machine continues to function
fairly smoothly for the most part.  I can do filesystem operations, run
new programs, move desktops in X etc.

Except: programs which access /proc/<pid>/stat stall for an inderminate
amount of time.  For example, 'ps' and 'vmstat' stall BADLY in these
scenarios.  I have had the stalls last over a minute in higher VM
pressure situations. 

Unfortunately, when system is thrashing, it's nice to be able to run
'ps' in order to get the PID to kill, and run a reliable vmstat to
monitor it.

Here's a segment of an strace of 'ps' showing a 12 second stall (this
isn't the worst I've seen by any means, but a 12 second stall trying to
get process info for 1 swapping task can easily snowball into a DOS).

     0.000119 open("/proc/4746/stat", O_RDONLY) = 7
     0.000072 read(7, "4746 (hog) D 4739 4739 827 34817"..., 511) = 181
    12.237161 close(7)                  = 0

The wchan of the stalled 'ps' is in __down_interruptible, which probably
doesn't help much.

This worked absolutely fine in 2.2.  Even under extreme swap pressure,
vmstat continues to function fine, spitting out messages every second as
it should.

David Mansfield
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <Pine.Linu.4.10.10011091452270.747-100000@mikeg.weiden.de>]

end of thread, other threads:[~2000-11-11  6:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-01 18:38 [BUG] /proc/<pid>/stat access stalls badly for swapping process, 2.4.0-test10 David Mansfield
2000-11-01 18:48 ` Rik van Riel
2000-11-02  7:19   ` Mike Galbraith
2000-11-02 21:59     ` Val Henson
2000-11-03  1:37       ` Jens Axboe
2000-11-03  5:56         ` Mike Galbraith
2000-11-03 15:45           ` Mike Galbraith
2000-11-03 19:38             ` Jens Axboe
2000-11-04  5:43               ` Mike Galbraith
2000-11-02  8:40   ` Christoph Rohland
     [not found] <Pine.Linu.4.10.10011091452270.747-100000@mikeg.weiden.de>
2000-11-09 18:31 ` Linus Torvalds
2000-11-10  7:34   ` Mike Galbraith
2000-11-10 10:47     ` Mike Galbraith
2000-11-10 17:07     ` Linus Torvalds
2000-11-10 21:42   ` [BUG] /proc/<pid>/stat access stalls badly for swapping process,2.4.0-test10 David Mansfield
2000-11-11  6:20     ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).