Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

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

Re: Dynamic SGA and pinned

From: Christian Antognini <christian.antognini_at_trivadis.com>
Date: Mon, 9 Aug 2004 10:30:26 +0200
Message-ID: <41173626@post.usenet.com>

Hi Howard

> Let's just try and simplify, shall we? Because screen capture after screen
> capture with little by way of explanation on the way through I find rather
> difficult to work with.

Sorry, in my opinion a screen capture is better than 1000 words. But if you have a problem with it, let's start with another example... (I reconfigured the instances, so, forget my last post!)

On my test system I give to Linux 1000MB of physical memory (+500MB of swap). Presently the physical memory is almost full (free=99MB) and few swap is in use (used=76MB).

linux:oracle:B1010 /u00/app/oracle> free -m

             total       used       free     shared    buffers     cached
Mem:          1008        908         99          0         39        640
-/+ buffers/cache:        228        780
Swap:          501         76        425

I started 3 10g instances:

- +ASM (has you wrote we can forgett this one... anyway it is small...)
- A1010
- B1010

Both A1010 and B1010 has SGA_MAX_SIZE=1536M. Since the management of the shared memories is not dynamic, Oracle allocates 1.5GB of shared memories at OS level.

linux:oracle:A1010 /u00/app/oracle> ipcs -m

As you can see more than one shared memory per instance has been created, this is not a problem, it's just my configuration that prevents big shared memories. Anyway, if I let generate a tracefile with ORADEBUG IPC I can map the shared memories with the ID 1310721, 1343490, 1376259 to A1010 and the shared memories with the ID 1441796, 1474565 and 1507334 to B1010. i.e. 3GB of shared memory is allocated but my system has only 1GB of physical memory!

Now, what is important to understand is that Oracle is not able to dynamically manage the shared memory segments, i.e. it always allocate the full SGA_MAX_SIZE when a instance starts (you wrote it many times and we agree about it...). But it is interesting that the allocated memory is virtual memory and NOT physical memory. Therefore if the memory isn't used, i.e. if the real SGA is much smaller than the shared memory, almost no resources are used at OS level. This is not the case on all operating systems. In fact on some OSs using very large SGA_MAX_SIZE is a drawback, on others, like Linux, not.

That said, in my opinion it makes only seldom sense to set a very large SGA_MAX_SIZE (compared to the real SGA). For example on my system I will never be able to bump up the real SGA size to 1.5GB for any of my instances. Therefore it makes no sense to set it....

Chris

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Received on Mon Aug 09 2004 - 03:30:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US