- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Adding SWAP space on system
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:35 AM
тАО03-04-2009 05:35 AM
Adding SWAP space on system
I am facing some memory issue and need to increase the swap space.
I came to know that it is not possible to increase the primary swap and need to add secondary swap, fresh swap requirement is upto 10 GB.
# model
ia64 hp server rx6600
OS: HPUX B.11.23
# vgdisplay vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4356
VGDA 2
PE Size (Mbytes) 32
Total PE 4322
Alloc PE 3968
Free PE 354
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10240 855 9385 8% 0 - 1 /dev/vg00/lvol2
reserve - 9385 -9385
memory 40930 39682 1248 97%
total 51170 49922 1248 98% - 0 -
Please let me now:
1. Can I increase the primary swap
2. If not how to increase the swap on system. using above free space. Please let me know the procedure, does it requires system reboot or any application downtime.
Mohammad Sanaullah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:40 AM
тАО03-04-2009 05:40 AM
Re: Adding SWAP space on system
2. Add secondary swap using the available space on vg00. See http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=&threadId=451429 or search for "add secondary swap"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:43 AM
тАО03-04-2009 05:43 AM
Re: Adding SWAP space on system
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:44 AM
тАО03-04-2009 05:44 AM
Re: Adding SWAP space on system
1. Take an ignite backup of vg00. Boot from backup and intervene at the ignite interface to recover with a large swap area.
2. Create a secondary swap area, with sam or command line, activate the swap and reboot the system to complete the process. lvcreate then lvextend -L
A reboot is always required to permanent swap space. You may be able to avoid this by going with an additional file system based swap but this has performance impact.
Note: Creating a swap space larger than twice ram will impede performance. As you have 40 GB of RAM, the minimum recommended total swap space should be 20 GB total.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:46 AM
тАО03-04-2009 05:46 AM
Re: Adding SWAP space on system
>>>1. Can I increase the primary swap<<<
No, you can't. The reason is that swap filesystem should be contigious.
>>>2. If not how to increase the swap on system. using above free space. Please let me know the procedure, does it requires system reboot or any application downtime.<<
You need to create additional/secondary swap.
If you are not familiar with command line use SAM to create secondary swap. use the below steps.
Creating additional swap :
Findout which volumegroup(VG) is having enough free space using vgdisplay command.
For VG01 use the following command. Look at the values of Free PE and PE size.
PE size*No of Free PE├в s is the space available on that VG
#vgdisplay /dev/vg01
Create the logical volume for your secondary swap.
#lvcreate -L 10000 -n swap -C y -r n /dev/vg01 ->Here the size is 10GB
Once you created the logical volume use SAM to configure it.
#sam
Disks And File Systems
Swap
Actions ->Add Device Swap
Using the Logical Volume Manager
Select the lvol from the list of Unused Logical Volumes
/dev/vg01/swap
select:
When to Enable
[X] Now
[X] At Every System Boot
OK
Then system will rebuilt the kernel and reboot the system.
This is the default selection
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:47 AM
тАО03-04-2009 05:47 AM
Re: Adding SWAP space on system
This question comes up repeatedly.
1. This is not worth the effort to do it when you have a configuration in which you can. Secondary device swap is perfectly good as primary device swap.
See this recent thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1318283
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 06:39 AM
тАО03-04-2009 06:39 AM
Re: Adding SWAP space on system
But if the memory pressure is high and if free memory is very less to run new process, then there is no use in increasing swap.
You could check the free memory available via
# top
Check the Memory section,,, (XXXX K Free)
Your answers"
1. Take ignite and restore ignite. recommended one, as told above
2. Please create a secondary swap
lvcreate -L 10240 -n myswap -C y -r n /dev/vg00
This will create a LV /dev/vg00/myswap
# swapon -p 1 /dev/vg00/myswap
You could see this swap added via
# swapinfo -tam
Add it to fstab to have it activated across reboot
echo "/dev/vg00/myswap ... swap pri=1 0 1" >> /etc/fstab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 06:40 AM
тАО03-04-2009 06:40 AM
Re: Adding SWAP space on system
44 of 116 points assigned.
Please try to assign points to the thread.
This is a better ways of saying Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 06:55 AM
тАО03-04-2009 06:55 AM
Re: Adding SWAP space on system
To answer your question, Yes, you can increase primary swap. but I would not recommend as it is a complex procedure and require down time. The easiest option is to assign secondary swap as follows. You have got around 11GB free space in vg00.
#lvcreate -L 11328 /dev/vg00
#vi fstab and add a line as follows.
/dev/vg00/lvolnn ... swap pri=2 0 0
here nn is the lovol number. Then
#swapon -a (To enable all swaps in fstab)
#swapinfo -t (To verify)
Make sure that swchunk parameter in Kernel is already set to a large value.
Good luck
Shahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 11:04 PM
тАО03-04-2009 11:04 PM
Re: Adding SWAP space on system
While I am trying to create a logical volume so that I can use the same for swap is giving error to undistribute your volume group, as this system is a node for two node cluster, and I need to add swap space on both the node by 10 GB.
Thanks.
Mohammad Sanaullah