Kbase P77401: How much memory is uniquely in use by a process ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  06/11/2009 |
|
Status: Verified
GOAL:
How much memory is uniquely in use by a process ?
GOAL:
How to find the difference between RSS and SHARE memory
FACT(s) (Environment):
UNIX
Progress/OpenEdge Product Family
FIX:
When the TOP utility is run in interactive mode, the amount of memory in use by a specific process can be extimated by subtracting the shared memory from the resident memory (except the swapped part):
RSS - SHARE
For example, the following output of TOP on Linux RH 8.0:
PID USER PRI NICE SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
2212 root 9 0 283M 282M 260M S 1.4 11.2 24:42 _progres
the _progres process is using around 282M - 260M = 22M
What makes up those 260MB SHARE?
If two programs use library "A", then the process would also be "responsible" for A/2 of the memory, but there are so many variations (for example, which pieces of the library each program uses) that make this computation difficult.
It is the amount of memory from the RSS (Resident Set Size) that is shared with other applications. It is the physical memory used by the process. So, a good approximation of the actual memory used uniquely by a process is: RSS - SHARE.