Operating System - HP-UX
1837936 Members
2325 Online
110124 Solutions
New Discussion

swap configuration for new server

 
Dave Chamberlin
Trusted Contributor

swap configuration for new server

Hello,

I have a new server for my oracle upgrade, an RP8400 with 12G RAM. It has 4G of primary swap and swapmen is turned on with 10G of pseudo-swap. In my last upgrade, my server (an N4000) had 4G RAM and 4G of swap. It ran out of reservable swap during the upgrade several times and was unable to continue - as it could not spawn any new processes. I have read several contrasting points on the use of pseudo-swap. For me, disk is far cheaper than RAM. I want to know if I should configure secondary swap and add say 10G, or just stick with the system as configured. I will be running 2000-3000 Oracle processes when the system goes live. I don't expect to be using the swap but it has to be reserved to able to spawn new processes. Thanks for your advice...
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: swap configuration for new server

Well, if this were me and I've installed Oracle many, many times, I would configure with 3GB of device swap (25% of memory) and enable pseudoswap. Pseudoswap will count 75% of your installed physical memory as swapspace. This should allow the system to fully utilize your 12GB of memory. I suspect your last upgrade failed because you had large SGA's and actually needed additional virtual memory but with the larger memory in this box, that shouldn't be a problem.

Eventhough you will not be using any swap (I trust), every dab of it should be mirrored so that a disk failure will not require a shutdown.
If it ain't broke, I can fix that.
Mel Burslan
Honored Contributor

Re: swap configuration for new server

It all depends on your particular application and how your consumers will utilize this server, but to give you an example, I have ran out of reservable swap space on an N-class 8 processsor 12G RAM with a total swap size of 20GB and had to add another 13 GB lun device swap in the middle of the day last month and this server was the database server for SAP R/3 running oracle. So, if you want to be on the safe side, and if you have a similar server configuration as far as the functionality goes, give it about the same size of swap to keep you away from headaches. Always keep some free disks/LUNs available to extand your swap area on the fly.

Hope this helps
________________________________
UNIX because I majored in cryptology...
A. Clay Stephenson
Acclaimed Contributor

Re: swap configuration for new server

It's a good idea to go ahead and oversize maxswapchunks so that if you do need to add additional swap, a kernel rebuild is not necessary. In general, it's so easy to add additional swap if you intentionally leave unallocated space in some VG's (even in the middle of an Oracle install) that it's not worth worrying about. Monitor the swap usage and add as needed. My other rule about swap configuration is that swap and dump have absolutely nothing to do with each other despite the default of combining them.

A few installs actually look for the amount of swap and will complain if enough space is not found (even if it will never really be used) --- that's a perfect use for that dreaded, awful filesystem swap.
If it ain't broke, I can fix that.
Eknath
Trusted Contributor

Re: swap configuration for new server

Hi Dave,

The recommanded swap size is 1.5-2 times of your physical memory. But it again depends on load on server and how much physical memory is utilised. If the physical memory is planned according to # of users and application. I would add more swap keeping in mind future expansion. This is my personal view.

Thanks!
eknath
Devesh Pant_1
Esteemed Contributor

Re: swap configuration for new server

I would say Eknath's comment is from the old days when the RAM used to be too low. ACS 's point is very valid and why have too much of swap when you are not going to utilize it.

Devesh
A. Clay Stephenson
Acclaimed Contributor

Re: swap configuration for new server

One thing to take into account is that by today's standard a box running Oracle with 4GB of memory is considered "small" - a rather staggering thought when my first UNIX box had much less than 1MB of memory. Your 12GB box is "medium" but there is a huge difference between the two amounts of memory. Remember, pseudoswap is nothing more and nothing less than kernel arithmatic; it's not swap at all. If you want to configure as much swap as you have memory then feel free but turn off pseudoswap; it serves no purpose when swap >= RAM. The point is, if your box begins to swap significantly then performance is going to take at least a 100x hit -- whether pseudoswap is on or off. In that case, you really have two options 1) More physical memory 2) Reduce the memory footprint, typically by reducing the size of the SGA. When your DBA's object, pull out your baseball bat and apply it liberally because the impact of extra trips to the disk because the SGA is smaller is much, much smaller than the performance impact of paging.
If it ain't broke, I can fix that.