Operating System - HP-UX
1845564 Members
1555 Online
110245 Solutions
New Discussion

Large 11i/Oracle9 Server: pseudo swap - Bad or Good?

 
Alzhy
Honored Contributor

Large 11i/Oracle9 Server: pseudo swap - Bad or Good?


By default it is ON .. by virtue of kernel param - "swapmem_on". Should it be ON or OFF in an RDBMS serving environment?

Thanks!
Hakuna Matata.
6 REPLIES 6
G. Vrijhoeven
Honored Contributor

Re: Large 11i/Oracle9 Server: pseudo swap - Bad or Good?

Hi Nelson,

I would advise you to turn pseudo swap on. As far as i know (not 100% sure) HPUX only gives away memory if has space in swap to swap it out. On RDBMS servers it could be so that you have a lot of memory in the server. With this kernel parameter on memory can exseed swap the swap space. If you have a bigger swap partition as you have memory in the server you would not need it. But i set it so if you get a memory expension you are not forced the add swap.

Gideon
Jeff Schussele
Honored Contributor

Re: Large 11i/Oracle9 Server: pseudo swap - Bad or Good?

Hi Nelson.

As usual - it depends.
It depends on whether you have more swap configured than actual RAM. IF you do, turning swapmem on does nothing for you. You pay NO penalty but it does nothing.

The thing you do have to watch out for in a large DB env is total swap space. IF you have processes that want to reserve huge amounts of memeory space, BUT will never actually be deactivated, well then you *need* a LOT of swap space.

I had to setup a system with +128GB swap space because the app team wanted to start +300 Tuxedo processes that wanted to reserve +400MB each. They would never be deactivated, but w/o the swap space they couldn't even start them. I told then they needed to reduce that demand & they will, but this got us over the hump temporarily.

So again the short answer is YES - IF you have more RAM then swap & it doesn't matter if the reverse is true.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: Large 11i/Oracle9 Server: pseudo swap - Bad or Good?

If Oracle does not have adequate swap resources it will run like an its stuck in a snowdrift in Chicago in February.

Very poorly.

I can see little reason not to have pseudo swap on in this case.

I've run Oracle in situations where swap was not adequate and it was a miserable site to behold.

If your system load is light and your SGA and init.ora files are reasonable there is not much of a penalty for having this paramter on. I have it on on HP-9000 webservers running at very low load factors.

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 Sanko
Trusted Contributor

Re: Large 11i/Oracle9 Server: pseudo swap - Bad or Good?

Nelson,

As a rule of Thumb I turn pseudo swap on. That is particularly important if your dbserver gets close to swapping. Actually, the DB will get much slower as you approach swapping is you happen to have a min-max cache % as 5-10% some/any non-equal percent. The cpu usage will go through the roof and system goes on vacation while the chache is reduced...

Then the system prefers contiguous memory...

Tim
Sridhar Bhaskarla
Honored Contributor

Re: Large 11i/Oracle9 Server: pseudo swap - Bad or Good?

Hi Nelson,

When system brings up a process, it will reserve area in the swap so that there is guaranteed space in case it has to swap later.

swapmem_on is only to trick the system that is has more swap available so that it can start more processes than the actual device swap configured. So, there is generally no problem in turning this parameter on. On the other hand, since the system can bring up more processes than it *actually* reserved which may mean a problem in a different angle but that's very rare.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Large 11i/Oracle9 Server: pseudo swap - Bad or Good?

The answer is "it depends". Pseudoswap (which isn't swap at all) came about as a result of boxes having more and more memory.
You just bought a new box with 32GB. Now consider that you have 1GB of primay swap. If swapmem_on=0 then you all you can use is 1GB of memory for process space; the reamining 31GB of memory is unused. However, if swapmem_on=1 then you are allowed 75% of RAM + swap as total address space or 25GB. Thus the minumum required swap to fully utilize your memory is 25% of RAM with swapmem_on=1.

Unless psedoswap is enabled, you would have to use 32GB of swapspace (64GB if mirrored and swap most definitely should be mirrored) that really does absolutely nothing. After all, you bought all that memory so you wouldn't have to swap in the first place!

Here is my typical setup.
swapmem_on=1
512MB-1024MB of primary swap (you must have some)
optionally configure additional 25% of RAM sime as device swap

Monitor swap usage and add additional swap as needed. It's so easy to add additional swap that there is really no point in worrying about it when you first configure a system.

Finally, disconnect yourself from the notion (and default) that swapspace has anything to do with dump space.
If it ain't broke, I can fix that.