Professional Documents
Culture Documents
Monitoring and Managing Memory
Monitoring and Managing Memory
Objectives
After completing this lesson, you should be able to: Describe the memory components in the SGA Implement Automatic Shared Memory Management Manually configure SGA parameters onfigure automatic !GA memory management
8-2
8-3
Server process *
!GA
Server process +
!GA
!GA
SGA Shared pool Streams pool )arge pool -eep buffer cache (ecycle buffer cache 'ava pool Database buffer cache (edo log buffer n- bloc, si.e buffer caches
8-4
8-5
#uffer ache
SGA
Server )(1 lists hec,point &ueue D# buffer cache
/ / / /
Data files
8-& Copyright 2008, Oracle. All rights reserved.
8-'
SGA
D# buffer caches
(ecycle pool
-eep pool
Default pool
8-8
CREATE INDEX cust_idx STORAGE (BU ER_POOL KEEP !" ALTER TABLE #$%cust#&$'s STORAGE (BU ER_POOL RECYCLE!" ALTER INDEX #$%cust_()*&$_ix STORAGE (BU ER_POOL KEEP!"
8-)
Shared !ool
Si.e is specified by using SHARED_POOL_SIZE/ )ibrary cache contains statement te2t, parsed code, and e2ecution plan/ Data dictionary cache contains definitions for tables, columns, and privileges from the data dictionary tables/ $he 1ser Global Area 31GA4 contains session information if using Oracle shared server/
Shared pool
Shared pool
8 - *0
)arge !ool
an be configured as a separate memory area in the SGA Is si.ed by the LARGE_POOL_SIZE parameter Is used to store data in memory for:
+ 1GA + #ac,up and restore operations + !arallel &uery messaging
Redo logDatabase buffer buffer cache Shared pool )ibrary cache Dictionary cache Session !arallel
8 - ** Copyright 2008, Oracle. All rights reserved.
'ava !ool
an be configured as a separate memory area in the SGA Is si.ed by the +A,A_POOL_SIZE parameter Is used to store data in memory for all session% specific 'ava code and data "ithin the '5M
Redo logDatabase buffer buffer cache Shared pool )ibrary cache Large pool
Dictionary cache
Java pool
8 - *2
Dictionary cache
Server process
ontrol files
)G0(
A( n
8 - *3
#uffer cache )arge pool Shared pool 'ava pool Streams pool #atch jobs
SGA_TARGET
8 - *5
8 - *&
8 - *'
8 - *8
Autotuned Database buffer cache (edo log buffer )arge pool Autotuned $otal SGA si.e 9 : G#
8i2ed SGA
8 - 20
8 - 2*
$hese components must be manually configured using database parameters/ $he memory used by these components reduces the amount of memory available for autotuning the SGA/
8 - 22
SGA_TARGET 2 :G DB_CACHE_SIZE 2 = +A,A_POOL_SIZE 2 = LARGE_POOL_SIZE 2 = SHARED_POOL_SIZE 2 = STREA9S_POOL_SIZE 2 = SELECT )*&$E @*(u$E isd$F*u(t RO9 @A/*'*&$t$' 6HERE )*&$ LIKE CGsi?$C"
8 - 23
8 - 24
Disabling ASMM
Setting SGA_TARGET to .ero disables autotuning/ Autotuned parameters are set to their current si.es/ $he SGA si.e as a "hole is unaffected/
SGA si.e 9 : G# SGA si.e 9 : G# !arameters: sB*_t*'B$t 2 = d;_c*cD$_si?$ 2 HG sD*'$d_/##(_si?$ 2 1G (*'B$_/##(_si?$ 2 H419 I*@*_/##(_si?$ 2 1H89 st'$*&s_/##(_si?$ 2 1H89
8 - 25
(esi.ing manually tuned parameters affects only the tunable portion of the SGA/
8 - 2&
0or, area
Dedicated connections
Shared server
!GA
!GA
8 - 2'
8 - 28
8 - 2)
8 - 30
8 - 3*
8 - 32
8 - 33
8 - 34
8 - 35
Me ory 3"(i(g 2"ideli(es ,or the 4i5rary Cache -(otes o(ly slide.
8 - 3&
Summary
In this lesson, you should have learned ho" to: Describe the memory components in the SGA Implement Automatic Shared Memory Management Manually configure SGA parameters 1se automatic !GA memory management
8 - 3'
8 - 38