Operating System - HP-UX
1833247 Members
2714 Online
110051 Solutions
New Discussion

swapinfo indicates 99% total

 
SOLVED
Go to solution
Jerry L. Sims
Frequent Advisor

swapinfo indicates 99% total

Hello All,

Does anyone what would be the best way to find out why my swapinfo now say 99% ?

*******************
HP-UX B.11.11 U 9000/800/rp7410
*******************
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
reserve - 4096 -4096
memory 6457 6397 60 99%
total 10553 10493 60 99% - 0 -
*******************************
total memory =
Memory Information:
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 8372224 Kbytes, lockable: 6599604 Kbytes, available: 7580184 Kbytes
6 REPLIES 6
Kent Ostby
Honored Contributor
Solution

Re: swapinfo indicates 99% total

You'll note the line that says reserverd and that all of your device space is taken up with reservation.

HP-UX reserves swap space for any processes it starts even if it doesn't actually start swapping.

Also keep in mind that HP recommends that your device swap is a minimum of 2x your physical memory.

In your case, you're running at 1x so you need to add 4 gig of swap to bring your total up to 2x.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Jeff Schussele
Honored Contributor

Re: swapinfo indicates 99% total

Hi Jerry,

That's termed swap reserve. It shows how much swap space has been reserved by all processes running on the system.
EVERY process that starts up *must* reserve swap space in case it ever needs to be swapped out.
What you need to do is either

1) Add more secondary swap
2) Reduce the process count or their size.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: swapinfo indicates 99% total

Your swap is set too low.

Your memory is 6 GB and in general for the system to run right you will need between 6 and 9 GB for efficient operation.

Based on your ouput, I strongly recommend creating a secondary swap area of around 4 GB.

If you want to collect some data on swap usage, try the script I'm attaching.

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
SS_6
Valued Contributor

Re: swapinfo indicates 99% total

While adding swap also look at the kernel parameter maxswapchunks. Its good to add from SAM and use the same priority as you have for primary swap.
By providing solutions I am helping myself
Jerry L. Sims
Frequent Advisor

Re: swapinfo indicates 99% total

any proceedures for adding an additional
4096 lv for vg00 ?
Jerry L. Sims
Frequent Advisor

Re: swapinfo indicates 99% total

I located the following commands. Do they look correct ?

1) lvcreate -L 4096 -n swap -C y -r n /dev/vg00

2) swapon -p 1 /dev/vg00/swap

3) swapinfo -ta ( to view info )
example /etc/fstab entry:

4) Add to /etc/fstab :
/dev/vg00/swap ... swap pri=1 0 1 #device swap