Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 142994 - Per-process shared memory is greater than resident memory
Per-process shared memory is greater than resident memory
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-12-15 12:08 EST by Lev Makhlis
Modified: 2015-01-04 17:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-15 12:27:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lev Makhlis 2004-12-15 12:08:33 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)

Description of problem:
Quoting Hugh Dickins:
"The third "shared" field of /proc/$pid/statm in 2.4 was a count of
pages in the mm whose page_count is more than 1 (oddly, including
pages shared just with swapcache).  That's too costly to calculate
each time, so 2.6 changed it to the total file-backed extent.  But
Andrea knows apps and users surprised when (rss - shared) goes
negative: we need to provide an rss-like statistic, close to the 2.4

Something that's quick and easy to maintain accurately is
mm->anon_rss, the count of anonymous pages in the mm.  Then shared =
rss - anon_rss gives a pretty good and meaningful approximation to
2.4's intention: wli confirms that this will be useful to Oracle too."

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

How reproducible:

Steps to Reproduce:
1. Run "top"


Actual Results:    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM  
 3098 root      17   0  3292  924 1664 R  1.0  0.5   0:01.11 top

Expected Results:  SHR < RES

Additional info:

Please consider merging Hugh's patches from 2.6.10-rc2:
Comment 1 Jason Baron 2004-12-15 12:27:02 EST
these have been merged already. thanks.

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