Oracle Performance Tuning : Automatic Shared Memory in 10g

Oracle Automated Shared Memory Management is a new feature introduced in Oracle 10g Databases. In 10g you specify SGA_TARGET instead of the older methods of setting the initialization parameters such as SHARED_POOL_SIZE, DB_CACHE_SIZE. This allows for Automatic Database Performance tuning in Oracle Databases

Oracle 10g Introduces a new way in which a DBA can specify the total memory available to the SGA and then allow the Oracle Database to automatically manage and distribute the memory to each of the sub components including database cache, shared pool and others. This is accomplished by setting SGA_TARGET to the total memory you would like to dedicate to SGA.

This simplifies the administration of Sharepool and DB Cache and allows the avoidance of Out of memory errors including ORA-04031 [ Unable to allocate 4096 bytes of shared memory ].No out of memory errors are generated unless the system has actually run out of memory.Automatic SGA management can also allow for enhanced workload management without any manual intervention from the dba.

SGA_TARGET manages Oracle SGA Automatically

When you set a value for SGA_TARGET, Oracle Database 10g automatically sizes the most commonly configured components, including:

  • Shared pool (for SQL and PL/SQL execution)
  • Buffer Cache
  • Java pool (for Java execution state)
  • Large pool (for large allocations such as RMAN backup buffers)
  •  Streams pool

You need not set the size of any of these components explicitly. By default the parameters for these components will appear to have values of zero. Whenever a component needs memory, it can request that it be transferred from another component by way of the internal automatic tuning mechanism. This transfer of memory occurs transparently, without user intervention.

The performance of each of these automatically sized components is monitored by the Oracle Database instance. The instance uses internal views and statistics to determine how to distribute memory optimally among the components. As the workload changes, memory is redistributed to ensure optimal performance. To calculate the optimal distribution of memory, the database uses an algorithm that takes into consideration both long-term and short-term trends.