Operating System - HP-UX
1832877 Members
2301 Online
110048 Solutions
New Discussion

Two swaps on a single disk

 
d.yoman
Advisor

Two swaps on a single disk

What is the effect of having two swaps on a single disk? How much performance degradation may take place?
6 REPLIES 6
Jeff Schussele
Honored Contributor

Re: Two swaps on a single disk

Hi,

Well if you're actually paging out then it wouldn't make any difference.
Performance would already be in the crapper.
It would be as if it was all one big swap space on that disk.
You never *ever* want to page out - disks are 1000s of time slower than RAM.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Pete Randall
Outstanding Contributor

Re: Two swaps on a single disk

If you should start swapping, there is going to be massive head contention but once you've started swapping, your performance is going to be so bad that you'll never notice it.


Pete

Pete
Kent Ostby
Honored Contributor

Re: Two swaps on a single disk

Since a good chunk of setting up swap is "just in case we have to swap" (i.e. the "reserve" line), it probably isn't going to make a big difference.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
James R. Ferguson
Acclaimed Contributor

Re: Two swaps on a single disk

Hi:

You never want to swap.

If you haven't already, enable "pseudoswap" and you may not even need a secondary swap.

Enabling the kernel parameter 'swapmem_on' allows 75% of your physical memory to be counted by the kernel for the purposes of process swap reservation. This can greatly help avoid "not enough memory" errors during process startup.

Regards!

...JRF...
d.yoman
Advisor

Re: Two swaps on a single disk

Lets say i have 8GB of existing swap and i want to have additional 4 GB of swap. So where would you recommend me to put the additional swap of 4GB? 1)on the same disk as of my original 8GB but using a different lvol, or 2) on another disk?
A. Clay Stephenson
Acclaimed Contributor

Re: Two swaps on a single disk

From a pure performance standpoint, you should put the two swap areas on different disks -- at the same priority. This will interleave the swap between the two disks.

If you choose to put them on the same physical disk then they should be set to different priorities so that the lower priority is used completely before the next priority is used.

Now having said all this, the performance impact is so great from swapping itself that the actual swap layout is insignificant. You are rearranging the deck chairs on the Titanic.
If it ain't broke, I can fix that.