1834942 Members
2152 Online
110071 Solutions
New Discussion

configuration swap

 
Rene Wiesner
Occasional Contributor

configuration swap

I've ordered two rp5470 with 6 GB RAM each one for database server cluster. The machines came with pre-configured swap of 4 GB. Oracle recommends to have twice of RAM as swap. So I should create 8 GB of additional swap space. I can use a second volume group, separating from the first swap. But whats the "best" configuration? Create two additional swap devices with 4 GB each one? Or one swap with 8 GB? In case of two additional devices, which priority should I use?
Another possibility is to drop the factory created swap and create two new swaps on different devices, each 6 GB, but this is the hardest way...
6 REPLIES 6
Animesh Chakraborty
Honored Contributor

Re: configuration swap

Hi,
The best option will be create a separate volume group and creat 8GB swap there with priority 0 so that vg00 will not be affected in case of swaping.

Did you take a backup?
Rene Wiesner
Occasional Contributor

Re: configuration swap

What does this mean "vg00 will not be affected in case of swaping"
Actual the swap device has priority 0. In addition I've read, that I should have equal sized swap devices with same priority on different devices...
steven Burgess_2
Honored Contributor

Re: configuration swap

Hi

Have a look at the below thread for other comments with regard to swap settings

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4bdaa848deccd61190050090279cd0f9,00.html

HTH

Steve
take your time and think things through
Animesh Chakraborty
Honored Contributor

Re: configuration swap

 
Did you take a backup?
Pete Randall
Outstanding Contributor

Re: configuration swap

I'm going to quote Bill Hassell's response from the following thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x9d7b42308663d611abdb0090277a778c,00.html

Bill says
<=====quote=====>There's a *LOT* of misinformation about swap space. With 24Gb of RAM, you do not need
2xRAM *UNLESS* you are going to run dozens of Gbytes of processes and data areas at the
same time--very unlikely. This assumes that you are using the default (and recommended)
paramter swapmem_on=1.

The vast majority of gigabyte swap spaces are never used! So why waste 48Gb of disk space?
Several vendors have recommended 2xRAM to 10xRAM because "HP says so", and if you dust
off some 1988 manuals, they would be correct. For 11i and 24 Gb of RAM, I would start with
about 2Gb of swap space and then monitor swapinfo -tm to see if you need anymore. If everything
easily fits in RAM, then swap space may be needed for memory mapped files but not for
processes. Still only a few Gbytes at most.

<=====unquote=====>


Oracle's recommendations are simply outdated.

Pete

Pete
Shannon Petry
Honored Contributor

Re: configuration swap

I'll second what Pete stated about Mr. Hassell's recommendations, and add a bit of my own explenations. (without copy/pasting a book hehe)
One of the fundamental reasons for 2Xswap as RAM is so that if the kernel core dumps the entire dump can be saved, and swap space is available for debugging core.
The M$ mentality of 2xDiskswap = 1xMemory actually had initial purposes.
UNIX has never had a limitation on swap however, so as long as you have RAM you can run programs. UNIX of all flavors is exceptional at paging to disk only when RAM is full. In theory you could run with 0 diskswap, but I would advize against it.

What has not been touched on yet is swap performance.
For the fastest possible swap it needs to be treated like your fastest I/O. Simply more spindles = better performance.
Swap has an additional control which allows you to define which segments are used first. If there are 4 swap partitions all at priority 1, then syncronous read/writes occur. NOTE a swap priority of 0 means first defined first used, so if our 4 theoretical partitions were all pri=0, swap will be filled in order defined!
Additionally you can split priorities to have 4 swap partitions, 2 on pri=1 and 2 on pri=2. The swap configured at pri=2 would not be used till swap pri=1 is full, both sets of swap would have syncronous writes for 2 partitions/lv's.

A really easy thing to do for swap is just monitor peak usage, and add your growth expectations percentage and a buffer. If your never hitting swap, I'd say still keep a couple gigs for emergency issues, but not more than that.

Regards,
Shannon
Microsoft. When do you want a virus today?