Operating System - HP-UX
1826351 Members
3724 Online
109692 Solutions
New Discussion

Need to add swap space.. need help

 
SOLVED
Go to solution
Chris Fadrowski
Super Advisor

Need to add swap space.. need help

I need to add additional swap space to a system running 64 gb of memory for Oracle. My default swap is only 8 gb (system supplied default). i would like add another 47 gb of swap. System is 11.31 IA64

My questions are, what "TYPE" of swap can i use. I have disk available on a SAN and that's where i will need to put it. VG10/lvol110. I think i want "device swap" but i am not sure. Can someone tell me if this is correct using device over "file system" and guide me on how to create?
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: Need to add swap space.. need help

Chris,

Yes, you definitely want to go with device swap. File system swap is only appropriate if it's never going to be used because it is SLOW.

I would suggest you use the SAM replacement, SMH (I think - Systems Management Homepage - is that right?) to guide you through setting up your swap space.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Need to add swap space.. need help

Shalom,

Definitely device versus file system.

http://docs.hp.com/en/5992-5804/ch03s04.html

http://docs.hp.com/en/V3crashDump1/11.31DumpWhitePaper.pdf

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
johnsonpk
Honored Contributor

Re: Need to add swap space.. need help

Hi Chris,



The ideal swap configuration is device swap spread across multiple identical disks. Each quantity of swap space being equal in size. Worth to read this doc on below link
http://docs.hp.com/en/1219/tuningwp.html#swap

To create swap follow the below steps

1)create vg
#vgcreate swapvg

2)create lvol with equal size
#lvcreate -L vgswap

3)update the fstab
/dev/vgswap/lvol1 . swap defaults 0 0
4)use swapon -a for enable the swap


use swapinfo -tam for verifying swap space


thanks!
Johnson
Ganesan R
Honored Contributor
Solution

Re: Need to add swap space.. need help

Hi Chris,

Create the logical volume for your secondary swap.

#lvcreate -L 47000 -n swap -C y -r n /dev/vg10 ->Here the size is 47GB.

Note swap lv should be created with contiguous and bad block reallocation off. If you have already created the lv with default policies, remove that and recreate with above command.

#vi fstab and add a line as follows.

/dev/vg10/lvolnn ... swap pri=1 0 0
here nn is the lovol number. Then

#swapon -a (To enable all swaps in fstab)

#swapinfo -mat (To verify)

Best wishes,

Ganesh.
Tingli
Esteemed Contributor

Re: Need to add swap space.. need help

Use sam, it is fairly straight forward to create swap space.
Chris Fadrowski
Super Advisor

Re: Need to add swap space.. need help

Thank you! i got it working. I got stuck because i had an existing lv so i had to use the -f option. it's working thanks again to all. points assigned.
Pete Randall
Outstanding Contributor

Re: Need to add swap space.. need help

Tingli> Use sam

Not in 11.31!


Pete

Pete