When system runs low on memory and swap continuously, its time to troubleshoot. Even after troubleshooting and all available app/OS tuning you are still running out of memory then you can try adding extra swap before you think of adding RAM to server which involves cost/resources of parent machine.
Step 1.
For adding extra swap check how much space you have available in root volume group vg00. Use vgdisplay command to get free PE and PE size numbers.
Here we have 566 free PE with 16MB size of each. This sums upto 8.8GB of free space in root vg. We can use space from this 8.8GB for adding extra swap.
Check current swap configuration. Here you can see like default HPUX configuration, lvol2 is mounted as swap.
Step 2.
Create new contiguous logical volume with no bad block relocation policy and size of your requirement. Lets make a LV of 2GB.
Step 3.
Start swap on this lvol. Add -f argument to start forcefully if below command fails.
Step 4.
Edit /etc/fstab to mount this LV as swap on every boot. Add below entry :
Step 5.
Check again swap size. Now you can see new lvol is added in swap.
1
2
3
4
5
6
7
8
9
10
11
|
# /usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 43008 0 43008 0% 0 - 1 /dev/vg00/lvol2
dev 2048 0 2048 0% 0 - 2 /dev/vg00/lvol10
reserve - 1963 -1963
memory 40861 9261 31600 23%
total 85917 11224 74693 13% - 0 -
|
0 comments:
Post a Comment