1820475 Members
2860 Online
109624 Solutions
New Discussion юеВ

setting swap priority

 
SOLVED
Go to solution
Sharon Prothero
Frequent Advisor

setting swap priority

Hi folks,

I know there are LOADS of questions about swap, but I can't find an answer which really helps me.

I have a couple of N-class machines which are used for CAE analysis work (MSC-NASTRAN, ABAQUS, LS-DYNA, STAR-CD). Previous recommendations from the software vendors have determined that we need a total of 10 Gbytes of swap on each of these. I am about to replace the current 9Gb root disks with bigger ones and would like some help on allocating the swap capacities and priorities. The machines don't get a much interactive use - no more than say 25 concurrent logins; mostly they are solving jobs submitted to the queuing systems.

On machine1, the root disk will hold all the usual OS stuff plus the application software executables; on machine2 the root disk only needs to hold OS, apps are elsewhere. There is a second 9 Gb disk in each machine available to be used for nothing but swap if required. Data from the applications are written in both cases to yet more disks in a fibre channel array on each machine. So far as I am aware there are no significant differences between the root & "2nd" disks apart from the capacity.

Would it be best to put most of the swap on the otherwise unused 9Gb disk at the lowest priority & just have a smallish amount of primamry swap on the root disk at a higher priority? Or should I have equal sized swap areas at the same priority on each disk to allow for interleaving? even though one of these disks will be running the OS and maybe the apps. Or would you suggest option 3 .... ?

Please think about this while I go home to clear the chaos left by my 10 year old - points tomorrow.

Thanks in advance

Sharon
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: setting swap priority

Hi Sharon:

My preference is to create a relatively small primary swap (on vg00) with a priority=1 (the default) and then the necessarily large device swap on another volume group with a higher priority (priority=0). In this fashion, I reduce I/O on vg00.

If you need to add still a third device swap, then allocate it on a separate physical disk from either the primary swap or the first secondary one. In this case, set the priority of the swap device to zero (0) also, Interleaving will then occur between the two secondary devices with priority given to them over the primary swap device.

Of course, ideally, you have sufficient physical memory never to do swap I/O in the first place!

Regards!

...JRF...
Sharon Prothero
Frequent Advisor

Re: setting swap priority

We've got 16 Gb of memory, which isn't too bad for a two & a half year old machine !!

So you reckon that the way to go would be say 1Gb or 2Gb on the root disk which is vg00 and make the whole of the 9Gb disk swap. To be honest, I think that 9 Gb, rather than 10, will probably be enough swap in total anyway.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: setting swap priority

My general answer to questions of this type is that it really doesn't matter. If you really have to swap to any significant degree then worrying about swap layout and priorities is akin to rearranging the deck chairs on the Titanic. Having said that, I would configure no more than 1GB of primary swap (priority 1) and then configure 3GB of additional swap at prioirity 0 on another disk. If you then set swapmem_on=1 you can get your full 16GB virtual address space. From that point, monitor swap usage and add additional swap as needed. Typically, with 16GB, you won't do any swapping but if you do it's so easy to add additional swapspace that there is no point in worrying about it.

The old rules about swapspace seldom apply any more with machines with large amounts of memory -- as long as pseudoswap in enabled. I am a very firm believer, however, in making sure that every swapspace be mirrored.
If it ain't broke, I can fix that.
Sharon Prothero
Frequent Advisor

Re: setting swap priority

Thanks for the info.