cancel
Showing results for 
Search instead for 
Did you mean: 

swap memory issue

sunil2singh
Occasional Visitor

swap memory issue

Dear all,

I am facing swap memory problem,

actually while running glance i am getting swap memory utilization as 93 %


Glance C.04.70.000 15:01:11 lambodar ia64 Current Avg High
-----------------------------------------------------------------------------------------------------------------------------
CPU Util S SN NU U | 25% 33% 41%
Disk Util F F | 20% 14% 31%
Mem Util S SU UB B | 99% 99% 99%
Swap Util U UR R | 93% 93% 93%


but when i run swapinfo -tam it showing following

root #/ >swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol2
dev 8160 0 8160 0% 0 - 1 /dev/vg_sec_swap/lvol1
dev 16352 0 16352 0% 0 - 1 /dev/vg_tertiary_swap/lvol1
reserve - 32704 -32704
memory 16362 13063 3299 80%
total 49066 45767 3299 93% - 0 -

hp rx 2660
physical memory 16GB
hpux 11v2

please let me know what is the issue.
5 REPLIES
mvpel
Trusted Contributor

Re: swap memory issue

HP-UX uses a swap "reservation" system. It will not allow a thread to allocate memory unless there is enough swap space available to accommodate the request. This insures that anything in physical memory will always be able to be paged out if necessary, and up to 7/8 of the physical memory is used as "pseudo swap."

This means that on a 16GB system, you must have at least 2GB of device swap in order to be able to use all physical memory.

There's a good discussion of it on this thread:

http://h30499.www3.hp.com/t5/System-Administration/Help-understand-swapping-in-HPUX/m-p/3961848#M291832

 

From ITRC Royalty Don Morris:
-----
Memory/pseudo-swap is an accounting trick where the kernel allows physical memory to account for the swap reservation as well. The primary use of this is on systems with working sets that fit into physical memory so that they don't need large amounts of swap -- it is also used when memory is locked (and is unpagable). Since you mentioned Oracle which is a big lockable memory client -- I expect your memory line being 75% used reflects locked memory.
-----

And he refers readers to the VM White Paper:

http://docs.hp.com/en/1218/mem_mgt.html

sunil2singh
Occasional Visitor

Re: swap memory issue

you want to say my swap is not going to use by unix until and unless my physical memory is completely used ??
Ismail Azad
Esteemed Contributor

Re: swap memory issue

Hi,

> you want to say my swap is not going to use by unix until and unless my physical memory is completely used ??

PRIMARY SWAP is required at the minimum for your system to boot! You are slightly approaching the concept but physical memory is normally never completely used because the virtual memory subsystem has two thresholds for free pages called as "minfree" and "lotsfree" depending on which there would be a page out. So interms of paging in and paging out, there is a limit that has to be crossed but if your system is pretty idle, you could observe what the pis and pos would be on your vmstat output!.

The algorithm that is followed is called as two hand clock where you talk about a "steal hand"... Pretty interesting!..

So the question is are you facing a "performance" issue??

Welcome to ITRC.

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
Dennis Handly
Acclaimed Contributor

Re: swap memory issue

>my swap is not going to use by HP-UX until and unless my physical memory is completely used?

Basically you have reserved all of your device swap, 45.7 Gb. If your application actually touches all of those pages, your device swap will be used.

So if you want to run more applications, you need more device swap.
INH
Regular Advisor

Re: swap memory issue

also check
#ipcs -bom

This will give the list of user using memeory segments

Refer man page of ipcs for more info

Regds,
INH
Knowledge is power