HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

extend memory swap

 
SOLVED
Go to solution
Eli Daniel
Super Advisor

extend memory swap

hi,
i need extend memory swap in the server hp-ux 11.23 and hp-ux 11.31

the lv lvol2 it is assigned to swap

the question is: i can extend memory swap online? or i can restart server later the change?

the run command:
lvextend -L xxx /dev/vg00/lvol2
9 REPLIES
Pete Randall
Outstanding Contributor
Solution

Re: extend memory swap

Extending the existing primary swap area (lvol2) is quite difficult and certainly not worth the effort. Simply add another swap area and enable it with the swapon command (man 1m swapon).


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: extend memory swap

Hi:

You don't need to extend primary swap nor can you easily do it since the logical volume requires contiguous physical extents. Instead, you can simply add secondary swap space. Whether or not it resides on vg00 is immaterial.

Secondary and primary device swap are equivalent.

Do something like:

# lvcreate -C y -r n -L 32768 -n lvolN /dev/vgXX
# swapon -p /dev/vgXX/lvolN

See the manpages for more information. You can do this without a reboot. Remember to add activation of the secondary device swap so built to '/etc/fstab':

/dev/vgXX/lvolN ... swap pri=0 0 0

As you can see, the secondary device swap can be on any volume group you choose.

On 11.31 you can use 'swapoff' to deactivate a swap device. Prior to 11.31 you would need to remove (or comment out) the secondary swap entry in 'fstab' and reboot. In this fashion, you would not activate the secondary swap that you no longer wanted.

Regards!

...JRF...
Eli Daniel
Super Advisor

Re: extend memory swap

perfect,
one last question
if in 3 months is required to extend the swap again, create another LV?
Steven E. Protter
Exalted Contributor

Re: extend memory swap

Shalom Eli,

In three months if you need to extend swap again, create a new logical volume and follow the good procedures posted earlier in this thread.

Swap can be added in 11.31 without restart.

Broader question is if you keep adding swap, due to increased utilization,what is the reason? If applications are slowing down and disk swapping is occurring, actual paging (see vmstat) then you might need more memory on the server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
V. Nyga
Honored Contributor

Re: extend memory swap

Hi,

that you can do then, but with a secondary swap you also can just lvextend it.
Only extending the primary swap is a problem since the logical volume lvol1 - lvol3 requires contiguous physical extents.
And the primary swap is lvol2.

HTH
V.
*** Say 'Thanks' with Kudos ***
James R. Ferguson
Acclaimed Contributor

Re: extend memory swap

HI (again):

> SEP: Swap can be added in 11.31 without restart.

And that's true for any release. In 11.31 no reboot is required to deactivate a swap space if you have 'swapoff'.

Regards!

...JRF...
Eli Daniel
Super Advisor

Re: extend memory swap

ok james, and the 11.23 version is also online?
James R. Ferguson
Acclaimed Contributor

Re: extend memory swap

HI (again):

> ok james, and the 11.23 version is also online?

Yes, that's what 'swapon' does.

Regards!

...JRF...
Eli Daniel
Super Advisor

Re: extend memory swap

Thanks for information