Oracle 参数 PARALLEL_MAX_SERVERS 官方解释,作用,如何配置最优化建议
本站中文解释
参数
PARALLEL_MAX_SERVERS参数是控制数据库在并行查询的情况下,同时使用的最大并发进程数目。
它与另外一个参数PARALLEL_MIN_SERVERS决定了当数据库遇到并行查询时,在内存中能同时使用多少“进程”(oracle中称为会话)。
设置PARALLEL_MAX_SERVERS参数时需要注意以下几点:
1、要根据服务器硬件配置实际情况来设置 parall_max_servers 参数,保证数据库能更好地利用全部系统资源,在并行查询时能够发挥出最大性能,也要安全地考虑服务器的最大负荷量。
2、如果操作系统的硬件配置支持,在parall_max_servers参数设置的值越大,在并行查询时越容易发挥出最大性能,但会牺牲掉其他操作系统资源。
3、一般来说,设置parall_max_servers可以小于操作系统的处理器数量,但也不要设置的太小,尤其并行查询的任务越多的情况下,它的参数设置需要做出相应的调整。
4、通常情况下,如果DBMS_PARALLEL_EXECUION频繁使用,可以先将PARALLEL_MAX_SERVERS的设置值增大,否则系统的查询效率可能会受到影响。
当完成合理设置以后,还要不断地监控和调整PARALLEL_MAX_SERVERS参数,以便让数据库更加有效地使用硬件资源,从而发挥出最大的性能。
官方英文解释
PARALLEL_MAX_SERVERS
specifies the maximum number of parallel execution processes and parallel recovery processes for an instance. As demand increases, Oracle Database increases the number of processes from the number created at instance startup up to this value.
Property | Description |
---|---|
Parameter type |
Integer |
Default value |
|
Modifiable |
|
Modifiable in a PDB |
Yes |
Range of values |
|
Basic |
No |
Oracle RAC |
Multiple instances can have different values. |
Note:
This parameter applies to parallel execution in exclusive mode as well as in a Real Application Clusters environment.
The number of concurrent parallel users running at default degree of parallelism on an instance depends on the memory initialization parameter settings for the instance. For example, if the MEMORY_TARGET
or SGA_TARGET
initialization parameter is set, then the number of concurrent_parallel_users
= 4
. If neither MEMORY_TARGET
or SGA_TARGET
is set, then PGA_AGGREGATE_TARGET
is examined. If a value is set for PGA_AGGREGATE_TARGET
, then concurrent_parallel_users
= 2
. If a value is not set for PGA_AGGREGATE_TARGET
, then concurrent_parallel_users
= 1
.
The database system always reserves a certain number of reserved processes. Therefore, the following two values are taken into account when setting the PARALLEL_MAX_SERVERS
initialization parameter:
-
The default value of
PARALLEL_MAX_SERVERS
determined using the calculation in the table above -
The value of the
PROCESSES
initialization parameter minus the number of reserved processes
The lower of the two values is used as the default value of PARALLEL_MAX_SERVERS
, and if you attempt to explicitly set PARALLEL_MAX_SERVERS
to a value that is higher than either of the values, then the setting is adjusted to the lower of the two values.
When the PARALLEL_MAX_SERVERS
parameter is set to a value lower than the value in the table above, the lower default value enables the database to start service processes and allows user processes to connect to the database.
The default value for PARALLEL_MAX_SERVERS
for a PDB is determined using the calculation in the table above with the PDB’s CPU_COUNT
value.
Note:
If you set this parameter too low, then some queries may not have a parallel execution process available to them during query processing. If you set it too high, then memory resource shortages may occur during peak periods, which can degrade performance.
See Also:
Oracle Database SQL Tuning
Guide for more information about parallel execution