Oracle数据库并行操作,特别是在RAC环境,一定程度上能够提升数据库的性能,所以对相关的初始化参数的了解是必要的,这篇文章将根据实际的案例讨论Oracle数据库的部分并行参数。

Oracle数据库相关的并行参数:

SQL> show parameter parallel

NAME                                TYPE                  VALUE

------------------------------------ ---------------------- --------------------

fast_start_parallel_rollback        string                LOW

parallel_adaptive_multi_user        boolean                TRUE

parallel_automatic_tuning            boolean                FALSE

parallel_degree_limit                string                CPU

parallel_degree_policy              string                MANUAL

parallel_execution_message_size      integer                16384

parallel_force_local                boolean                FALSE

parallel_instance_group              string

parallel_io_cap_enabled              boolean                FALSE

parallel_max_servers                integer                135

parallel_min_percent                integer                0

NAME                                TYPE                  VALUE

------------------------------------ ---------------------- --------------------

parallel_min_servers                integer                0

parallel_min_time_threshold          string                AUTO

parallel_server                      boolean                FALSE

parallel_server_instances            integer                1

parallel_servers_target              integer                64

parallel_threads_per_cpu            integer                2

recovery_parallelism                integer                0

下面是实际Oracle RAC环境下,Oracle并行参数的设置,我们将优先讨论这些参数:

*.parallel_adaptive_multi_user=FALSE

*.parallel_execution_message_size=16384

*.parallel_max_servers=240

*.parallel_min_servers=0

*.parallel_threads_per_cpu=1

PARALLEL_ADAPTIVE_MULTI_USER

Property

Description

Parameter type

Boolean

Default value

true

Modifiable

ALTER SYSTEM

Range of values

true | false

^eBVyq:A E0

PARALLEL_ADAPTIVE_MULTI_USER, when set to true, enables an adaptive algorithm designed to improve performance in multiuser environments that use parallel execution. The algorithm automatically reduces the requested degree of parallelism based on the system load at query startup time. The effective degree of parallelism is based on the default degree of parallelism, or the degree from the table or hints, divided by a reduction factor.ITPUB个人空间T(k k(gsnA2i

当PARALLEL_ADAPTIVE_MULTI_USER参数设置为TRUE,启用设计的适当算法,在多用户环境下使用并行执行提升性能。这个算法基于查询开始时的系统负载自动减少请求的并行度。有效的并行度是基于默认的并行度,或者来自表或HINT的并行度,通过减少系数进行分割。

The algorithm assumes that the system has been tuned for optimal performance in a single-user environment.

9^,{G5s4fCDH1W8g3v0算法假定系统在单用户环境下按照最优性能被调整。

Tables and hints use the default degree of parallelism.ITPUB个人空间G8["q^8VxV2B%Sd

表和HINT使用默认的并行度。

ITPUB个人空间g9G(h7]NJ%U

PARALLEL_MAX_SERVERS

Property

Description

Parameter type

Integer

Default value

PARALLEL_THREADS_PER_CPU * CPU_COUNT * concurrent_parallel_users * 5

Modifiable

ALTER SYSTEM

Range of values

0 to 3600

Oracle RAC

Multiple instances can have different values.

7i(QH&n-O4Q+a0

Note:

This parameter applies to parallel execution in exclusive mode as well as in a Real Application Clusters environment.

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.ITPUB个人空间%Yf?&^RJaa(Jd

PARALLEL_MAX_SERVERS指定实例最大并行执行进程和并行恢复进程数。随着增长需求,Oracle数据库需要增加进程数,从实例启动时创建的数目到增长值。

In the formula, the value assigned to concurrent_parallel_users running at the default degree of parallelism on an instance is dependent on the memory management setting. If automatic memory management is disabled (manual mode), then the value of concurrent_parallel_users is 1. If PGA automatic memory management is enabled, then the value of concurrent_parallel_users is 2. If global memory management or SGA memory target is used in addition to PGA automatic memory management, then the value of concurrent_parallel_users is 4.ITPUB个人空间+nt?)WZ\#lS

根据上面的公式,分配给concurrent_parallel_users的值,运行在实例的默认并行度依赖于内存管理设置。如果禁用自动内存管理(手动模式),那么concurrent_parallel_user的值是1,如果启用PGA自动内存管理,那么concurrent_parallel_users的值是2。如果除了PGA自动内存管理外,还使用了全局内存管理或者SGA内存target,那么concurrent_parallel_users的值是4。

ITPUB个人空间K,S%`+xrP#A7Ey

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.ITPUB个人空间J/bVtZXV]2v

如果设置这个参数过小,那么某些查询在查询过程中可能没有并行执行进程活动。如果设置这个参数过大,那么在峰值期间内存资源可能不足,导致性能下降。

w*v-|[M!E3Q,N^ e0

'r'_ mc8YKI d0

PARALLEL_MIN_SERVERS

Property

Description

Parameter type

Integer

Default value

0

Modifiable

ALTER SYSTEM

Range of values

0 to value of PARALLEL_MAX_SERVERS

Oracle RAC

Multiple instances can have different values.

E*V~BZU B/\Ur0

Note:

This parameter applies to parallel execution in exclusive mode as well as in a Real Application Clusters environment.

PARALLEL_MIN_SERVERS specifies the minimum number of parallel execution processes for the instance. This value is the number of parallel execution processes Oracle creates when the instance is started.

kT?I|z:t7O.O?0PARALLEL_MIN_SERVERS指定实例并行执行进程数的最小值。这个值是实例在启动时,Oracle创建的并行执行进程数。

ITPUB个人空间ir L,A(^7h,`3O0Z1h-m2S

PARALLEL_THREADS_PER_CPU

Property

Description

Parameter type

Integer

Default value

Operating system-dependent, usually 2

Modifiable

ALTER SYSTEM

Range of values

Any nonzero number

ITPUB个人空间{VV0[5H;[3[

Note:

This parameter applies to parallel execution in exclusive mode as well as in a Real Application Clusters environment.

PARALLEL_THREADS_PER_CPU specifies the default degree of parallelism for the instance and determines the parallel adaptive and load balancing algorithms. The parameter describes the number of parallel execution processes or threads that a CPU can handle during parallel execution.ITPUB个人空间bMA0w1IXB"Vh

PARALLEL_THREADS_PER_CPU指定实例默认的并行度,确定合适的并行和负载均衡算法。这个参数描述并行执行进程数,或者在并行执行期间CPU能处理的线程数。

The default is platform-dependent and is adequate in most cases. You should decrease the value of this parameter if the machine appears to be overloaded when a representative parallel query is executed. You should increase the value if the system is I/O bound.

2?0V8C(pRk#M v0默认值依赖于平台,在大多数情况下都是合适的。当执行一个典型的并行查询时,服务器出现过载的情况,应该减少这个参数的值。如果系统在I/O的边界应该增加这个值。

在并行参数方面,有以下最佳实践:

CL ru8i\%@r0

Lk ^)f Uq,D;e0

确保监控活动并行服务器进程的数量并计算要应用于 PARALLEL_MIN_SERVERS 的平均值。可通过以下操作完成:

Select * from v$pq_syssstat;

ITPUB个人空间C%q8|L Vn`

Then: Get/save the value for row "Servers Highwater"

根据您的硬件情况优化PARALLEL_MAX_SERVERS的值。最开始可以使用 (2 * ( 2 个线程 ) *(CPU_COUNT)) = 4 x CPU 计算,然后使用测试数据对更高的值重复测试。

考虑设置FAST_START_PARALLEL_ROLLBACK。此参数可确定将有多少个进程用于事务恢复(在 redo 应用后执行)。为了确保在出现计划外故障后仍能获得高效的工作负载,优化事务恢复显得非常重要。只要系统不大量占用 CPU,最佳实践是将此参数设置为值“HIGH”。这会导致 Oracle 使用四倍于 CPU 个数 (4 X cpu_count) 的并行进程进行事务恢复。此参数的默认值是“LOW”,或两倍的 CPU 计数 (2 X cpu_count)。

对于 11gR2 之前的版本,将PARALLEL_EXECUTION_MESSAGE_SIZE从默认值(通常为 2048)增加到 8192。对于基于数据仓库的系统(通过 PQ 传输大量数据),可以将其设置的更高。在版本 11gR2 中,PARALLEL_EXECUTION_MESSAGE_SIZE的默认值是 16K,经证明,该值在大多数情况下都能够满足要求。

ITPUB个人空间@w-[,{ L$e-lvw9`$u

&J)xF.S.x9]/p0

告警日志:

ITPUB个人空间R+aH1mP;x

在某些数据库启动的时候还能从告警日志的最开始位置看到以下的信息:ITPUB个人空间5G!?])[9Q|&{

Tue May 07 23:38:27 2013

Adjusting the default value of parameter parallel_max_servers

from 1280 to 985 due to the value of parameter processes (1000)

Starting ORACLE instance (normal)ITPUB个人空间9c%k'|2|/^#{^1^

ITPUB个人空间!O%s.b1scG t.CX7U5a

出现此告警的原因是默认计算出的parallel_max_server的值1280超过了process的最大值1000,动态调整到小于process的值。!A*O#L*Y]8p"S3T0ITPUB个人空间'|Lz.BKO

zw ncR3]^m0--end--

oracle adjusting parallel,Oracle 并行相关的初始化参数相关推荐

  1. oracle adjusting parallel,Oracle 参数之_undo_autotune

    Oracle 10g及后续版本较以前版本有一新特性即自动调整undo retention时间,大大简便了管理,对于自动扩展(autoextend on)的undo表空间,参数undo_retentio ...

  2. oracle启用amm,Oracle11g自动内存管理(AMM)相关的初始化参数

    ORACLE对内存的管理越来越趋向智能化.自动化,从9i通过PGA_AGGREGATE_TARGET参数实现PGA的自动管理,10g通过Automatic Shared Memory Manageme ...

  3. oracle内存管理模式amm,Oracle 11g自动内存管理(AMM)相关的初始化参数

    Oracle对内存的管理越来越趋向智能化.自动化,从9i通过PGA_AGGREGATE_TARGET参数实现PGA的自动管理,10g通过Automatic Shared Memory Manageme ...

  4. sap oracle 内存参数,ORACLE 25个需要深思熟虑重要的初始化参数

    此内容摘自 ORACLE 11gR2性能调整与优化一书,做为一个自己的笔记 1 MEMORY_TARGET : 这个初始化参数设定分配给PGA和SGA 的所有内存(11g 新参数).设置了MEMORY ...

  5. Oracle Data Gurad Physical Standby 相关说明

    Oracle Data Guard, 分逻辑Standby和物理Standby. 下面讲的是物理Standby 环境的搭建步骤. 有关Data Guard的一些概念性的理论知识,请参考我的blog,  ...

  6. Oracle 初始化参数文件pfile和spfile

    pfile和spfile差额 pfile :Oracle 9i之前.ORACLE使用我们一直PFILE存储的初始化参数,,能够在操作系统级别改动. 当spfile文件改动出现错误导致oracle无法启 ...

  7. Oracle学习笔记 --- Oracle ORA错误解决方案

    今天在Debug的时候报错了如下信息: 后来综合了网上的东西,总结如下: ORA-00001: 违反唯一约束条件 (.) 错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常. ORA-000 ...

  8. oracle会话资源,oracle session 会话

    管理Oracle Session是后台DBMS采用Oracle的信息管理系统的一个重要工作.如果管理不当,会对系统的性能和运行的稳定性产生非常大的影响.Oracle Session是非常宝贵的资源,其 ...

  9. t oracle删除吗,Oracle 11g 手工建库与删库

    Oracle 11g 手工建库与删库 在前一篇文章中提到阅读Oracle 11gR2 Administrator's Guide(文档编号E25494-01)时,简单描述了DDL_LOCK_TIMEO ...

最新文章

  1. python登录验证码(基于django框架)
  2. 归并排序(Merge_Sort)
  3. emwin 使用外部字库_整6个月的等待,ST终于可以免费使用ThreadX全家桶了
  4. perl中的map和grep
  5. 迅雷精简版 Mac中文版
  6. GoLand每次切换,光标跑到行首
  7. 硬盘(IDE硬盘与SCSI硬盘)在Linux标识的命名规则
  8. 记录下我磕磕碰碰的三个月找工作经历,完整PDF
  9. Comet OJ - 2019国庆欢乐赛 D1 入学考试 (简单版)
  10. 【Grace卫星】Grace卫星精度知识点。
  11. linux实验二文件与文件夹操作
  12. Oracle 恢复删除数据
  13. 优秀自我简介200字_自我介绍范文200字10篇
  14. java读取word的插件,java word 插件
  15. vue element计算表格合计问题
  16. 智能优化算法应用:基于麻雀搜索算法的工程优化案例
  17. telnet命令 测试服务器指定端口通不通
  18. android maxlength 代码设置,如何在代码中获取EditText maxLength设置
  19. IDEA debug下调试Evaluate
  20. java 创建和读取Excel表单

热门文章

  1. 17大主链均狂跌国内项目却看涨, 本周不可不知的7组榜单 | 数据周榜
  2. 苹果新一代 AirPods 能活过两年吗?
  3. 假期怎么提升 Python 技能?100+ 编程题给你练~(附答案)
  4. 年货怎么到家早?华为云+AI 告诉你!
  5. java 分级显示_上级部门与下级部门的分类显示
  6. 字节跳动面试:java软件工程师简历项目经验
  7. SpringBoot:javalist和set区别
  8. jpa原生query_Spring Data Jpa @Query原生SQL
  9. http后面的双斜杠被转义_【实用干货】双荧光素酶报告基因检测
  10. html静态页面跳转传值,在静态页面html中跳转传值