Operating System - HP-UX
1832233 Members
2634 Online
110041 Solutions
New Discussion

memory used to 100%, swap only 3%

 
Jürgen Heim
Frequent Advisor

memory used to 100%, swap only 3%

Hello!
Our system is exhausted on memory(100%, cannot fork etc.), but it only uses 3% of the swapspace. What's wrong with swap? Here's the output from swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 123 3973 3% 0 - 1 /dev/vg00/lvol2
reserve - 3973 -3973
memory 4675 4665 10 100%
total 8771 8761 10 100% - 0 -
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: memory used to 100%, swap only 3%

What's wrong is you are completely out of swap space. It has all been reserved.

When a process starts, HP-UX attempts to reserve space in your swap space in case it ever needs to be paged out. At this point you are at 100% on your swap reservation.

Notice the total line at the bottom of the page - It is at 100%. You've got 4096 MB of device swap and apparently have swapmem_on (pseudo-swap) turned on and HP-UX is using 4675 MB pseudo-swap and that has all been exhausted.

Your option at this point is, if your maxswapchunks parameter is large enough, to add some more swap space. At this point it doesn't matter what you use, filesystem swap, device swap, whatever, you need to add some.

See 'man swapon' for how to do this.
Patrick Wallek
Honored Contributor

Re: memory used to 100%, swap only 3%

For command line usage of the swapon command:
# man 1m swapon


The 'man swapon' (without the 1m) will give you the usage for the swapon C function.
Piergiacomo Perini
Trusted Contributor

Re: memory used to 100%, swap only 3%

hi,

and also, in my opinion for "cannot fork process", sounds like your kernel is out of nprocs or maxuprc or even both.


regards
pg
Jürgen Heim
Frequent Advisor

Re: memory used to 100%, swap only 3%

Hi Patrick!
Thanks, enlarging the swap space helped. You were completely right. The machine has 6GB memory and swap was only 4GB! Now it's 12GB.