SGA related init params

本文详细介绍了 Oracle 数据库中 SGA 相关的初始化参数及其对数据库性能的影响。包括自动调整参数如 DB_CACHE_SIZE 和手动调整参数如 DB_KEEP_CACHE_SIZE 的设置与优化建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SGA related init params

 

Auto tuned SGA parameters

  • db_cache_size
  • shared_pool_size
  • large_pool_size
  • java_pool_size
These parameters are called auto tuned because automatic shared memory managment can dynamically change the sizes of these pools if it is enabled.

DB_CACHE_SIZE

The value of this parameter affects the size of the SGA: It sets the size of the default buffer pool.
According to metalink note 223299.1, this is one of the top parameters affecting performance.
With Oracle 10g, one can turn on Automatic Shared Memory Management which distributes shared memory as required. See also sga_target.

JAVA_POOL_SIZE

The value of this parameter affects the size of the SGA.
With Oracle 10g, one can turn on Automatic Shared Memory Management which distributes shared memory as required. See also sga_target.

SHARED_POOL_SIZE

The value of this parameter affects the size of the SGA or more appropriately the size of the shared pool within the SGA.
Apparently, when installing JServer, this parameter must at least be set to 24M.

LARGE_POOL_SIZE

With Oracle 10g, one can turn on Automatic Shared Memory Management which distributes shared memory as required. See also sga_target.

Manual SGA parameters

  • db_keep_cache_size
  • db_recycle_cache_size
  • db_NNk_cache_size
    NN being one of 2, 4, 8, 16, 32
  • log_buffer
  • streams_pool_size

DB_KEEP_CACHE_SIZE

According to metalink note 223299.1, this is one of the top parameters affecting performance.

DB_RECYCLE_CACHE_SIZE

According to metalink note 223299.1, this is one of the top parameters affecting performance.

LOG_BUFFER

Up to 9i
The value of this parameter defines the size of the redo log buffer. As the redo log buffer is part of the SGA, it affects the size of the SGA as well.
Setting this value to anything greater than 3M is useless as the log buffer is flushed anyway when it is filled up to 1M or when it is reaches one third of its capacity, whichever comes first. (Thanks to William White who notified me of an error here).
10g
From 10g onwards, there is a lot more to do about the initialization parameter log_buffer. Also, Metalink note 351857.1 states that the size of the log buffer cannot be changed with this paramter from 10gR2, instead, the size will be set by Oracle.

STREAMS_POOL_SIZE

Other parameters

DB_BLOCK_BUFFERS

The value of this parameter affects the size of the SGA, or more precisely, the size of the buffer cache. This parameter is deprecated since 9i, db_cache_size should be used instead.
With Oracle 10g, one can turn on Automatic Shared Memory Management which distributes shared memory (of which the buffer cache is part) as required. See also sga_target.

DB_BLOCK_CHECKSUM

DB_BLOCK_SIZE

Determines the size of a database blocks.

SGA_MAX_SIZE

sga_max_size sets the maximum value for sga_target
If sga_max_size is less than the sum of db_cache_size + log_buffer + shared_pool_size + large_pool_size at initialization time, then the value of sga_max_size is ignored.
According to metalink note 223299.1, this is one of the top parameters affecting performance.

SGA_TARGET

This parameter is new with Oracle 10g. It specifies the total amaount of SGA memory available to an instance. Setting this parameter makes Oracle distribute the available memory among various components - such as shared pool (for SQL and PL/SQL), Java pool, large_pool and buffer cache - as required.
This new feature is called Automatic Shared Memory Management. With ASMM, the parameters java_pool_size, shared_pool_size, large_pool_size and db_cache_size need not be specified explicitely anymore.
sga_target cannot be higher than sga_max_size.

Thanks

Thanks to Guy Lambregts who helped me improving this page (section log_buffer and a typo).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值