Oracle 参数 CPU_COUNT 官方解释,作用,如何配置最优化建议
本站中文解释
CPU_COUNT参数决定了Oracle同时可以使用多少个内核来支持并发请求,通过控制Oracle能使用多少资源来支持并发查询,从而提高查询性能,减少假死现象。
正确设置CPU_COUNT:
1、首先,应根据CPU核心数进行设置,一般情况下,CPU_COUNT 的取值等于物理机的CPU核心数。可以通过Linux的文件系统或Windows的Task Manager查看CPU核心数。
2、其次,也可以根据系统的负载情况来进行调整,一般情况下,如果物理机CPU核心数大于数据库需要使用的CPU资源,应将CPU_COUNT减小;如果CPU核心数小于数据库需要使用的CPU资源,应将CPU_COUNT增大。
3、最后,可以根据实际的服务器使用情况来进行调整,如果服务器的其他服务没有使用太多的CPU资源,可以增大CPU_COUNT的数值;反之, 如果服务器的其他服务正在使用大量的CPU资源,则应该减小CPU_COUNT的数值。
官方英文解释
CPU_COUNT
specifies the number of CPUs available for Oracle Database to use.
Property | Description |
---|---|
Parameter type |
Integer |
Default value |
|
Modifiable |
|
Modifiable in a PDB |
Yes |
Range of values |
|
Basic |
No |
Oracle RAC |
The same value should be used on all instances. |
On CPUs with multiple CPU threads, it specifies the total number of available CPU threads. Various components of Oracle Database are configured based on the number of CPUs, such as the Optimizer, Parallel Query, and Resource Manager.
If CPU_COUNT
is set to 0
(its default setting), then Oracle Database continuously monitors the number of CPUs reported by the operating system and uses the current count. If CPU_COUNT
is set to a value other than 0
, then Oracle Database will use this count rather than the actual number of CPUs, thus disabling dynamic CPU reconfiguration.
When Resource Manager is managing CPU (RESOURCE_MANAGER_PLAN
is set), then the database’s CPU utilization is limited to CPU_COUNT
CPU threads. This feature is called Instance Caging. If Resource Manager is enabled at the CDB level, then the PDB’s CPU utilization is limited to the PDB’s CPU_COUNT
.
Note:
Setting CPU_COUNT
to a value greater than the current number of CPUs results in an error. However, if CPU_COUNT
is set to a value greater than the current number of CPUs in the initialization parameter file, then CPU_COUNT
is capped to the current number of CPUs.
Note:
When a value is not explicitly set for CPU_COUNT
, the maximum default value for CPU_COUNT
is 2 for an Oracle ASM Proxy instance, 4 for an Oracle ASM instance, and 8 for an Oracle IOServer instance.
See Also:
-
“CPU_MIN_COUNT”
-
Oracle Database VLDB and
Partitioning Guide for information about howCPU_COUNT
is used to determine the default degree of parallelism for a single instance or Oracle RAC configuration when thePARALLEL
clause is specified but no degree of parallelism is listed -
Oracle Database
Administrator’s Guide for an example of how CPU resources are allocated if you enable instance caging and set a maximum utilization limit in a resource plan