1838738 Members
6285 Online
110129 Solutions
New Discussion

Re: swap partition

 
SOLVED
Go to solution
Rusty Sapper
Frequent Advisor

swap partition

What is the MAx size you can make a swap partition in 11.x?

TIA

5 REPLIES 5
Alex Skambara
New Member

Re: swap partition

I don't think we have any limitation on swap
size,but recommendation is to keep 1.5/or double size of physical memory.
Krishna Prasad
Trusted Contributor

Re: swap partition

The only limitation you should run into is the maxswapchunks parm for the kernel.
Positive Results requires Positive Thinking
Helen French
Honored Contributor
Solution

Re: swap partition

Hi Rusty,

The maximum configurable device swap space in a system, is limited by two different Kernel parameters- maxswapchunks and swchunk. The formula is:

maxswapchunks * swchunk * DEV_BLOCKSIZE. In 11.x the default value is:

256 * 2048 * 1024 = 512 MB.

You can increase this kernel parameters to configure more swap space. The maximum limit is very very high ( i assume it is not documented yet). Normally the swap space depends on the Physical memory u have and the applications you are running. There won't be any issues while you increase your swap space ( like reaching maximum limit).

In older HP versions, the maximum swap spaces are :

9.x - 2 GB
10.0 - 2^31 * 2048 * 1024 ( this itself is very high)

HTH,
Shiju
Life is a promise, fulfill it!
Don Morris_1
Honored Contributor

Re: swap partition

See:
http://docs.hp.com/hpux/onlinedocs/os/KCparams.OverviewAll.html

for the parameter docs.

It's a little odd - the theoretical max is 1024 bytes * 16384 (swchunk max) * 16348 (maxswapchunks max) = 16^2 Gb = 256Gb, but the docs page insists that the system imposted total swap space limit is about 34Gb. I have no idea why there's a discrepancy... so if you need more than 34Gb, you can try and see what it tells you, I suppose.

In case anyone's wondering, on 11i and higher swchunk goes up to 65536, so there's a 1Tb limit to swap.

Don Morris
Bill Hassell
Honored Contributor

Re: swap partition

It's important to note that large amounts of swap space are not conducive to performance. If you actually use gigabytes of swap, then the majority of programs should be interactive, thus masking the overhead of paging programs in and out of a small RAM system.

The old formula of RAMx2 is badly, badly out of date. Swap space has only one two purposes, memory mapped files (if used) and overflow programs that are not constantly active. The default many years ago was to require a minimum swap equal to RAM just to actually use all of RAM--in essence, swap would never be used and was just wasted space.

Starting with 9.xx, a feature misnamed pseudo-swap was implemented that removed the requirement that every process had to be reserved in swap space, and instead, up to 75%of RAM could contain processes that have no reserved area available. So 1Gb of RAM plus 50 megs of swap means that about 750+50 megs is the total virtual memory area.

There have incorrect recommendations that 20Gb or even 50Gb of swap is needed even though the total amount of processes running is just 500 megs. Swap should always be added as a last resort to handle a really large number of processes, perhaps an end-of-month processing day.

If swap is constantly used, especially if Glance or vmstat indicate 20-100 or more page outs all the time, performance will be severely impacted. The only two fixes are: reduce the number of processes and/or RAM needed, or add more RAM.


Bill Hassell, sysadmin