Professional Documents
Culture Documents
Automatic SGA Memory Management
Automatic SGA Memory Management
Tirthankar Lahiri
Senior Manager, Distributed Cache &
Memory Management
Oracle Corporation
Outline
y Overview of Oracle Shared Memory (SGA)
y Introducing Automatic SGA Management
y Benefits
y Using the feature
y How Does it Work?
y Summary
SGA Overview
SGA
SGA Overview
DB_CACHE_SIZE
SHARED_POOL_SIZE
LARGE_POOL_SIZE
JAVA_POOL_SIZE
SGA Overview
Physical IOs
Enable
Automatic Shared Memory Management
SGA_TARGET
Introducing Automatic SGA Memory
Management
y Set SGA_TARGET to the total SGA size
SGA
SGA_TARGET = 8G
Introducing Automatic SGA Memory
Management
y Automatically adapts
Online Buffer Cache to workload changes
Large Batch
Users Jobs y Maximizes memory
Buffer Cache
utilization
Large Pool
y Single Parameter
makes it easier to
Large Pool use
y Helps eliminate out
Shared Pool Shared Pool of memory errors
y Can help improve
Java Pool Java Pool
performance
Using Automatic SGA Management:
SGA_TARGET Parameter
SELECT SUM(bytes)
FROM v$sgastat
WHERE pool = 'shared pool';
Using Automatic SGA Management:
Automatically Tuned Parameters
Parameters:
SGA_TARGET = 8G y When SGA_TARGET is set:
LARGE_POOL_SIZE = 1G
SHARED_POOL_SIZE = 1G – Default values of auto-tuned
parameters is zero
Buffer Cache (3G) – A non-zero value is a lower bound
on the size of the component
Sga size = 8G
Parameters:
SGA_TARGET = 8G
DB_KEEP_CACHE_SIZE = 1G
Querying V$PARAMETER
SELECT name, value, isdefault
FROM v$parameter
WHERE name like '%size';
Enabling Automatic SGA Management
Using Automatic SGA Management :
Resizing SGA_TARGET
y SGA_TARGET is dynamic
y Can be increased till SGA_MAX_SIZE
y Can be reduced till some component reaches
minimum size
y Change in value of SGA_TARGET affects
only automatically sized components
Using Automatic SGA Management :
Resizing SGA_TARGET
SGA_TARGET = 8G
SGA_TARGET=9G
SGA_MAX_SIZE=10G
Disabling Automatic SGA Management
y SGA_TARGET = 0 disables auto-tuning
– Auto parameters set to current component sizes
– SGA size as a whole is unaffected
sga size = 8G
sga size = 8G
Parameters:
sga_target = 0
Parameters: SGA_TARGET=0
db_cache_size = 4G
sga_target = 8G
shared_pool_size = 2G
shared_pool_size=1G
large_pool_size = 512M
java_pool_size = 512M
Using Automatic SGA Management
Resizing Auto Tuned Parameters
SGA
Using Automatic SGA
Management
Resizing Manually Set Parameters
Thank you.
QUESTIONS
ANSWERS