Operating System - HP-UX
1833788 Members
2076 Online
110063 Solutions
New Discussion

do we really need to increase swap space if total is 100%

 
SOLVED
Go to solution
arunstarwood
Occasional Advisor

do we really need to increase swap space if total is 100%

Hi all,
I need help in understanding the swap utilization.
I was going through one of the Docs saying if seudo-Swap is set then the swap will run on the memory instead of disks which has been allocated for swap.
If this is the case when we run swapinfo -tm and see that the total row is showing 100% utlization or reserved. are we saying that we are running out of swap and if yes do we need to increase the swap on the disk side or do we need to increase the memory

Please please let me know
Thanks
arun
15 REPLIES 15
Jeeshan
Honored Contributor

Re: do we really need to increase swap space if total is 100%

you go to memory upgrade rather than swap allocation
a warrior never quits
Steven E. Protter
Exalted Contributor

Re: do we really need to increase swap space if total is 100%

Shalom arun,

Short term, to keep your system running increase swap space.

However to resolve the problem memory needs to be purchased or installed.

The other alternative, decreasing the server workload is unlikely to be acceptable to those who give it its workload.

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
Tim Nelson
Honored Contributor

Re: do we really need to increase swap space if total is 100%

When you run out of physical memory and there is no additional swap space to swapout/pageout current processes then any new processes will fail with cannot fork messages.

psuedo swap is an area of available memory that hpux uses to fool the system into thinking it has enough swap space. As the requirement for memory increases psuedo swap will decrease until it does not exist. At that point real swapping/pageouts will occur.

If you have 16GB of ram you must have 16GB of device swap configured to use all 16GB of ram. If you wish to run more than 16GB of processes then you must have that much more in physical device swap space.

If you are at 100% usage then I would start watching Deactivation rates in Glance or PO with vmstat. Psuedo swap is no longer in play.

Once swapinfo shows %used for devs there are then processes which have been deactivates/pagedout and some memory pressure was experienced recently.

I ask that the rest of this community correct my simple attempts if any.

Siju Vadakkan
Trusted Contributor

Re: do we really need to increase swap space if total is 100%

Please provide the following detals :

swapinfo -tam
vmstat -S
kctune -q dbc_max_pct or
kmtune -q dbc_max_pct
arunstarwood
Occasional Advisor

Re: do we really need to increase swap space if total is 100%

thanks all for helping me.

SQL> !/usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 20480 976 19504 5% 0 - 1 /dev/vg00/lvol2
dev 16384 979 15405 6% 0 - 1 /dev/vg01/lvswap1
reserve - 33368 -33368
memory 65495 36391 29104 56%
total 102359 71714 30645 70% - 0 -

I will upload the vmstat info in a few secs.

This total column spikes to 100% intermittently and all this time I had been seeing only the dev columns in which it never showed more that 10% utlization.
Hence was in the assumption that swap is never utilized but the monitoring tools are showing us wrong info
arunstarwood
Occasional Advisor

Re: do we really need to increase swap space if total is 100%

SQL> !/usr/sbin/kctune -q dbc_max_pct
Tunable Value Expression Changes
dbc_max_pct 50 Default Immed


SQL> !vmstat 2 |awk {'print $4,$5,$8,$9,$12'}
faults cpu
avm free pi po sr
3008681 188906 4 3 28
3116066 186651 0 0 0
3116066 186671 0 0 0
3116066 186529 0 0 0
3116066 185425 1 0 0
3116066 180471 0 0 0
3270141 185986 0 0 0
3270141 186159 0 0 0
3270141 186160 0 0 0
3270141 185869 0 0 0
3270141 186160 0 0 0
3113026 186173 0 0 0
3113026 184177 2 0 0
3113026 186201 0 0 0
3113026 183750 0 0 0
3113026 182095 0 0 0
2996361 186160 0 0 0
arunstarwood
Occasional Advisor

Re: do we really need to increase swap space if total is 100%

The main problem start from the below message.
TNS-12518: TNS:listener could not hand off client connection
TNS-12549: TNS:operating system resource quota exceeded
TNS-12560: TNS:protocol adapter error

the listener of the oracle database is intermittently not accepting connections and is throwing up the above messages.
Based on oracle they are asking us to increase the swap.
Hence this need of help from you all.
Siju Vadakkan
Trusted Contributor
Solution

Re: do we really need to increase swap space if total is 100%

As I updated earliar, you are already allocated 50% of ur physical memory for caching file I/O data and metadata(dbc_max_pct=50).

Make it 10%, this will free up ur physical memory.

#kctune dbc_max_pct=10.


for more details

#man dbc_max_pct
arunstarwood
Occasional Advisor

Re: do we really need to increase swap space if total is 100%

SIJU VADAKKANDAVIDA
Thank you very much for helping me.
Is there doc or anything which will tell me regarding these parameters and how it needs to be set for an oracle environment.
Please do let me know
thanks
arun
Siju Vadakkan
Trusted Contributor

Re: do we really need to increase swap space if total is 100%

I faced the same issue and attached is the HP's recommandation
Siju Vadakkan
Trusted Contributor

Re: do we really need to increase swap space if total is 100%

PFA'ed
Tim Nelson
Honored Contributor

Re: do we really need to increase swap space if total is 100%

With 64GB of ram and running Oracle I would pull the dbc_min_pct down to 1% and dbc_min_pct down to 2-3%

10% of 64GB ram is 6.4GB for buffer cache.

The filesystem cache is only wasting resrouces that could be better utilized by Oracle.
arunstarwood
Occasional Advisor

Re: do we really need to increase swap space if total is 100%

once again i thank all of you in helping me out here.
one last stupid Q here.
In lay man terms what should i tell the unix admin when i ask him to change these parameters on operating system
Please do let me know
cause he will ask me why do you need it to be changed and I am running out of TECHNICAL words here.

thanks
Arun
Andres_13
Respected Contributor

Re: do we really need to increase swap space if total is 100%

Also you can assign some points by the way
Siju Vadakkan
Trusted Contributor

Re: do we really need to increase swap space if total is 100%

You provide the docs which I attached , those docs was provided by HP support center. It clearly explained there.