Operating System - HP-UX
1832793 Members
3134 Online
110045 Solutions
New Discussion

Re: Global Swap Space Error.

 
Learn_1
Regular Advisor

Global Swap Space Error.

We are using HP-UX11i on rp7410.i am receiving error "Global Swap space is nearly full" and "End of global swap space full condition"
system has 8 GB memory and 4096 MB swap partition size.
it seems that swap partition has reached to its full capacity.Do we need to increase the swap space size.If so then what is the procedure to increase the swap swapce size.
we have installed the latest GOLDQPKi and patches.
7 REPLIES 7
Tim Adamson_1
Honored Contributor

Re: Global Swap Space Error.

Hi,

I would definitely add more swap space. At least another 4Gb and maybe even more.

Use SAM to add another swap logical volume. If you have to do it manually, remember to make it contiguous and turn bad block relocation off. If you need exact commands let us know.


Cheers!
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Con O'Kelly
Honored Contributor

Re: Global Swap Space Error.

Hi

To increase swap:
# lvextend -L 4096 -C y -r n /dev/vgXX
# swapon -p 1 /dev/vgXX/lvolXX.
Also update
/etc/fstab.
This will add 4096MB of swap.

Use swapinfo -tm to check its available.
This doesn't require re-boot.

I'd also look at enabling pseudo swap (swapmem_on kernel parameter).

Cheers
Con
Learn_1
Regular Advisor

Re: Global Swap Space Error.

Thanks for the reply.
Following are the memory observations.
Physical:8191.3 MB
Real Memory:
Actual:866436.1 KB
Total:171466.7 KB
Virtual Memory:
Actual:2980666.8 KB
Total:5704842.5 KB
Free Memory Page:173071 at 4KB/page
Swap space:
Actual:4096 MB
Used:4096 MB
Free:0 MB
So with reference to above stated specification,what should be the /swap space size and is there any known issue relevant to this error or any latest memory related patch to resolve this issue.
Is there any HP guy to help us and resolve this issue.
Con O'Kelly
Honored Contributor

Re: Global Swap Space Error.

Hi

Where are you getting this info from??
The Top command is generally unreliable for memory info.

Can you post
# swapinfo -tm
# vmstat 1 2

Cheers
Con
Tim Adamson_1
Honored Contributor

Re: Global Swap Space Error.

Hi,

Based on what you have provided, you have run out of swap. Add at least another 4Gb and continue to monitor. I suspect you will need even more.

Remember that each process reserves some swap and I suspect you have many processes running and have consumed all your swap.

Cheers!!
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Patrick Wallek
Honored Contributor

Re: Global Swap Space Error.

I have another solution, if you aren't actually using swap space, that will save you from adding an additional swap device.

Check your kernel parameters and if it isn't already, set the swapmem_on parameter to 1, recompile your kernel and reboot.

Anytime a process starts, it attempts to reserve a portion of swap for that process. If you have more than 4GB of memory used, then you are almost certainly running out of reservalbe swap space. The swapmem_on kernel parameter will take care of that by taking taking about 75% of your memory, and adding the value to your available swap. So now you can have more than 4GB of processes start and not need more actual swap space. Note that turning swapmem_on on will NOT cause you to use more memory, unless it is because you are now able to start more processes.
Steven E. Protter
Exalted Contributor

Re: Global Swap Space Error.

The minimum amount for primary swap to have a stable system is half physical memory.

Most admins set swap to 1.5 to 2.0 times physical memory.

I now do it in pieces

Primary swap is half physical memory on one disk
Secondary swap is whatever else I need on a diferent disk.

The primary has priority zero which means it gets used first, secondary is lower prioity and only gets used when system load is high.

swapinfo -tam

This will give you better figures on total memory.

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