Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So, on a Solaris 10 10/09 zone, I am seeing all resident memory being used up. In attempting to located the process that is allocating all our physical memory, I notice that the RSS totals "prstat" gives do not add up to the entire total RSS used in the zone.

There are no shared memory segments, and pmap -x reports the same usage numbers as are reported for the individual processes in prstat.

Here is some command output. As you can see, adding the RSS for the top processes is nowhere close to the overall RSS reported (5063M).

# prstat -n 20 -s rss -Z
PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
18481 nobody     14G 1457M cpu18   30    0   0:20:51 4.3% java/272
18970 nobody    435M  399M sleep   59    0   0:02:44 1.2% java/30
19083 nobody    371M  363M sleep   59    0   0:02:08 0.4% java/47
18803 nobody    330M  257M sleep   59    0   0:09:51  13% java/366
22260 nobody    410M  132M sleep   59    0   3:52:07 0.3% java/23
12430 daemon     81M   35M sleep   59    0   0:00:23 0.0% httpd/28
12429 daemon     87M   33M sleep   59    0   0:00:22 0.0% httpd/28
...
very low usage processes
....
ZONEID    NPROC  SWAP   RSS     MEMORY  TIME      CPU  ZONE
17        93    3197M   5063M   99%     24:57:19  27%  cygna

Any idea where all the physical memory has gone?

share|improve this question
    
Are you swapping? (Show copy of vmstat -s). –  mdpc Feb 18 '13 at 23:01
    
You are running zones...apparently a number of them right? –  mdpc Feb 18 '13 at 23:03
    
There is no evidence the RSS sum doesn't add up to 5063 MB. There are 87 remaining processes and 2387M missing. That would make an average of 27 MB per process which is compatible with the 33 MB limit. –  jlliagre Feb 19 '13 at 6:39
    
OK - I did add up the remaining processes RSS commitments. The 33MB you see quickly falls off to the 10 then 3-4MB per process. The output I show is sorted highest to lowest RSS usage. In all, the remaining processes that I cut off only use 400MB of RSS space. –  Gary Feb 19 '13 at 14:13
add comment

1 Answer

resident and shared overlap, or: shared memory pages are not exclusive. e.g. if multiple processes have libc mapped into their memory space then these will be shared (until COW makes them not shared). The output of pmap may help.

Also see this answer for some insight, though bear in mind that Solaris and Linux memory management differ in a few details (the most important being the approach to overcommit): http://stackoverflow.com/questions/1612939/why-does-the-sun-jvm-continue-to-consume-ever-more-rss-memory-even-when-the-heap

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.