AMM Oracle automatic memory management

With Oracle AMM  oracle manages automatically SGA and PGA.



Database smart flash cache is designed to work as a L2 buffer cache. It is conceived to allocate this on a flash disk device (solid disk). To enable automatically memory management you should set MEMORY_TARGET and MEMORY_MAX_TARGET parameters. SGA and PGA memory will be allocated automatically to work around MEMORY_TARGET with MEMORY_MAX_TARGET upper limit. In order to size MEMORY_TARGET you need to:

SQL> select * from v$memory_target_advice order by memory_size;

MEMORY_SIZE MEMORY_SIZE_FACTOR ESTD_DB_TIME ESTD_DB_TIME_FACTOR    VERSION
----------- ------------------ ------------ ------------------- ----------
       3072                ,75     37999044              1,0005          0
       4096                  1     37980054                   1          0
       4608              1,125     37980054                   1          0
       5120               1,25     37980054                   1          0
       5632              1,375     37980054                   1          0
       6144                1,5     37980054                   1          0
       6656              1,625     37980054                   1          0
       7168               1,75     37980054                   1          0
       7680              1,875     37980054                   1          0
       8192                  2     37980054                   1          0

10 filas seleccionadas.

SQL> show parameter memory_target;

NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ------------------------------

memory_target                        big integer                      4G

SQL> show parameter memory_max_target

NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ------------------------------

memory_max_target                    big integer                      8G

You can see MEMORY_TARGET was set with 4G as  v$memory_target_advice view recommends.
With this query you can obtain historical memory components grown and shrinked.
set linesize 190
 alter session set nls_date_format = 'dd.mm.yyyy hh24:mi:ss';
col COMPONENT for a20
col PARAMETER for a25
select COMPONENT, OPER_TYPE, OPER_MODE,PARAMETER,INITIAL_SIZE/1024/1024 INITIAL_SIZE, TARGET_SIZE/1024/1024 TARGET_SIZE, FINAL_SIZE/1024/1024 FINAL_SIZE ,STATUS,START_TIME,END_TIME -START_TIME  from gV$MEMORY_RESIZE_OPS;
Size memory of the server:
set linesize 190
col STAT_NAME for a35
select STAT_NAME, VALUE/1024/1024/1024, OSSTAT_ID, COMMENTS, CUMULATIVE from  v$osstat where  STAT_NAME like 'PHYSICAL_MEMORY_BYTES';
See if the machine is using swap memory:
set linesize 190
col STAT_NAME for a35
select INST_ID, STAT_NAME, VALUE/1024/1024 Gb, OSSTAT_ID, COMMENTS, CUMULATIVE from  gv$osstat where STAT_NAME like 'VM_%' order by INST_ID, STAT_NAME;
This is a cumulative value from database start to present, so launch this query several times and see if the total value is growing..

Comments

Popular posts from this blog

Oracle Historical Session Information with ASH >10g

Purging and archiving Oracle alert.log and listener.log

Check sessions and processes limits in Oracle