Operating System - HP-UX
1837173 Members
2609 Online
110113 Solutions
New Discussion

Swap space size recommendations

 
ROSS HANSON
Regular Advisor

Swap space size recommendations

Hello,
We just purchased a rx2620 (Itanium) with 24GB of physical memory. By default the swap space is set at 4GB. We will be running Websphere, Versata and the like on the system. I was wondering if it would be recommended to increase the size of swap being there is 24GB of memory on the system.
What are your thoughts?

Thanks
Ross Hanson
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Swap space size recommendations

My recommendation:

Configure the system with 6 to 8 GB of swap space.
Set the swapmem_on kernel parameter to 1 and recompile and reboot.

Monitor from there.

swapmem_on allows HP-UX to use 75% or RAM in its swap calculations, though no RAM is actually used. This 75% + 6GB of real swap will allow you to fully utilize all 24GB of your RAM.
Pete Randall
Outstanding Contributor

Re: Swap space size recommendations

Ross,

Modern systems come with huge (like 140GB!!) internal drives that get used for root disks and shouldn't be used for anything else other than your root disk. Given that you likely have that much room, I don't really see any point to trying to choke down your swap area as small as you can possible make it. Give it 12 or 24 or 48 GB and forget about it.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Swap space size recommendations

Normally, for systems with large amounts of memory (and yours qualifies), I set them up with ~ 1-2GiB of primary swap (you must have some) and then add additional device swap to bring the total up to 0.25 memory. Pseudoswap (swapmem_on=1) then allows up to 0.75 memory to count as process reservation space. When pseudoswap (75%) is added to your actual device swap (255), you can then fully utilize all of your memory for process space. You should then increase the maxswapchunks tunable up to your largest anticipated swap usage so that a reboot will not be needed should you actually need to add still more swap space. NOTE: Every dab of swap space should be mirrored. Now, a nice use of the larger boot disks is not to use them as swap but rather configurure separate dump and swap areas -- and dump should never be mirrored. This will allow you to disable savecrash because now the dump will not be overwritten by potential swap usage. This can several tens of minutes when rebooting after a crash.

As long as you have increased maxswapchunks beforehand, it's so easy to monitor swap usage and add more if needed that's it's not worth worrying about.

If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Swap space size recommendations

Hi Ross:

You won't find, in 11.23, that 'maxswapchunks' is tunable as in previous releases. This kernel parameter is depreceated.

Regards!

...JRF...