Operating System - HP-UX
1833953 Members
2219 Online
110063 Solutions
New Discussion

Re: Swap maxing out while memory only at 60...

 
Todd McDaniel_1
Honored Contributor

Swap maxing out while memory only at 60...

okay, I have an issue where my DBAs just upgraded from 8i to 9i...

Now they are having major swap issues.... My CPU util is only 60% but my swap keeps maxxing out 90-100 alerts since the upgrade. As a stopgap I added more swap to aleviate immediate issues. I currently ahve 16GB memory and I just added 3gb of swap for a total of 6gb of swap...

My question is 1) what do you think and 2) I believe I am correct in saying that oracle can allocate memory resources in at least 2 ways... 1) reserve a fixed amount of memory per thread or 2) a variable amount...

What should I tell them about how to tune it?

Any suggestions that I can offer to my dbas on how to handle this would be great.
Unix, the other white meat.
15 REPLIES 15
Jean-Luc Oudart
Honored Contributor

Re: Swap maxing out while memory only at 60...

Hi Todd

do you have any baseline (on memory usage ) when you run 8i ?

see this thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=952187



Regards
Jean-Luc
fiat lux
Charles McCary
Valued Contributor

Re: Swap maxing out while memory only at 60...

How big is the Oracle SGA?
Jean-Luc Oudart
Honored Contributor

Re: Swap maxing out while memory only at 60...

You will have the SGA and PGA for each user process

check attachment (SGA)

Regards
Jean-Luc
fiat lux
Jean-Luc Oudart
Honored Contributor

Re: Swap maxing out while memory only at 60...

And this one for the PGA

Regards
Jean-Luc
fiat lux
Jean-Luc Oudart
Honored Contributor

Re: Swap maxing out while memory only at 60...

And on memory management

this link on OTN "Oracle9i memory management"

http://www.oracle.com/technology/products/oracle9i/daily/apr15.html

Regards
Jean-Luc
fiat lux
Jean-Luc Oudart
Honored Contributor

Re: Swap maxing out while memory only at 60...

You must be wondering where I got all of these !
A few month ago we moved an application from 8i to 9i. hence the result of my research (partial)

see this presentation too.

http://otn.oracle.com/products/manageability/database/pdf/ow03p/40091p.pdf

Regards
Jean-Luc
fiat lux
A. Clay Stephenson
Acclaimed Contributor

Re: Swap maxing out while memory only at 60...

I assume that you are running with swapmem_on=1 (pseudoswap enabled). If so then you are beginning to reach full memory utilization. You really need to know actual memory utilization and determine if any pageouts are actually occurring. What is your pageout rate? Are you running a fixed buffer cache or dynamic buffer cache? What are these settings?

If you are actually seeing significant pageout rates then you need to reduce the size of the SGA or the buffer cache because nothing degrades performance like actual swapping.

If it ain't broke, I can fix that.
Marvin Strong
Honored Contributor

Re: Swap maxing out while memory only at 60...

If you have any data from when it was 8i it will obviously be useful in comparing the then/now.

UNIX95= ps -e -o "vsz pid args" | sort
Will give you an idea of what biggest memory hogs are.

You probably checked this already but dbc_max_pct kernel parameter if your using dynamic.


Todd McDaniel_1
Honored Contributor

Re: Swap maxing out while memory only at 60...

I dont have metrics for this box since I am the backup. the primary sa might, but he is on vacation at the moment.

I am working with the dba to check the pga/sga sizes...
Unix, the other white meat.
Geoff Wild
Honored Contributor

Re: Swap maxing out while memory only at 60...

Todd - if memory at 60% or is it cpu @ 60%?

Can you post:

swapinfo -tam

Do you have kmeminfo utility?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Todd McDaniel_1
Honored Contributor

Re: Swap maxing out while memory only at 60...

Memory util was pretty constant at 61% and swap was bouncing to 100% every hour...

I added 3GB of swap to stop my pager goin crazy, just as a stopgap measure until the DBAs can retune...


root> swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 1000 0 1000 0% 0 - 1 /dev/vg00/swap2
dev 1000 0 1000 0% 0 - 1 /dev/vg00/swap3
dev 3000 0 3000 0% 0 - 5 /dev/vg00/swap4
reserve - 5291 -5291
memory 12559 6079 6480 48%
total 18583 11370 7213 61% - 0 -
Unix, the other white meat.
Geoff Wild
Honored Contributor

Re: Swap maxing out while memory only at 60...

Doesn't look like swap is being used at all (at least not disk)....

How are you measuring swaps for your alerting?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Todd McDaniel_1
Honored Contributor

Re: Swap maxing out while memory only at 60...

AT the moment swap is fine... pseudo-swap is being used. Earlier it was actual disk, although I didnt capture the data.

/dev/vg00/lvol2 device 1.0gb 0mb 1
/dev/vg00/swap2 device 1000mb 0mb 1
/dev/vg00/swap3 device 1000mb 0mb 1
/dev/vg00/swap4 device 2.9gb 0mb 5
pseudo-swap memory 12.3gb 7.4gb na
Unix, the other white meat.
Bill Hassell
Honored Contributor

Re: Swap maxing out while memory only at 60...

There is no problem in allocating more swap if the processes need it. swap is allocated in 2 ways: reserved and actual. reserved swap may never be used but the OS needs the space just in case. As far as performance, as long as vmstat reports single digit numbers for po (page out) most of the time, you're just fine. Oracle doesn't allocate RAM--DBAs allocate RAM. They do it in several ways. The largest space by far is SGA, the Oracle shared memory area and in general more is better, assuming the DBAs are using the ewxtra space effectively (local temp sort areas, row insertion space, disk buffering, etc).

Now shared memory (SGA) is separate for each Oracle instance, and ipcs -bmop will show these spaces. Individual programs and threads will grab memory based on config parameters. CPU usage is somewhat of an indication of effective use of RAM. The whole purpose of large RAM is to avoid disk accesses by either caching needed data, or using the shared area instead of disk I/O.

But unbalanced indexes (or missing indexes) will generate partial or full searches, essentially reading the entire database for needed records. More RAM won't help--adding or balancing indexes will help enormously. This is what the DBA gets paid to do: read all the Oracle performance tuning docs and measuring long SQL procedures to see what is causing the delays. Of course, a massive load on the system may max out both disk and CPU in which case, capacity planning kicks into play and you look at a larger machine.


Bill Hassell, sysadmin
Ted Buis
Honored Contributor

Re: Swap maxing out while memory only at 60...

What are your kernel values for dynamic buffer cache, (dbc_max_pct, dbc_min_pct)?
You don't want to waste too much space double buffering. With OnLine JFS there are mount options to avoid this waste of memory and processing resources with Oracle.
Mom 6