Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic SGA and pinned

Re: Dynamic SGA and pinned

From: Karsten Schmidt <>
Date: 5 Aug 2004 08:21:32 -0700
Message-ID: <>

Hi there,

> There may be subtleties about the way Solaris uses memory that I am unaware
> of, but as far as I know, if you set SGA_MAX_SIZE on any platform to a given
> value, then that amount of RAM is immediately 'stolen' from the operating
> system and allocated to Oracle's own exclusive use. That large chunks of
> that shared memory segment are not *actually* used, because your
> shared_pool_size or db_cache_size are set to low amounts is irrelevant: the
> large shared memory segment has nevertheless been allocated to Oracle's use
> from the total pool of available physical RAM, and hence that RAM is not
> available for any other programs running on that server to make use of.

on a decent OS this is not entirely true. Oracle will initially allocate the memory (using malloc and such). But then as other processes come along, and want to use RAM, it will get paged out. After a while, the allocated but un-used portion of the SGA wil reside on disk in the swap area, and not occupy physical RAM.

unless, as the OP pointed out, the SGA is locked in phys memory, which would prevent the virtual memory subsystem from paging it out. You can use the lock_sga parameter to control this. (false by default, which would allow paging out the SGA)

quote from the 9.2 manuals:
LOCK_SGA locks the entire SGA into physical memory. It is usually advisable to lock the SGA into real (physical) memory, especially if the use of virtual memory would include storing some of the SGA using disk space. This parameter is ignored on platforms that do not support it.

Karsten Received on Thu Aug 05 2004 - 10:21:32 CDT

Original text of this message