1820227 Members
3476 Online
109620 Solutions
New Discussion юеВ

Multiple swaps

 
Brando Sumayao
Advisor

Multiple swaps

What would be an appropriate size if created multiple swaps on different disks? I have 384mb of physical memory and my primary swap (which I am thinking of leaving alone with a priority of '1') is 768.

I was thinking of creating multiple swap devices of 384mb each spread out on at least 3 disks with a priority of '0').

Thanks.
4 REPLIES 4
Carlos Fernandez Riera
Honored Contributor

Re: Multiple swaps

Yes, you will get a stripped swap ( more or less).
unsupported
harry d brown jr
Honored Contributor

Re: Multiple swaps

The more disks the merrier!

live free or die
harry
Live Free or Die
Santosh Nair_1
Honored Contributor

Re: Multiple swaps

Sizing of swap is a tradeoff. It depends on if you're willing to live with some performance penalties with swap rather then buying real memory. But the general rule of thumb (is there one) is that swap should be 1.5 to 2 times the size of physical memory.

That said, its better to spread swap across multiple disks and assign them equal priority. This way when the swap area is needed, the OS can spread the load across the disk rather than using up all the swap on one disk before proceeding to use the next disk.

-Santosh
Life is what's happening while you're busy making other plans
James R. Ferguson
Acclaimed Contributor

Re: Multiple swaps

Hi:

A good rule when optimizing device swap is certainly to place them on separate physical disks and make them the same size and of equal swap priority. This allows "round-robin" interleaving of I/O.

That said, I suggest that you quantify your need first:

# swapinfo -tam

Having 3-4 times memory in device swap may not be necessary for your environment.

Regards!

...JRF...