Oracle 参数 DB_CACHE_SIZE 官方解释,作用,如何配置最优化建议
本站中文解释
DB_CACHE_SIZE参数用于为SGA内存池中的数据库缓冲池指定大小。当Oracle数据库从磁盘加载数据页(如用户使用后从磁盘加载查询结果集数据页)时,它将首先在缓冲池中查找该数据页,如果不存在,则从磁盘加载缓冲区。因此,设置数据库缓冲区的大小可以改善系统性能,减少I/O操作和改善数据库系统的总体效率。
DB_CACHE_SIZE参数的正确设置取决于实际的使用情况,而不是某种固定的大小。如果你的系统频繁读取同一个表或数据页,可以初步考虑设置一个较大的db_cache_size。通常情况下,db_cache_size最好设置为内存池最大大小的一半。
官方英文解释
DB_CACHE_SIZE specifies the size of the DEFAULT buffer pool for buffers with the primary block size (the block size defined by the DB_BLOCK_SIZE initialization parameter).
| Property | Description |
|---|---|
|
Parameter type |
Big integer |
|
Syntax |
|
|
Default value |
If If |
|
Modifiable |
|
|
Modifiable in a PDB |
Yes |
|
Basic |
No |
The value must be at least 4M * number of cpus (smaller values are automatically rounded up to this value). A user-specified value larger than this is rounded up to the nearest granule size. A value of zero is illegal because it is needed for the DEFAULT memory pool of the primary block size, which is the block size for the SYSTEM tablespace.
Note:
This parameter is optional for pluggable databases (PDBs). When this parameter is set for a PDB, it indicates a possible minimum value for the PDB usage of the memory pool.
To be able to use Resource Manager in a CDB to control the amount of memory each PDB can use:
-
The
NONCDB_COMPATIBLEinitialization parameter must be set toFALSEat the CDB level (in the root of the CDB). -
The
MEMORY_TARGETinitialization parameter must not be set at the CDB level. -
If the
SGA_TARGETinitialization parameter is set at the CDB level, then the following requirement must be met:-
The value of
DB_CACHE_SIZEset in a PDB must be less than or equal to 50% of theSGA_TARGETvalue at the CDB level.
-
-
If the
SGA_TARGETinitialization parameter is set at the PDB level, then the following requirement must be met:-
The value of
DB_CACHE_SIZEset in a PDB must be less than or equal to 50% of theSGA_TARGETvalue at the PDB level.
-
-
If the
SGA_TARGETinitialization parameter is not set, but theDB_CACHE_SIZEinitialization parameter is set at the CDB level, then the following requirement must be met:-
The value of
DB_CACHE_SIZEset in a PDB must be less than or equal to 50% of theDB_CACHE_SIZEvalue at the CDB level.
-
When you set DB_CACHE_SIZE in a PDB to a value that does not meet these requirements, you receive an error.
See Also:
-
Oracle Database
Performance Tuning Guide and Oracle Database
Administrator’s Guide for more information on setting this parameter -
Oracle Multitenant
Administrator’s Guide for more information about the initialization parameters that control the memory usage of PDBs