1832678 Members
2948 Online
110043 Solutions
New Discussion

Re: Swap on NFS?

 
SOLVED
Go to solution
Greg Stark_1
Frequent Advisor

Swap on NFS?

We have a new rp2470 with 2G of memory. It has 2 internal 18G drives that will house the OS. It will be connected to a NetApp Filer(NAS) for its data(NFS). In our old configs (L2000 and a 12H), we would add some swap on the 12H for performance reasons based on posts on the forum.

Now with the NAS, what should be my strategy be for adding swap?

Can you add swap via NFS?

Based on 2G of memory, how much swap should I add?

Currently all that is configured is the default 256MB on vg00/lvol2.

Thanks again,
Greg
3 REPLIES 3
Pete Randall
Outstanding Contributor
Solution

Re: Swap on NFS?

Greg,

Even if you can add swap via NFS, it would be mired in overhead and terribly, terribly slow. The only way you could survive would be if you never swapped.

You would be better off to
1) buy some more memory - 2G is not very much nowdays

2) use some of your internal drive for at least 1x RAM in swap space

Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Swap on NFS?

Yes, you can add NFS swap (in fact, diskless workstations had to use it) but it will be a dog. My advice, unless you can't avoid it, is to not use network swap.

My approach, would be to enable pseudo-swap and monitor swap usage. If you don't need the swapspace don't add it. If you do need it, add device swap on your boot disk but set it to a priority other than 1 so that the primary swap and the additional swap don't interleave on the same disk.
I would definitely mirror any device swap so that a disk failure doesn't kill you.
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: Swap on NFS?

Hi Greg,

Definitely don't do it.

NFS, by default, uses the UDP protocol & as such has no error checking at the transport level. I would certainly not want to let any thing that's coming in/out of memory to traverse the network w/o error checking.
Now, one can setup NFS to use TCP, but you'll still see miserable performaance as earlier noted.

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