Operating System - HP-UX
1833059 Members
2596 Online
110049 Solutions
New Discussion

Changing swap disk priority on-line

 
SOLVED
Go to solution
Ronald Cogen
Frequent Advisor

Changing swap disk priority on-line

Hello,

Is there a way of changing the priority of my LVM swap device without having to reboot? When I tried it using SAM I got a threatening message that the system would first have to reboot to put the device in 'unused', afterwhich I could remove the device and recreate it. All I want to do is change the priority from 0 to 1. Is there a simple way here?

Ron
I've been down so long it looks like up to me
6 REPLIES 6
T G Manikandan
Honored Contributor
Solution

Re: Changing swap disk priority on-line

No you can't.
The priority is set when the swap is enabled, so the change requires a reboot.


Thanks
T G Manikandan
Honored Contributor

Re: Changing swap disk priority on-line

Another important thing is that the priority of the primary swap cannot be changed.
It is '1'.

Thanks
G. Vrijhoeven
Honored Contributor

Re: Changing swap disk priority on-line

Hi Ron,

the priority is default 1. You can change it with # swapon -p /pagingdevice. but i doubt that it can be done online. There is no swapoff commando except rebooting.

Gideon
Ronald Cogen
Frequent Advisor

Re: Changing swap disk priority on-line

Hello TG,

I wanted secondary swap to have the same priority as primary swap, which would be 1. Perhaps i wasn't paying attention, anyway after I set up the secondary swap I noticed that the priority was 0, which I think would affect the 'load balancing' aspect of the swap mechanismus. Is thins true?
I've been down so long it looks like up to me
T G Manikandan
Honored Contributor

Re: Changing swap disk priority on-line

Ronald you are right!
Interleaving can give better performance for swap.

Good performance can be given by having both swap size as equal and also with the same priority.
Also for good performance avoid using heavily loaded file systems for swap.

Thanks
BFA6
Respected Contributor

Re: Changing swap disk priority on-line

Hi Ron,

If your swap areas have the same priority set, then interleaving will happen, which in effect will load balance swapping between the two area.

Regards,

Hilary