Red Hat Bugzilla – Bug 157171
Process memory usage incorrect in top.
Last modified: 2007-11-30 17:07:07 EST
+++ This bug was initially created as a clone of Bug #137927 +++
Description of problem:
The top utility is reporting incorrect values for memory usage of
several long running processes.
We have Linux rac5 2.4.21-27.EL #1 SMP Wed Dec 1 21:54:21 EST 2004 ia64 ia64
Applied all the patches, and still having the issue.
reported memory usage grows the longer the processes are running.
16:32:50 up 14 days, 3:54, 23 users, load average: 0.33, 0.17, 0.06
133 processes: 132 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 10.4% 0.6% 5.2% 0.2% 0.0% 0.2% 182.8%
cpu00 0.6% 0.0% 0.3% 0.0% 0.0% 0.0% 99.0%
cpu01 9.9% 0.6% 4.9% 0.3% 0.0% 0.3% 83.8%
Mem: 509876k av, 495460k used, 14416k free, 0k shrd,
339952k actv, 62768k in_d, 6932k in_c
Swap: 1044216k av, 398044k used, 646172k free
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
24717 smithj4 15 0 1591M 1.6G 3720 S 4.6 319.4 248:32 1 gkrellm
5148 smithj4 15 0 905M 894M 14876 S 0.0 179.7 109:55 0
6232 smithj4 15 0 805M 785M 5460 S 0.3 157.7 99:32 1
4625 root 15 0 870M 582M 7512 S 3.7 117.0 647:44 0 X
4726 smithj4 15 0 467M 463M 5184 S 0.3 93.0 35:02 0
4472 root 15 0 98968 96M 540 S 0.0 19.4 0:01 0 crond
The ps command shows that gkrellm for example is using around 17MB of
memory instead of the nearly 1.6GB that top shows:
# ps aux | grep gkrellm
smithj4 24717 2.3 0.9 17080 4924 ? S Oct26 248:50 gkrellm
Compiled the attachment shown here:
and ran the executable:
getpagesize()=4096, PAGE_SHIFT: 12, pgshift: 2
> Applied all the patches, and still having the issue.
Applied what patches?
Exactly how does one reproduce this problem?
And what does the "pagesize" program have to do with it? Was the version
whose output you show compiled on a 32-bit x86, and then run on an ia64?
Are the programs with the ps/top memory-size inequity 32-bit executables?
I'm completely confused...
Hmm.. it's not perfect bug report... I think clone a bug is not enough, better
is clone -> think & edit -> commit new report bug :-)
Please, ignore the program "pagesize" -- don't forget it's "clone of bug
#137927" where it was used during bug investigation only.
The original bug was possible detect by:
For details see bug #137927.
Ok, can we confirm that this is an ia64-specific bug?
I an running 2.4.21-32 (the latest proposed RHEL3-U5 kernel) on an ia64, and
the proc-mem-test.py test returns: "The resident memory information test PASS"
every time I run it.
Also, running a VM-test program with a large RSS, I don't see
any discrepancies between the output of top vs. ps, regardless
of how long it runs.
Can somebody please post a test program that shows the problem
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.