Operating System - HP-UX
1753703 Members
4668 Online
108799 Solutions
New Discussion юеВ

Re: swap related performance

 
SOLVED
Go to solution
John Guster
Trusted Contributor

swap related performance

Is it normal to see device swap activity before the size of all device swap is still larger than that of reserve as shown in swapinfo -tam? It is HP-UX 11.11 PA_RISC system.

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 843 3249 21% 0 - 1 /dev/vg00/lvol2
.
.
.
dev 43000 0 42996 0% 0 - 3 /dev/swap/swap2
reserve - 24941 -24941
memory 26424 18625 7799 70%
total 92304 45521 46759 49% - 0 -
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: swap related performance

Shalom,

At start time, all processes will reserve swap, even if the likelihood of actually being swapped is nill.

Lets say you have a system with 16 GB ram and you run 1 oracle db that needs 1 GB for everything including its buffers and SGA.

swap will be reserved.

Why? Because the system is stupid. It doesn't know what you will run next.

You really don't have trouble with swap until you start paging. Then its time to buy ram.

vmstat will tell you about paging.

http://www.hpux.ws/?p=6

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
John Guster
Trusted Contributor

Re: swap related performance

What does 3rd column tell in swapinfo -tam output if it is not 0? I thought non zero activity should be observed when size of reserve is the same as that size of all configured device swap space. What kind of memoery usage produce such output? I try to understand.
Thanks for your response.
Don Morris_1
Honored Contributor

Re: swap related performance

Reserved is virtual address consumption.

Used shows that the system is under physical memory pressure -- the two aren't that related.

Easy example: Take a system with 32Gb of RAM and 50Gb of device swap. Create a 30Gb object (and assume the kernel require about 2Gb). 30Gb of device swap will then be Reserved.

Touch all the pages in the object -- now 30Gb of RAM are used.. and the kernel is using the other 2Gb -- so the system is under memory pressure and some of that 30Gb will be paged out to device swap (USED increases). The RESERVE [virtual space] is unchanged and nowhere near 100%.

So what the above tells us is that at some point your system was pushed to physical memory exhaustion such that user pages were swapped out to device. Keep an eye on vmstat to see if this was a transitory spike or a steady condition (po [page outs] field). If it is, you'll need to tune your load or your kernel to reduce the physical pressure or buy more RAM.
John Guster
Trusted Contributor

Re: swap related performance

thank to both of you. It explains.
John Guster
Trusted Contributor

Re: swap related performance

.