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:
I believe that this was addressed with the statm patches which are now in advanced server.