1834710 Members
2805 Online
110069 Solutions
New Discussion

Increase in Swap space

 
SOLVED
Go to solution
Mike Shilladay
Esteemed Contributor

Re: Increase in Swap space

To apply the priority change without reboot you will need to use the swapon command.

e.g. swapon -p 2 -f /dev/vg00/lvol9

The p is the priority
The f is to force overwrite of any existing file system for paging.

Just as a point of interest if you wanted one area of primary swap bigger by 1GB, then you could use Ignite/UX to reload the image. This does imply that you have some time to backup and reload the OS.

Mike.
santy1
Advisor

Re: Increase in Swap space

I have tried this..but still it remains 1. can anyone help me here how to change the priority with out reboot...and the exact entry what i need to give in /etc/fstab

is it ??

/dev/vg00/lvol9 /swap defaults 0 0 pri=2

# swapon -p 2 -f /dev/vg00/lvol9
swapon: /dev/vg00/lvol9 is already enabled for paging.
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 54 4042 1% 0 - 1 /dev/vg00/lvol2
dev 2000 0 2000 0% 0 - 1 /dev/vg00/lvol9
reserve - 2384 -2384
memory 4085 978 3107 24%
total 10181 3416 6765 34% - 0 -
Mike Shilladay
Esteemed Contributor

Re: Increase in Swap space

Hi Santy1,

I am afraid there does not appear to be any way of altering the swap priority once enabled, you have to reboot the system. The swapon command allows you to specify the priority at invocation with the -p parameter, but thereafter no changes allowed until reboot.

The line you need in the /etc/fstab should look something like this:

/dev/vg00/lvol9 ... swap pri=2 0 0

The pri=2 doesn't have to be 2, it can be any number bewtween 0 and 10, but given that you want to prioritise your swap you would want a number of >= 2.

Mike.
A. Clay Stephenson
Acclaimed Contributor

Re: Increase in Swap space

Relax, just let the next boot take care of it. You are overly concerned about this. The difference in swap layout to performance is about the difference between a 100X performance hit and ~ 110X performance hit when you begin to swap to any significant degree. Both numbers are terrible so it really doesn't matter. It's not even obvious that you are really swapping. Use Glance or vmstat to see what your pageout rate is. If it is small (< ~ 10/sec -- 0 is ideal) then you really don't have a problem.
If it ain't broke, I can fix that.