Bug 55862 - top resource usage
Summary: top resource usage
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: procps
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-07 21:45 UTC by Frank Hirtz
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-02-11 12:54:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Frank Hirtz 2001-11-07 21:45:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010917

Description of problem:
It appears that certain kinds of processes - threaded apps in particular,
but not all of them - cause top to consume lots of cpu (mostly in system
usage, not user). This has been tracked down to access to the
/proc/$pid/statm (and sometimes stat) files being the cpu-hogging calls.

"time cat /proc/$pid/statm" looks like this for a process that negatively
impacts top cpu usage:
# time cat /proc/14080/statm
577836 577747 2192 321 255475 321951 575555

real    0m0.21s
user    0m0.00s
sys     0m0.20s

while the same command for most processes looks like this:
# time cat /proc/16577/statm
202 202 180 7 0 195 26

real    0m0.00s
user    0m0.00s
sys     0m0.00s

"ps" on the processes also seems to crawl when looking at those processes.

This doesn't appear to happen when using any particular kernel version - it
happens or doesn't based on the processes running on the machine.

--Red Hat has looked into this and it appears that it is due to a 
costly entry in /proc.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Run highly threaded app.
2.Run top
3.
	

Additional info:

Comment 1 Frank Hirtz 2002-07-08 15:14:11 UTC
 I believe that this was addressed with the statm patches which are now in advanced server.


Note You need to log in before you can comment on or make changes to this bug.