Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2339818
  • 博文数量: 2110
  • 博客积分: 18861
  • 博客等级: 上将
  • 技术积分: 24420
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-05 18:23
文章分类

全部博文(2110)

文章存档

2011年(139)

2010年(1971)

我的朋友

分类: Oracle

2010-08-23 13:30:18

 

  在并行执行的情况下偶然会发现PX qref latch等待事件,当系统高峰期同时采用了高并发的情况下最容易出现。看来要进行特殊照顾了。

  概念和原理

  在并行执行环境中,query slaves 和query coordinator之间是通过队列交换数据和信息的。PX qref latch 是用来保护这些队列的。

  PX qref latch 等待事件的出现一般表明信息的发送比接受快,这时需要调整buffer size(可以通过parallel_execution_message_size参数调整)。

  但是有些情况下也是难以避免发生这种情况的,比如consumer需要长时间的等待数据的处理,原因在于需要返回大批量的数据包,这种情况下很正常。

  调整和措施

  当系统的负载比较高时,需要把并行度降低;如果使用的是默认并行度,可以通过减小parallel_thread_per_cpu参数的值来达到效果。

  DEFAULT degree = PARALLEL_THREADS_PER_CPU * #CPU's

  优化parallel_execution_message_size参数

  Tuning parallel_execution_message_size is a tradeoff between

  performance and memory. For parallel query, the connection

  topology between slaves and QC requires (n^2 + 2n) connections

  (where n is the DOP not the actual number of slaves) at maximum.

  If each connection has 3 buffers associated with it then you can

  very quickly get into high memory consumption on large machines

  doing high DOP queries.

阅读(398) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~