cancel
Showing results for 
Search instead for 
Did you mean: 

Swap and Oracle 9.2

Adel Fatani
Occasional Contributor

Swap and Oracle 9.2

when I check the swapinfo I found the swap is 0%, does this mean Oracle not use Swap?
7 REPLIES
Steven E. Protter
Exalted Contributor

Re: Swap and Oracle 9.2

post the out put of the swapinfo command.

If you have lots of memory, it is entirely possible you are not using swap. That is perfectly normal and is nothing to worry about.

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
Michael Steele_2
Honored Contributor

Re: Swap and Oracle 9.2

You must not be using "...swapinfo -tam..." or not reading the Total % utilized. For the O/S needs a minimal amount of swap in order to boot, and each and every application also uses a predetermined by the O/S amount to launch. This is 'pseudo-swap'. Refer to /usr/share/docs and the mem_mgt.txt document.

Swap will also be listed out in lvlnboot under the -s option and is usually found under /dev/vg00/lvol2.

lvlnboot -v
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: Swap and Oracle 9.2

The recommendations for swap space for many database products is very poorly defined and usually results in simply wasting gigabytes of disk space. Note that for Oracle and Sybase and SAP, etc, there is a recommendation of 6 to 30 Gb of swap space, regardless of how much RAM you may have (ie, 32 Gb of RAM) which doesn't make a lot of sense from an HP-UX perspective.

Here's the scoop: when you first install a major database or other large scale information system, add the swap recommended. In many cases, the 64bit versions of the programs may need dozens of Gb of RAM and therefore swapspace will be needed. After installation, setup your virtual memory (RAM + swap) to about 6-10Gb and then monitor using swapinfo -tam as mentioned above. This means that if you have 8Gb of RAM, swap space can be as little as 1-4Gb.

Now this does not account for memory mapped files which some applications may require--follow the manufacturer's instructions for this space. Swapping (ie, paging) is only desirable for interactive programs that have long 'think' times between activities. It is a VERY bad thing for processes that must run at full speed and can't because of lack of RAM.

Use vmstat to monitor the Page Out (po) rate over time. If the numbers are low (under 100) then all is well. If they are 3-4 digits all the time, your system is being crippled by lack of RAM. Either get a lot more RAM or stop running competing programs.


Bill Hassell, sysadmin
Sridhar Bhaskarla
Honored Contributor

Re: Swap and Oracle 9.2

Hi,

"Oracle does not use swap" is an ambiguous statement.

System uses swap for every process in one way or the other and there is no distinction between oracle or apache. When the system is tight on memory, swap is used to "store" the pages that are most infrequently used. This usage is different from the "reservation" of swap space that happens everytime a new process is started.

If the swap defined on your system is too large than the current swap reservation+usage, then you will find the swap utilization at 0%.

There are two indications to check if your system to tight on memory. "vmstat 2 20" and the corresponding significant 'po' column and "swapinfo -t" and non-zero figures under "KB used" column of device swaps (not memory).

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Yogeeraj_1
Honored Contributor

Re: Swap and Oracle 9.2

hi,

I always thought that all UNIX systems routinely page-out memory frames to swap in anticipation of a future page-in, even though the RAM may never actually page.

To know for sure, i used vmstat and correlate the scan rate (sr) with the page in (pi).

Also, Oracle recommends space for swap is the twice the amount of RAM.
(On systems with more than 2 GB of physical RAM memory, the requirements for Swap/Paging space can be lowered, but Swap/Paging space should never be less than physical RAM memory.)


so....

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Frank Slootweg
Honored Contributor

Re: Swap and Oracle 9.2

Yogeeraj,

HP-UX does not "routinely page-out memory frames to swap in anticipation of a future page-in", but *reserves* swap space.

I always compare it to booking a hotel room: If I book a hotel room it is *reserved* for me (reserved room == reserved swap space), but that does not neccessarily mean that I am *in* my room (in room == paged out).
Bill Hassell
Honored Contributor

Re: Swap and Oracle 9.2

Page in (the pi metric in vmstat) is almost useless as it combines process startup *and* page in from swap. The only useful metric for swap is po (page out) which means pages have really been moved out of RAM.


Bill Hassell, sysadmin