Professional Documents
Culture Documents
By Burleson Consulting
Notes:
Oracle ASMM and AMM are not the same and are associated with different releases
of Oracle. See my notes on the difference between ASMM and AMM.
See these important notes scripts for detecting AMM resize operations.
There is an advisory on using bitmap free lists (ASMM). ASMM (AMM) and dynamic
memory management has measurable overhead for resize operations, and some shop may
want to disable AMM. See my important notes on Oracle dynamic memory management
and how Oracle AMM resize operations can hurt performance.
Automatic Memory Management has issues since its inception and by 11g release 2 it
remains problematic, and in some cases ASMM should be disabled in 11g release 2. See
MOSC note 793845.1 titled: "High direct path read waits in 11g".
Oracle has always tried to provide advisory tools for the Oracle DBA who wants to monitor and
re-size their data buffers (db_block_buffers, db_cache_size):
Oracle7 - x$kcbcbh
Oracle9i - v$db_cache_advice
Oracle10g has introduced special double underscore hidden parameter to control ASMM. Once
you see these, AMM is being used.:
__db_cache_size
__shared_pool_size
__large_pool_size
Once enabled, Oracle Automatic Shared Memory Management will morph the pool areas within
the confines of sga_max_size.
When using AMM you have to consider the interaction of these parameters:
sga_target: (pre 11g): If the sga_target is set to some value then the automatic shared
memory management (ASMM) is enabled, the sga_target value can be adjusted up to the
sga_max_size parameter, not more than sga_max_size parameter value.
o sga_max_size: The sga_max_size sets the overall amount of memory the SGA
can consume but is not dynamic. The sga_max_size parameter is the max
allowable size to resize the SGA memory area parameters.
Their sizes will remain constant; they will not shrink or expand based on load. You should
consider this factor when using multiple-size buffer, KEEP, and RECYCLE pools.
In addition, log buffer is not subject to the memory adjustmentthe value set in the parameter
log_buffer is constant, regardless of the workload. ( In 10g, a new type of pool can also be
defined in the SGA: Streams pool, set with parameter streams_pool_size. This pool is also not
subject to automatic memory tuning.)
From the bestselling book "Oracle 10g New Features", we see how Oracle monitors the pool
workloads::
A new background process named Memory Manager (MMAN) manages the automatic shared
memory. MMAN serves as the SGA Memory Broker and coordinates the sizing of the memory
components. The SGA Memory Broker keeps track of the sizes of the components and pending
resize operations.
OPER_TYPE
------------SHRINK
GROW
OPER_MODE INITIAL
TARGET
FINAL
--------- ---------- ---------- ---------MANUAL
160
148
148
MANUAL
0
12
12
select
component,
current_size/1024/1024 "CURRENT_SIZE",
min_size/1024/1024 "MIN_SIZE",
user_specified_size/1024/1024 "USER_SPECIFIED_SIZE",
last_oper_type "TYPE"
from
v$sga_dynamic_components;
STATUS
--------COMPLETE
COMPLETE
COMPONENT
-----------------------------shared pool
large pool
java pool 4
streams pool
DEFAULT buffer cache
CURRENT_SIZE
-----------80
8
8
12
48
MIN_SIZE
---------80
8
48
0
24
USER_SPECIFIED_SIZE
------------------80
8
48
12
24
TYPE
------------STATIC
STATIC
STATIC
GROW
SHRINK
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
24
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
STATIC
Click here to see scripts for monitoring the shared pool for free RAM chunks. You can also issue
these queries to see free RAM in Oracle10g:
Robert Freeman notes the default behavior with a blank init.ora file:
I did shutdown my local 10g database and brought it up with a blank init.ora (only had the
db_name parameter in it). The actual default in XP 10g is db_cache_size=48m,
shared_pool_size=32m.
MOSC Note:257643.1, Oracle Database 10g Automated SGA Memory Tuning gives hints about
how MMAN determines current workloads. The documentation shows that Oracle uses the
memory advisories from Oracle9i and applies heuristics (rules of thumb) to determine the best
shift in RAM pool sizes. These heuristics consist of hypothesis testing with "what if" scenarios,
computing the ratio of the marginal reduction in physical disk reads, and choosing the size with
the greatest overall marginal benefit:
The SGA Memory Broker observes the system and workload in order to determine the ideal
distribution of memory. It is never complacent and performs this check every few minutes so that
memory can always be present where needed.
Based on workload information, automatic shared memory tuning:
Cause: If you enable automatic SGA Management by setting SGA_Target >0 and
if you are using db_block_buffers(Obsolete parameter) in your init.ora.
Startup of Database fails with ORA-00824 Error
96
94
92
6 __db_cache_size
6 __java_pool_size
6 __large_pool_size
6 __shared_pool_size
130,023,424
12,582,912
4,194,304
142,606,336