1833381 Members
3528 Online
110052 Solutions
New Discussion

Re: Swap parameters

 
SOLVED
Go to solution
Jdamian
Respected Contributor

Swap parameters

I tried to add a new swap area in my system by means of "swapon" and it reported an error message about "swchunk" and "swapchunks" kernel parameters.

Then I checked those parameters... I found that the swchunk value is 6144 but the help tells it would be an integer power of two, i.e., the possible values would be 2048,4096,8192,16384,...

I find nothing in "HP-UX Memory Management White Paper (Part II)" about this issue.

Is that true ? Is my swchunck value wrong ?

If it is wrong and needs an integer power of 2, what value is used now on my system ?
Does it impact my system performance ?

Thanx in advance
4 REPLIES 4
Dan Hetzel
Honored Contributor

Re: Swap parameters

Hi,

swchunk defaults to 2048 and can be adjusted to 16384.
The value you're using now seems a bit weird...
You should probably adjust it to 8192.

Total swap space is defined by:
swchunk * maxswapchunks * DEV_BSIZE
where DEV_BSIZE is 1024 bytes.

Here is a document that may help you in adjusting all kernel parameters:
http://docs.hp.com/hpux/onlinedocs/os/KCparams.OverviewAll.html


Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Darrel Louis
Honored Contributor

Re: Swap parameters

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


http://www.docs.hp.com//hpux/onlinedocs/os/KCparam.SwChunk.html
Minimum : 2048
Maximum : 16384
Default : 2048

Check the url above for further info.

Regards

Darrel
James R. Ferguson
Acclaimed Contributor
Solution

Re: Swap parameters

Hi:

Yes, the value of 'swchunk' should be a power of two. 'swchunk' defines the "chunk" size, or minimum unit involved in swap activity. Thus, 'swchunk' is the smallest unit of allocation of device or filesystem swap. 'swchunk's are divided into DEV_BSIZE bytes. Since DEV_BSIZE is a fixed constant of 1024 bytes which cannot be changed, 'swchunk' must be a multiple of 1024 -- a power-of-two.

...JRF...
Andy Monks
Honored Contributor

Re: Swap parameters

Never change the swchuck parameter (which does have to be a power of 2).

Only change maxswapchunks, which is what the message really suggests doing.