1825771 Members
2105 Online
109687 Solutions
New Discussion

Re: Swap space

 
Shahul
Esteemed Contributor

Swap space

Hi

I have a doubt. Is there any restriction that I cant have swap space more than a limit? Is it so? If yes what is that limit?

Thanks in advance
Shahul
6 REPLIES 6
Michael Tully
Honored Contributor

Re: Swap space

Hi,

There is a limit in the kernel that you
need to be aware of and that is
'maxswapchunks' that may need increasing.

Also have a look at this thread, where
there was a similar discussion. Basically
you can get to a stage where having too
much swap space will not help at all.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x5ad9cf38d6bdd5118ff10090279cd0f9,00.html

-Michael

Anyone for a Mutiny ?
John Bolene
Honored Contributor

Re: Swap space

How much swap are you trying to add?
How much memory do you have?

It helps a bunch to set the kernel parm swapmem_on to 1, setting up pseudo swap.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
harry d brown jr
Honored Contributor

Re: Swap space

As Michael said, you can increase swap to your hearts desire, but then you reach the point of diminishing returns. In my opinion, if you need more than 2 times memory, then you need more memory, period! Having adequate swap and more importantly dump space is crucial, but you can't increase performance by adding swap. You can increase performance by adding more memory, and there are cheaper solutions than HP, like viking or others (make sure you have enough HP memory for problem resolution - to eliminate finger pointing).

live free or die
harry
Live Free or Die
Sridhar Bhaskarla
Honored Contributor

Re: Swap space

Shahul,

Two kernel parameters will decide the limit on the system.

1. maxswapchunks
2. swchunk

The limit would be maxswapchunks x swchunk.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Bernie Vande Griend
Respected Contributor

Re: Swap space

The limit is determined by:
swchunk * maxswapchunks

As others have said, there does become a point where adding more swap will not help at all and in fact if you are actually using swap instead of real memory your performance will be very poor. HP suggests 2 times physical memory for swap space, in my experience that amount makes a lot of sense. Too much more than that and it is wasted.
Ye who thinks he has a lot to say, probably shouldn't.
Roger Baptiste
Honored Contributor

Re: Swap space

hi,

The two params which determine the swap limit are:
#kmtune -l |grep chunk
Parameter: maxswapchunks
Parameter: swchunk

The links which give good info on this:
http://docs.hp.com/hpux/onlinedocs/os/KCparam.MaxSwapChunks.html

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

Pls note that you would never need to reach the swap limit.
Normally swap should be around 1.5 to 2times(max) the memory size.

HTH
raj
Take it easy.