Operating System - HP-UX
1837107 Members
2556 Online
110112 Solutions
New Discussion

swapmem and swap for oracle

 
Kevin Wallace
Occasional Advisor

swapmem and swap for oracle

Think twice about turning swapmem on. We are turning it off on most of our oracle servers. It uses too much real memory (on older servers with memory limitations). We run quite well with swap equal to 1 - 1.5 GB of swap per 1GB of memory.
4 REPLIES 4
Julio Yamawaki
Esteemed Contributor

Re: swapmem and swap for oracle

About the swapmen = off, but swap is requered to be 2 times the amount of memory for Oracle 8i/9i and 3 times the amount of memory for Oracle 8.0, according to Oracle Installation Guide.
A. Clay Stephenson
Acclaimed Contributor

Re: swapmem and swap for oracle

You are operating under a misconception, swapmem (pseudoswap) doesn't use any 'real' memory; in fact, it doesn't even exist. It's simply a way of telling the OS that I know I don't have enough actual swap space but I'm never going to swap anyway - that's why I bought all this memory.

Consider a box with 16GB of memory and 1GB of swap (yes, that's possible and even reasonable). Without pseudoswap, only 1GB of processes could be run eventhough you have 15GB of free memory; with pseudoswap you can run 1.75x mem + swap worth of processes.

Pseudoswap only comes into play when swapspace < memory. The old rules about 2x-3x memory for swapspace very seldom apply and not at all to databases. The installation guidelines are essentially state of the art late 1980's rules of thumb. If an Oracle box needed 2x-3x swapspace these days and were actually swapping that much the performance would be all but non-existant.

If swapspace exceeds memory, then pseudoswap buys you nothing but again the memory is not being used for swap; it simply does not exist. You are reading something into the swapinfo display about memory that simply does not exist.



If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: swapmem and swap for oracle

Oops, my advanced hunt andf peck typing has done me in again.

That should be 0.75memory + swap so that with 16GB of memory and 1GB, you could run
12GB + 1GB worth of processes.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: swapmem and swap for oracle

Hi,


swapmem_on parameter does not really use any memory. It's for reservation calculation purposes only. But your point is relavent in one way.

I would not enable swap_mem on systems that have less physical memory or if it is memory constraint unless you have plenty of device swap available. It will have little or no effect in that situation.

Take a scenario for ex.,. 1 GB of Physical memory and 1 GB of device swap with swap_mem on. This means the system will see ~1.75GB of virtual memory. However, as memory utilization crosses 25%, the percentage available for reservation out of memory will decrease and finally you may end up with only 1GB of swap space.

I recommend this parameter to superdome family where you can find a minimum of 8 GB physical memory. So you dont' have to unnecessarily waste disk for swap.

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