12c新增参数pga_aggregate_limit

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xxzhaobb/article/details/87687484

参考文档:

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/tgdba/tuning-program-global-area.html#GUID-C1796FFD-5A7E-4FA7-945B-4B6CE374091A

PGA_AGGREGATE_TARGET 是一个目标,并不是一个限制

当超过 PGA使用率的话,会导致swap,导致系统响应缓慢。

当超过PGA_AGGREGATE_IIMIT后,一些session会被abort或者termited。

16.3 Sizing the Program Global Area by Specifying an Absolute Limit

In automatic PGA memory management mode, Oracle Database attempts to adhere to the PGA_AGGREGATE_TARGET value by dynamically controlling the amount of PGA memory allotted to work areas. However, PGA memory usage may exceed the PGA_AGGREGATE_TARGET setting at times due to the following reasons:

  • The PGA_AGGREGATE_TARGET setting acts as a target, and not a limit.

  • PGA_AGGREGATE_TARGET only controls allocations of tunable memory.

Excessive PGA usage can lead to high rates of swapping. When this occurs, the system may become unresponsive and unstable. In that case, consider using any of the following methods to specify an absolute limit on the PGA memory usage:

16.3.1 Sizing the Program Global Area Using the PGA_AGGREGATE_LIMIT Parameter

The PGA_AGGREGATE_LIMIT initialization parameter enables you to specify an absolute limit on the PGA memory usage. If the PGA_AGGREGATE_LIMIT value is exceeded, Oracle Database aborts or terminates the sessions or processes that are consuming the most untunable PGA memory in the following order:

  • Calls for sessions that are consuming the most untunable PGA memory are aborted.

  • If PGA memory usage is still over the PGA_AGGREGATE_LIMIT, then the sessions and processes that are consuming the most untunable PGA memory are terminated.

In determining the sessions and processes to abort or terminate, Oracle Database treats parallel queries as a single unit.

By default, the PGA_AGGREGATE_LIMIT parameter is set to the greater of 2 GB, 200% of the PGA_AGGREGATE_TARGET value, or 3 MB times the value of the PROCESSES parameter. However, it will not exceed 120% of the physical memory size minus the total SGA size. The default value is printed into the alert log. A warning message is printed in the alert log if the amount of physical memory on the system cannot be determined.

To set PGA_AGGREGATE_LIMIT:

  • Set the PGA_AGGREGATE_LIMIT initialization parameter to a desired value in number of bytes.

    The value is expresses as a number followed by K (for kilobytes), M (for megabytes), or G (for gigabytes). Setting the value to 0 disables the hard limit on PGA memory.

See Also:

猜你喜欢

转载自blog.csdn.net/xxzhaobb/article/details/87687484