Re: how much swap for 10g on a 4Gb RAM system?

From: joel garry <joel-garry_at_home.com>
Date: Fri, 1 Aug 2008 09:54:15 -0700 (PDT)
Message-ID: <6ec23917-0ba1-4083-8dc8-db9cb1023ac1@j7g2000prm.googlegroups.com>


On Jul 30, 3:41 pm, Palooka <nob..._at_nowhere.com> wrote:
> joel garry wrote:
> > On Jul 29, 12:19 pm, Palooka <nob..._at_nowhere.com> wrote:
> >> obakesan wrote:
> >>> Hi
> >>> I'm just going through installing 10g and wondered about the swap
> >>> requirements. The documents I'm reading suggest:
> >>> " Swap space should be twice the amount of RAM for systems with 2GB of
> >>> RAM or less and between one and two times the amount of RAM for systems with
> >>> more than 2GB. "
> >>> Since I've got 4 Gig, do I really need 4Gig of Swap? I'm not pressing this
> >>> system as its just a "learning" platform.
> >>> Has anyone got any experience with trying this with less:
> >>> $ grep -i swaptotal /proc/meminfo
> >>> SwapTotal:     2031608 kB
> >> Surely it can't hurt just to follow the instructions, can it?
>
> >> Palooka
>
> > Yes, it can.  It can hurt a lot.  That's why the instructions change
> > over time, and sometimes do not reconcile between release notes,
> > installation guides and metalink notes.  Platform specific issues can
> > be especially irritating, and the range of configuration issues over
> > various linux releases is quite broad.
>
> Joel,
>
> I confess to being a little surprised at this. If Oracle say double the
> RAM, why not just do so? A few gig of disk space is surely neither here
> nor there nowadays. Can you elucidate?
>
> Palooka

Well, there are many examples, but probably the most egregious that specifically applies to swap is how long it took for Oracle to start recommending something different for systems with more than 2G of ram. I'm talking a decade or more with people having an order of magnitude more than that, on machines where 64G of disk wasn't trivial in cost.

More fundamentally, it really depends on what you are doing and the specific configuration, the recommendation given is just way too general. But these days, I agree with you and Dan, just follow the blankety-blank instructions. If you screw up and add another instance with a full-size SGA and start swapping, or even just screw up and add a digit to an init.ora parameter, better to have a sluggish system than a crash. That's the essential answer to "Since I've got 4 Gig, do I really need 4Gig of Swap?" on a small learning system, which comes most of a full circle back to times when adding disk is an unwanted expense - "so your system doesn't crash!" And Ana answered the "I'm now deciding wether to repartition to give a bigger swap partion or add a swap file" question, use the swap file. It's easier to change if you decide to. I still don't know what's so special about 2G in this context, sounds mythlike to me.

I can certainly understand the desire to understand the why's and wherefore's, I feel that way myself, and I think in the particular case of configuration for Oracle, all those kernel settings and so on should have explanations as to why they are so, particularly when they are changed. Just blindly following the instructions - OK, the instructions these days are good, and too many people don't follow them and then ask questions (heck, one site went non-public over that sort of thing, and I can understand that). So I can certainly understand simply telling people to follow the instructions. On the other hand, there are a lot of implicit assumptions, like one-instance- per-server, that are simply not addressed. That makes answering a question about these things with "follow the instructions" sound condescending - but since it does address the general case, why have a problem with it? The onus is on the person questioning the instructions to be clear where they are in the process of understanding the instructions.

jg

--
@home.com is bogus.
"Arrrrrrr, mon."  Jamaican Pirate DBA
Received on Fri Aug 01 2008 - 11:54:15 CDT

Original text of this message