Oracle ASMM
Oracle Automatic System Memory Management
This feature attempts to automatically manage memory usage of the components that make up the System Global Area (SGA).
Use of this feature IS recommended.
If this feature is enabled (SGA_TARGET is non-zero) then the following parameters will be automatically sized. Any non-zero value in the following parameters will be treated as a minimum value.
SHARED_POOL_SIZE
LARGE_POOL_SIZE
JAVA_POOL_SIZE
DB_CACHE_SIZE
STREAMS_POOL_SIZE
Parameters
SGA_TARGET
SGA_MAX_TARGET
Check
SHOW PARAMETER SGA_TARGET
SHOW SPPARAMETER SGA_TARGET
Check
SHOW PARAMETER SGA_MAX_TARGET
SHOW SPPARAMETER SGA_MAX_TARGET
Change
ALTER SYSTEM SET SGA_TARGET='0' SCOPE=spfile;
Restart the databaseOr
only if SGA_MAX_TARGET is set at a higher value than MEMORY_TARGETAND SGA_MIN_TARGET is set at a lower value than SGA_TARGET...ALTER SYSTEM SET SGA_TARGET='0' SCOPE=memory;
ALTER SYSTEM SET SGA_TARGET='0' SCOPE=both;
Change
ALTER SYSTEM SET MEMORY_MAX_TARGET='0' SCOPE=spfile;
Restart the databaseSizing the SGA
SELECT (
(SELECT SUM(value)
FROM V$SGA) -
(SELECT CURRENT_SIZE
FROM V$SGA_DYNAMIC_FREE_MEMORY)
)/1024/1024 "SGA_TARGET (MB)"
FROM DUAL;
V$SGA
Fixed Size
Variable Size
Database Buffers
Redo Buffers
V$SGA_DYNAMIC_FREE_MEMORY
SELECT *
FROM v$sga_target_advice;
V$SGA_TARGET_ADVICE
Monitoring the SGA
SELECT *
FROM V$SGAINFO;
V$SGA_INFO
SELECT *
FROM v$sgastat
ORDER BY bytes;
V$SGASTAT
SET PAGESIZE 30
SET LINESIZE 200
COLUMN component FORMAT A30
SELECT *
FROM v$sga_dynamic_components;
V$SGA_DYNAMIC_COMPONENTS
Shows the current sizes of all dynamically tuned memory components, including the total sizes of the SGA and instance PGA.(1)ALTER SESSION SET nls_date_format='DD-MON-YYYY HH24:MI:SS';
SET PAGESIZE 20
SET LINESIZE 200
COLUMN component FORMAT A20
COLUMN oper_type FORMAT A8
COLUMN parameter FORMAT A18
COLUMN con_id FORMAT 999
SELECT *
FROM v$sga_resize_ops;
V$SGA_RESIZE_OPS
V$SGA_CURRENT_RESIZE_OPS
Bibliography & References
https://oracle-base.com/articles/10g/performance-tuning-enhancements-10g#automatic_shared_memory_managementhttps://docs.oracle.com/en/database/oracle/oracle-database/12.2/tgdba/tuning-shared-pool-and-large-pool.htmlhttps://docs.oracle.com/database/121/ADMIN/memory.htm(1) https://docs.oracle.com/database/121/ADMIN/memory.htm#ADMIN11201
Viewshttps://docs.oracle.com/database/121/REFRN/GUID-4E216A4C-5C7E-43F6-8E2C-CDE442A1CEEC.htm (V$SGA)(12.1)https://docs.oracle.com/database/121/REFRN/GUID-F0B65F1C-3981-4DC6-A6BF-2824EFECA77F.htm (V$SGA_CURRENT_RESIZE_OPS)(12.1)https://docs.oracle.com/database/121/REFRN/GUID-21F76343-CE2B-417F-88AD-FA81DFE1CAA2.htm (V$SGA_RESIZE_OPS)(12.1)https://docs.oracle.com/database/121/REFRN/GUID-FA6BA5FD-78BB-4371-9F98-4D1197CDCE4C.htm (V$SGA_DYNAMIC_COMPONENTS)(12.1)https://docs.oracle.com/database/121/REFRN/GUID-38197FA4-B928-4A58-A526-7512DD8C61BD.htm (V$SGA_DYNAMIC_FREE_MEMORY) (12.1)https://docs.oracle.com/database/121/REFRN/GUID-7908FB61-F0F3-4E83-914B-7721B01D1CBA.htm (V$SGA_TARGET_ADVICE)(12.1)https://docs.oracle.com/database/121/REFRN/GUID-27672126-D7BF-46DB-9A27-0AD2AA94F2AE.htm) (V$SGAINFO)(12.1)https://docs.oracle.com/database/121/REFRN/GUID-60D2578E-2293-45F5-91C1-35FDF047E520.htm (V$SGASTAT)(12.1)