1833757 Members
2636 Online
110063 Solutions
New Discussion

Re: swap used = 100%

 
Asad Malik
Frequent Advisor

swap used = 100%

Hi
We have a L class (1000) server with 1G of physical memory and 1G of device swap space. Occasionally the system hangs and the output of swapinfo -tam shows 100% used total swap space. We have two physical volumes and 1 VG with LVs mirrored on those two PVs. How we can resolve this memory bottleneck.
May be we can add another LV on one of the PVs and use as a secondary swap device.
Is there any kernel parameter that has to be looked at.
swapmem_on = 1
We are running Ariba application on this server.
Any advice /suggestion will be helpful
Thanks
6 REPLIES 6
CHRIS_ANORUO
Honored Contributor

Re: swap used = 100%

Hi Asad,

Try and increase the swap space to 2Gb, if swapmem_on=1, then set nbuf and bufpages to zero and increase your swap upto 2Gb.

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
James R. Ferguson
Acclaimed Contributor

Re: swap used = 100%

Hi:

Yes, you should definitely configure additional swap space.

Enable the kernel parameter 'swapmem_on' by setting it to one (1). This is called "pseudo swap" and allows for the use of system memory as additional swap space.

You may need to increase the kernel too, in order to create additional swap environments.

You can setup a new logical volume as an additional swap space. For best performance, make the size of this secondary swap the same as your primary, and set the swap priority to be the same too.

For additional procedural guidelines for managing swap space, see the System Administration Tasks manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90672/B2355-90672.html

...JRF...
Dan Hetzel
Honored Contributor

Re: swap used = 100%

Hi Asad,

The generally admitted rule regarding the swap space size is 2 to 3 times the physical memory (RAM) size. In some exceptional cases it could even be necessary to use more than that.

Your system should have at least 2GB swap, as Chris and James already told you.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Asad Malik
Frequent Advisor

Re: swap used = 100%

So I should go ahead and do the following steps
1. Create a logical volume on the same VG where primary swap is, as we have only 1 VG.
2. Create a swap device on this LV. Do I need to mirror this LV on other disk in VG as all other LVs are mirrored?
3. Enable swap device and add entry in /etc/fstab file with priority 1.
4. There is no reboot of system is involved.

Do you think these step are ok. Any more suggestion/comments will be appreciated
Thanks
Patrick Wallek
Honored Contributor

Re: swap used = 100%

That procedure sounds safe to me.

And YES I would go ahead and mirror your second swap LV. You want to have both swap areas available in case you have a disk go bad.
CHRIS_ANORUO
Honored Contributor

Re: swap used = 100%

You can use SAM comfortably to create another swap space. Search in this forum for steps in creating a mirror disk. Then assign your points to help us know we solved the problems.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.