Operating System - HP-UX
1752579 Members
4053 Online
108788 Solutions
New Discussion юеВ

Understanding memory use (including swap) in 11.31

 
SOLVED
Go to solution
mt_1299
Advisor

Understanding memory use (including swap) in 11.31

Itanium rx6600 with 28 GB RAM running B.11.31

swapinfo -tm shows the following:

[root@dbfover doc]# swapinfo -tm
MB MB MB PCT
TYPE AVAIL USED FREE USED
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol2
reserve - 7880 -7880
memory 27242 19011 8231 70%
total 35434 26891 8543 76%

Questions:

1. I have read that the memory line is not actual memory but pseudo memory which is typically 75% of total memory. My box has 28 GB RAM, why would the memory line show 27242? 75% of that number does not equal 19011 -- is there a place where the pseudo memory % is set?

2. What tool do I use to find out what is using the portion of memory not allocated to pseudo swap?

3. Are there any whitepapers on how memory is allocated in 11.31 including concepts and tools for monitoring/troubleshooting?

Thanks.
2 REPLIES 2
sangilak
Trusted Contributor

Re: Understanding memory use (including swap) in 11.31

Hi,


A good start would be be the HP-UX Memory Management White Paper, although pretty old I think most of the thing in there will still be relevant:
http://docs.hp.com/en/5965-4641/index.html

Best tools for memory monitoring:
- GlancePlus (not free but trial version available):
https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&cp=1-11-15-28^9637_4000_100
- HP also has an internal tool 'kmeminfo', to get it just open a case with HP support (I assume you have a SW contract) and ask for the tool

There are also some good documents available that explain in detail the memory allocation and how to account for all memory being used (e.g. HP-UX 11i - Understanding HP-UX Memory Allocation)... To get these documents just contact HP support.

Also, there are quite a lot of threads about this on ITRC, like the one below for example:
http://h30499.www3.hp.com/t5/Workload-Resource-Management/Understanding-HP-UX-memory-usage/m-p/3562361#M2259

sangilak

Don Morris_1
Honored Contributor
Solution

Re: Understanding memory use (including swap) in 11.31

There's a newer white paper for Memory Management on v3 (more about tools such as this than the kernel internal structures) which may help:

http://search.hp.com/redirect.html?type=REG&qt=memory+management+white+paper&url=http%3A//h20000.www2.hp.com/bc/docs/support/SupportManual/c02465072/c02465072.pdf%3Fjumpid%3Dreg_R1002_USEN&pos=2

To your questions directly:

1) Yes, the memory line is not really RAM. Pseudo-swap is simply a matter of accounting to allow large memory systems where most/all of the workload resides in core to not require large disks just for swap reservation space. The actual percentage is up to the kernel but for v3 is closer to 90% than 75% typically. In your case, the kernel chose about 95% [27242 / (28*1024) = 0.95012555]. 19011 is not the percentage of total memory chosen for pseudo-swap, that's 27242. 19011 is the USED portion of pseudo-swap -- that which has been consumed by reservation from your workload. If your workload throttled down/went away and removed virtual objects (and hence released swap), you'd see resources shift from USED to FREE here.

2) There's no such distinction. Actual physical memory is used and may correspond to virtual objects backed by real swap, pseudo-swap or files (for memory mapped files). The allocations don't care. The only reason the kernel doesn't assign 100% of memory to pseudo-swap (besides the fact that it already uses some of it to bring the system up so it would be silly to include it) is because some of the system needs to keep at least a small portion of the workload where it can reliably expect to be able to push it out to actual swap. If all of the real physical memory consumption was backed solely by pseudo-swap reservations, there would be nowhere to put anything and the system would be stuck until someone freed memory on their own (which is usually unlikely when the system is stuck).