Operating System - HP-UX
1847468 Members
2529 Online
110265 Solutions
New Discussion

Re: vmunix: Deferred swap reservation failure pid: 18497

 
SOLVED
Go to solution
Wei_9
Occasional Advisor

vmunix: Deferred swap reservation failure pid: 18497

we got a meesage from the syslog:

vmunix: Deferred swap reservation failure pid: 18497

what does it mean?

Thanks,

Wei
9 REPLIES 9
Jeff Schussele
Honored Contributor
Solution

Re: vmunix: Deferred swap reservation failure pid: 18497

Hi Wei,

It means that a process - PID 18497 - tried to reserve swap space at start up & was unable to do so. Probably because all the swap/memory reservation space was exhausted or that enough space was not available.
Run
swapinfo -tam
and not the value for reserve - specifically total - and if it's high now that means you need to add secondary swap space to the system. It may never be used as *actual* swap space, but every process that starts needs to reserve space at startup just in case it does need to be swapped out or deactivated as it's termed now.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: vmunix: Deferred swap reservation failure pid: 18497

This might be serious.

swapinfo -tam

Do you have any swap allocated? If not, get users off this server now and run through swap setup.

dmesg make sure the disk allocated to disk is still there.

If there is adequate swap than you can conduct a more methodical search.

I would think, based on the message you have inadequate swap allocated.

The swapinfo -tam command will let you know how much is allocated.

The minimum swap is 50% of RAM. Most shops go between 1 and two times RAM as swap. I usually have one small one as primary and a larger one as secondary. This gets be better performance at low system loads.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Wei_9
Occasional Advisor

Re: vmunix: Deferred swap reservation failure pid: 18497

Following is the swapinfo output

swapinfo -mat
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 256 0 256 0% 0 - 1 /dev/vg00/lvol2
dev 4096 58 4038 1% 0 - 0 /dev/vg00/swap2
reserve - 4294 -4294
memory 6241 5926 315 95%
total 10593 10278 315 97% - 0 -
Jeff Schussele
Honored Contributor

Re: vmunix: Deferred swap reservation failure pid: 18497

Hi (again) Wei,

Yep - you're running out of swap space to reserve to. It's at 97% now.

You need to add secondary swap space.
Do you have an unused disk or LUN that can be used for swap?
If not you'll have to obtain one OR lower the memory demand on the system by starting less processes or starting them with a smaller memory footprint.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Wei_9
Occasional Advisor

Re: vmunix: Deferred swap reservation failure pid: 18497

dev 256 0 256 0% 0 - 1 /dev/vg00/lvol2
dev 4096 58 4038 1% 0 - 0 /dev/vg00/swap2


But the above suggests we uses only 1% of dev swap.

What does it mean?

Thanks,

Wei
Jeff Schussele
Honored Contributor

Re: vmunix: Deferred swap reservation failure pid: 18497

Look at the bottom lines under the *reserve* section.
That's where you're running out of swap space.
It's not actually being *used* as swap space per se, but as I explained EVERY process that starts up must make a reservation into the swap space when it starts up.
So what's happening in your case is that you're starting up more processes - memorywise - than the system has memory & swap combined.
You solve this by adding more secondary swap & add it to another VG other than vg00 or create a new VG & add it to that.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Kevin Wright
Honored Contributor

Re: vmunix: Deferred swap reservation failure pid: 18497

reserve - 4294 -4294

This line shows how much swap space from your device swap is 'reserverd'. 256+4096=4292 therefore you have 0 MB of space left of reservation.
Patrick Wallek
Honored Contributor

Re: vmunix: Deferred swap reservation failure pid: 18497

You are not actually paging out much to your swap area yet.

When a process starts, it reserves a portion of the swap area equal to the amount of memory it is using. It does this so that if it does actually have to page out, it has a place to go. ALL processes on HP-UX do this.
You must have 1 of 2 things on your systems:

1) You must have AT LEAST as much swap as you do RAM. If you want processes to use all of your RAM, they must be able to reserve an amount equal to that. Otherwise you will not be able to use all of your RAM.

or 2) You can have a smaller swap area and set the 'swapmem_on' kernel parameter to 1. This will allow HP-UX to do pseudo-swapping where it uses part of RAM as pseudo-swap and processes reserve space that way. This does not actually impact your RAM usage. HP-UX is very smart about this.

You will only start paging out if a process tries to start that is larger than the amount of free RAM you have.

So as said before, you are running out of space for processes to reserve swap when they start. Your options are to set swapmem_on to 1, which requires regeneration of the kernel and a reboot, or add an additional swap area so that you have the same amount of swap as RAM.
Dietmar Konermann
Honored Contributor

Re: vmunix: Deferred swap reservation failure pid: 18497

Wei,

just like the other noticed, the problem was cause by a lack of swap space. In your case the process has been using "deferred swap reservation", aka lazy swapping.

By default HP-UX reserves the required swap space immediately, i.e. a memory allocation fails if reservation is not possible. This means, the swap is reserved even if the process never uses it. But it is ensured that it _can_ be used, even if swap gets exhausted.

In your case the process used lazy swapping, which means that reservation is deferred until the memory is actually used. This saves swap space at run time... BUT, if later on the swap is exhausted then the kernel has no other choice than killing processes that try to use their memory which still needs reservation.

You can turn on lazy swapping using chatr(1). Developers can use MAP_NORESERVE with the mmap(2) syscall to enable lazy swapping for their memory mapped files. This is e.g. done by the Java Virual Machine.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)