Operating System - HP-UX
1833967 Members
1849 Online
110063 Solutions
New Discussion

Pseudo-swap prevents device swap?

 
Ed Miracle
Occasional Contributor

Pseudo-swap prevents device swap?

On my D380 when pseudo-swap hits 100% used, processes choke on "out of memory" errors, but swapinfo -mt shows I have 1Gb of device swap with no usage. Does pseudo-swap preclude or turn off device swap? Or is swapinfo lying to me?
On this system it appears that device swap is *never* used while pseudo-swap is enabled. Should I turn off pseudo?
6 REPLIES 6
Rita C Workman
Honored Contributor

Re: Pseudo-swap prevents device swap?

James R. Ferguson
Acclaimed Contributor

Re: Pseudo-swap prevents device swap?

Hi Ed:

It it very possible that you are not lean on overall swapspace but rather need to increase the kernel's 'maxdsiz' parameter.

http://docs.hp.com/hpux/onlinedocs/os/KCparam.MaxDsiz.html

...JRF...
Les Schuettpelz
Frequent Advisor

Re: Pseudo-swap prevents device swap?

Actually, Dave Fargo using our group login..

There are several issues regarding swap configuration that can be confusing, these concern the interleaving and the priority setting. Better documentation might be helpful. Is your D-class on 10.20? This may have issues where 11.X would not.

The way things are documented (Sys Admin Tasks, man pages) you get the impression that no matter how you configure your swap, the OS will attempt to interleave efficiently, but when unequal sized swap devices are used, it will still be able to use all the configured space even when normal interleave strategy is no longer possible. In practice, it may not work this way in some configurations.

Possibly because HP-UX systems are configured by-and-large to avoid a 'real' swap space requirements, not much concern exists about how it actually works. If you enable swap_mem, this dedicates a percentage of physical memory, which is a fixed size. Does your D-class have relatively small memory compared to your 1Gb swap device? If so, it may be using SOME of the physical swap, but only up to the size of the swap_mem limit, refusing to use more because of interleave concerns. That's not how it is supposed to work, but may be the problem. Is this where James Ferguson's advice on setting maxdsiz would be of help?

It may also be an issue where you have multiple swap devices, and the primary is configured relatively small for fast reboot and crash recovery.

It may just be coincidence, but on systems I can look at that both actually use any of the physical swap AND have swap_mem on, where memory is the LARGEST available area as shown in 'swapinfo -at', the rest of the devices seem to get interleaved PROPORTIONAL to their size. Where memory and primary (vg00) swap are both smaller than the largest secondary device, the interleave is not proportional to size and seems to be capped by the small primary and attempts to allocate above the interleave limit generate 'out of memory' errors even though quite a few megs are free on the larger secondary devices. I am only seeing this on 10.20, I don't have any 11.X in similar configurations. As a coincidence, these have default maxdsiz at 64Mb, and that is also the size of primary swap. Any relation?
Ed Miracle
Occasional Contributor

Re: Pseudo-swap prevents device swap?

Thanks to all who responded. Points of clarification: System is 11.0 with 1Gb memory and 1Gb primary (vg00) swap. It chokes when number of users > 125, indicating swap chunks are big enough
(maxdsize=16k) and it's too many processes/chunks that are the problem. Swapinfo indicates primary device swap is never used. HPRC suggested I increase maxswapchunks from 4096 to 8192. I will post results after we reboot the system.
Mark van Silfhout
Trusted Contributor

Re: Pseudo-swap prevents device swap?

Hi,

Pseudo swap is used for systems with large memory to avoid wasting diskspace on swapspace.
ie. when you have 4Gb ram, you should have (2,5*4GB) 10Gb swap space. To avoid this you can use a 4Gb swap space. However you will not be able to start more processes when the 4 Gb swap is all reserved(note that there has been no swapping at all at that time). Pseudo swap will allow processes to start even the physical swap is all reserved. To be able to 'squeeze' down the available swap pseudo swap pretents like swap is consumed. however this is just a trick to reduce the available amount of pseudo swap.
In your case your (pseudo)swap configuration looks OK, you may need to change one of your other kernel parameters.

Regards,

Mark
romanet
New Member

Re: Pseudo-swap prevents device swap?

Hi Ed,

Have you managed to fix your pb with increasing maxswapchunks parameter.
I have the same pb, my device swap is never used.
Thanks
Valerie Romanet
VR