1834604 Members
3928 Online
110069 Solutions
New Discussion

Swap space configuration

 
SOLVED
Go to solution
jason thompson_1
Frequent Advisor

Swap space configuration

We are doing a fresh install of 11.11. Does anyone have any recommendations regarding swap space? Like how much, should each disk have some, should it be spread out through various volumes, ect.?
What's that smell?
4 REPLIES 4
Hazem Mahmoud_3
Respected Contributor

Re: Swap space configuration

Make sure you have enough on vg00, because that is where the system dump will go if the system crashes. We had a situation where our system crashed and there was not enough swap space on vg00 to store the dump. The dump files will not go on any other volume group. HP provided us with that information.

-Hazem
RAC_1
Honored Contributor

Re: Swap space configuration

Depends on how much RAM you have. With large RAM, you need not have as much large swap space. Now how much RAM is large RAM?

I take it as anything more than 12 GB is large RAM.

Generally I follow the rule of having 1.5 times the RAM. Create samll primary device swap and seconday big enough so that you suffice 1.5 times RAM convention.

Setting same priority and having these both swap spaces on different disks (Same volume group is OK) is good.

With large RAM, you can just have same swap space as that of RAM or even less. In this situation you can set pseudo mem on and take advantage of having large RAM. When you set swapmem_on to 1, the swap space available is taken as swap space+ 75 % of RAM. This is just for kernel calculation, so that the process see as enough swap space available versusus the situation where in they would not have started if you would not have set swpmem_on to 1.

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Swap space configuration

A search of the Forums will reveal tons of threads dealing with this issue.

Here are my humble suggestion:

1) Allocate about 512MB/1GB of primary swap. -- you must have some.
2) Enable pseudoswap.
3) Monitor swap usage and add additional swap as needed.
4) Disassociate yourself from the notion that swap space has anything to do with dump space.
5) All swap space should be mirrored assuming you have Mirror/UX.
6) Do not have swap spaces of equal priority on the same physical disk.
7) Ideally, you have bought enough memory that you never swap.

All of the rules about 2-3x RAM (4-6x if mirrored) come from another decade. There are very few times when that much swap is needed and when it is worrying about swap layout is all but pointless because the performance will be so bad that it really doesn't matter.



If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: Swap space configuration

Hi Jason,

Just a word of caution. Most of the times we tend to ignore dump device. If configured insufficiently, it can bite us when there is a problem with the system and it didn't produce enough dump. Usually primary swap device is configured as the dump device and relatively larger primary swap devices often save people that didn't pay attention to dump devices while configuring the systems.
So, having a very low primary swap means you will need to pay special attention to your dump as dump has to be contiguous and it's a pain to extend primary swap. Once the system is up and running with full load, run 'crashconf' and find out if your dump configuration is sufficient.

I prefer configuring a 'dumponly' device as I can disable 'savecrash' during the startup which can save me time during the crashes. I can always save the crash later. However, configuring dumponly device on external storage can be tricky during the situations where the external storage is not available (or is the cause) during the crash.

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