Implementation of 11g parameter MEMORY_TARGET on UNIX

From: <ca111026_at_gmail.com>
Date: Sun, 2 Nov 2008 23:49:10 -0800 (PST)
Message-ID: <944a8a46-dbe9-4ed7-9d9a-1871ea9f6ca7@d36g2000prf.googlegroups.com>


Hi All,

11g introduced new parameter MEMORY_TARGET which is sum of SGA + PGA. Oracle manuals state that the database dynamically re-distributes memory
between SGA and PGA as needed.

Question: how is it implemented on UNIX platform taking into account that:
- SGA is one or several shared memory segments (they can be seen using
ipcs -a)
- As far as I know current implementations of shared memory don't
allow a segment
to be re-sized.
So the only way for Oracle to re-size a SGA would be to add or delete shared memory
segments.

Using 11.1.0.6 on Solaris 10 I got following results:
- Configure instance with memory_target = 512M

SQL> show sga

Total System Global Area 534618112 bytes

Fixed Size                  2096496 bytes
Variable Size             330957456 bytes
Database Buffers          197132288 bytes
Redo Buffers                4431872 bytes

Now look at the shared memory segments:
This instance created 4 segments:

T         ID      KEY        MODE        OWNER    GROUP  CREATOR
CGROUP NATTCH      SEGSZ  CPID  LPID   ATIME    DTIME    CTIME
Shared Memory:
m 1342177322   0x278015e0 --rw-rw----   oracle      dba   oracle
dba     21    2260992 18810 19777 18:44:19 18:44:19 18:14:06
m 1342177321   0          --rw-rw----   oracle      dba   oracle
dba     21  121634816 18810 19777 18:44:19 18:44:19 18:14:05
m 1308622888   0          --rw-rw----   oracle      dba   oracle
dba     21  130023424 18810 19777 18:44:19 18:44:19 18:14:05
m 1308622887   0          --rw-rw----   oracle      dba   oracle
dba     21  285212672 18810 19777 18:44:19 18:44:19 18:14:04


Total size is approx 121 + 130 + 285 = 436 MB. This does not match SGA size returned by
'show sga' above.

Now I shrink memory using

SQL> alter system set memory_target = 300m;

System altered.

Check shared memory segments again: same segments remain. But their total size is definitely more than 300M.

How does it work ? Received on Mon Nov 03 2008 - 01:49:10 CST

Original text of this message