1835088 Members
1891 Online
110073 Solutions
New Discussion

Memory question

 
Busakorn
Advisor

Memory question

Hello all,

I got the memory result from SAM as below:
Physical Memory: 4099.7 MB
Real Memory:
Active: 696467.9 KB
Total: 1063232.7 KB
Virtual Memory:
Active: 1786219.9 KB
Total: 2236969.8 KB
Free Memory Pages: 81180 at 4 KB/page
Swap Space:
Avail: 8192 MB
Used: 1465 MB
Free: 6727 MB

The os is HPUX B.11.11 U.

Could anyone explain me what the above memory parameters tell?
Is the physical memory equal to sum of (Real Memory + Total Virtual Memory + Free Memory Page)?

Thanks in advance.
Busakorn
1 REPLY 1
Don Morris_1
Honored Contributor

Re: Memory question

Physical -- total actual RAM for the entire system.

Real Active: User space (only) consumed RAM for processes doing actual work.
Real Total: User space consumed RAM in total (includes Zombie processes, processes sleeping for a long time, etc...).

Virtual Memory -- exactly that, *virtual* memory. May not be consuming any RAM at all (just the result of malloc() and friends). Likely reserving swap -- but not always guaranteed.

Free Memory -- actual system wide completely free RAM.

Physical memory is very unlikely to be Total Real + Free Memory -- because the factor you're missing in there is System/Kernel memory. (Total memory = User + System/Kernel + Free at the simplest level and allowing for various caches, etc. to be considered "system").

So in your case with 317Mb of free physical RAM, it looks like your system is consuming around 2743Mb in caches, kernel dynamic allocations, kernel static allocations, etc. Likely a good part of that is in the buffer cache if you've left the DBC tunables unmodified. Note that this may be good for your workload and performance... there's really no way to tell from just this metrics. (Perhaps this is doing a bunch of network streaming and needs lots of I/O buffers for disks and packets... that would show in the kernel consumptions/caches).

The Swap output is more interesting -- since it lists it as "Used"... but my suspicion is that SAM doesn't distinguish between truly Used (there's actually disk blocks representing past pageouts) and Reserved (which represents the User space side of the Virtual Memory consumption...). "swapinfo -atm" will tell you, you want to see 0 in the USED column for the devices/FS and the total be reflected in the "reserve" and "memory" lines.