cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Management

SOLVED
Go to solution
Mike Bradley
Occasional Visitor

Memory Management

While analyzing application processes, the process stat shows a process size (vsz) of 24mb, but if I view the same process in Glance it reports RSS/VSS of 39.8mb/96.4mb respectively. I have also seen the RSS higher than the VSS. If the VSS is the total memory requirement should the entire process reside in memory, how could the RSS be higher if it reflects the amount occupied by the process. I'm running 10.20 on a K570. What can I check to get a clear picture of the memory actually in use by a particular process and why the ?discrepancies? between output? Thanks!
Free the inodes!
2 REPLIES
harry d brown jr
Honored Contributor
Solution

Re: Memory Management




The size (in KB) of resident memory for the process. This consists of text, data, stack, as well as the process' portion of shared memory regions (such as, shared libraries, text segments, and shared data).


Resident memory (RSS) is calculated as

RSS = sum of private region pages +

(sum of shared region pages /

number of references)


The number of references is a count of the number of attachments to the memory region. Attachments, for shared regions, may come from several processes sharing the same memory, a single process with multiple attachments, or combinations of these.


This value is only updated when a process uses CPU. Thus, under memory pressure, this value may be higher than the actual amount of resident memory for processes which are idle.


On HP-UX 10.20, the kernel instrumentation doubles the reported size of private regions. To compensate for this, the total reported RSS for each process is halved.


On HP-UX 11.0 and beyond, this metric accurately reports the resident memory for the process.


Note, a value of "na" may be shown for the swapper process.


This metric is specific to a process. If this metric is reported for a kernel thread, the value for its associated process is given.


from the help pages of glance.


live free or die
harry
Live Free or Die
Tore_1
Regular Advisor

Re: Memory Management

ps -efl and glance show different rss and vsz
because they interpret process size differently. Ps only calculates the "core image", where as glance sums up the shared memory bits as well. Also, ps shows rss (sz column) in 4k pages and vsz in kilobytes.