1825768 Members
3483 Online
109687 Solutions
New Discussion

swap space

 
SOLVED
Go to solution
lawrenzo
Trusted Contributor

swap space

Hello all,

output from swap info is below:

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vx/dsk/rootdg/swapvol
reserve - 4096 -4096
memory 18954 17726 1228 94%
total 23050 21822 1228 95% - 0 -


can anyone provide commands that show which process' are using the swap, also when I run glance this show's only 41% of memory is being utilised.

also is there anyway to clear the amount of swap that has been utilised?

Thamks in advance
hello
8 REPLIES 8
Patrick Wallek
Honored Contributor
Solution

Re: swap space

1) You are NOT actually using any swap space. Or maybe a better way to say it is that you are not paging out to your device swap. Notice the "dev" line has a 0% usage. That is good.

2) ALL processes reserve swap space in HP-UX when they start. So the easy answer is EVERYTHING uses swap.

3) The memory line indicates that the kernel parameter "swapmem_on" is set to 1 so when processes start the will use RAM to reserve some swap space. This does NOT decrease your available RAM, however.

4) No, there is no way to clear used swap without killing applications or processes that are running.

How much RAM do you have in this machine?
Bharat Katkar
Honored Contributor

Re: swap space

HI,
1.Use "vmstat" to determine the utilisation of SWAP memory.
2. For clearing the amount of swap space i see the only way which is reducing the no. of process running in the Memory.
regards,
You need to know a lot to actually know how little you know
Steven E. Protter
Exalted Contributor

Re: swap space

Attaching some utilities that can let you collect data over time on swap use and other factors.

Based on what you are showing I'm not expecting a lot of data cncerning swap. Seems your machine isn't being worked very hard.

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
Kent Ostby
Honored Contributor

Re: swap space

lawrenzo --

Keep in mind that except for very large memory systems, you generally still want to configure enough DEVICE swap to equal 2 x RAM on your system.

In some cases where Oracle is the main component, I've actually seen some customers need to configure almost 3 x RAM to get solid performance from the box.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
lawrenzo
Trusted Contributor

Re: swap space

There is 24gb of ram in the machine, I suppose the next question to ask is:

we had a report from a user reporting that he got an error when running a sas application

# out of swap space

I checked syslog.log at the time the issue was reported and saw the follwoing error:

Aug 9 19:04:07 spbe903a sshd2[14772]: WARNING: Forking a server for a new connection failed.
Aug 9 19:04:07 spbe903a sshd2[14772]: Forking a server for a new connection failed.

Thanks again for your help
hello
Patrick Wallek
Honored Contributor

Re: swap space

That may be due to the fact that you don't have enough swap space (dev + pseudo) to allow you to use all of your RAM.

You currently have 4GB of device swap plus 18.5 of pseudo swap which equals 22.5GB total. That leaves you about 1.5GB short of your 24GB RAM.

pseudo-swap uses about 75% of RAM for swap reservation, which is close to your 18954 MB number, so you need to make up the difference between that number and your total amount of RAM with some other type of swap space.

If you add another 2GB or so of device swap, or even filesystem swap, then you shouldn't see that error anymore.

Alzhy
Honored Contributor

Re: swap space

You need to enlarge your swap space.

If you have a pair of 36 or 73 Giggers.. allocate ALL of them -- prefereably at a higher priority that your OS disk swap slice. Today's apps - Oracle based ones ie. SAP.. require large swap "RESERVATIONS" -- which are not actually used.

Here's my biggest server's swap config:
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/swap
dev 34688 0 34688 0% 0 - 0 /dev/swap1/swap
dev 34688 0 34688 0% 0 - 0 /dev/swap2/swap
reserve - 51451 -51451
memory 49410 9136 40274 18%
total 122882 60587 62295 49% - 0 -


and we are still thinking of adding more!
Hakuna Matata.
lawrenzo
Trusted Contributor

Re: swap space

Thank you all!
hello