文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14211/memory.htm#PFGRF01401
The goal is to have most work areas running with an optimal size(for example, more than 90% or even 100% for pure OLTP systems),while a smaller fraction of them are running with a one-pass size(for example, less than 10%). Multi-pass execution should beavoided. Even for DSS systems running large sorts and hash-joins,the memory requirement for the one-pass executions is relativelysmall. A system configured with a reasonable amount of PGA memoryshould not need to perform multiple passes over the input data.
Note:
For backward compatibility, automatic PGA memorymanagement can be disabled by setting the value of thePGA_AGGREGATE_TARGET
initialization parameter to0. When automatic PGA memory management is disabled, themaximum size of a work area can be sized with the associated_AREA_SIZE
parameter, such as theSORT_AREA_SIZE
initialization parameter.
Configuring Automatic PGAMemory
*_AREA_SIZE
parameters are ignored by all sessionsrunning in that mode. At any given time, the total amountof PGA memory available to active work areas in the instance isautomatically derived from the PGA_AGGREGATE_TARGET
initializationparameter.This amount is set to the value ofPGA_AGGREGATE_TARGET
minus the amount of PGA memoryallocated by other components of the system (for example, PGAmemory allocated by sessions). The resulting PGA memory is thenassigned to individual active work areas, based on their specificmemory requirements.
(译文:在任何给定时间,可用于实例中各活动工作区的 PGA 内存
总量自动从PGA_AGGREGATE_TARGET 初始化参数派生。此内存量设置为
PGA_AGGREGATE_TARGET 值减去系统其它组件分配的 PGA 内存量(例如,会话
分配的PGA 内存)。由此得到的PGA 内存随后按照各活动工作区的特定内存需
求分配给相应的工作区)
PGA_AGGREGATE_TARGET
limit set by the DBA,by controlling dynamically the amount of PGA memory allotted to SQLwork areas. At the same time, Oracle tries tomaximize the performance of all the memory-intensive SQLoperations, by maximizing the number of work areas that are usingan optimal amount of PGA memory (cache memory). The rest of thework areas are executed in one-pass mode, unless the PGA memorylimit set by the DBA with the parameterPGA_AGGREGATE_TARGET
is so low that multi-passexecution is required to reduce even more the consumption of PGAmemory and honor the PGA target limit.
PGA_AGGREGATE_TARGET
. You candetermine this setting in three stages:
-
Make a first estimate for
PGA_AGGREGATE_TARGET
,based on a rule of thumb. By default, Oracle uses 20% of the SGAsize. However, this initial setting may be too low for a large DSSsystem. -
Run a representative workload on the instance and monitorperformance, using PGA statistics collected by Oracle, to seewhether the maximum PGA size is under-configured orover-configured.
-
Tune
PGA_AGGREGATE_TARGET
, using Oracle PGA advicestatistics.