2

一次并行进程无法开启的问题分析

 3 years ago
source link: http://www.dboracle.com/archivers/%e4%b8%80%e6%ac%a1%e5%b9%b6%e8%a1%8c%e8%bf%9b%e7%a8%8b%e6%97%a0%e6%b3%95%e5%bc%80%e5%90%af%e7%9a%84%e9%97%ae%e9%a2%98%e5%88%86%e6%9e%90.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Buddy Yuan的个人技术博客

Steve Jobs is a genius and has an impact on many people

一次并行进程无法开启的问题分析

版权声明:本文为Buddy Yuan原创文章,转载请注明出处。原文地址:一次并行进程无法开启的问题分析

最近同事遇到一个问题,RAC中的4个节点,其中3个节点能够正常开并行,而其中一个节点确无法开并行。针对此类问题,我们一般需要打开并行跟踪的trace来分析。

oradebug setmypid
oradebug tracefile_name

alter session set "_px_trace"=high,all;
alter  table xxx parallel xxxx;
select count(*) from xxxx;

oradebug tracefile_name

他根据我发送的命令很快收集了trace文件,根据trace文件我们需要先搜索kxfpgsg关键字。

可以看到这里现我们打开的并行是64个,然后我让他再搜索actual num slaves关键字

这里可以看到一个比较关键的信息,Dop downgraded to 0(reason_code=353),这是一个很关键的信息,并行进程无法开启是因为被降级了,而且降级很彻底直接给你降到了0,我们根据这个信息到mos上搜索了一下。根据文档How to View Why the Degree Of Parallelism (DOP) was Downgraded for an SQL in 12c (Doc ID 2011375.1)中的描述。

  350: 'DOP downgrade due to adaptive DOP'
  351: 'DOP downgrade due to resource manager max DOP'   e.g. max DOP is set for resource group
  352: 'DOP downgrade due to insufficient number of processes'  e.g. value of parallel_max_servers would have been exceeded otherwise
  353: 'DOP downgrade because slaves failed to join'

353说明是并行进程已经达到了最大值,无法分配,难道是现在已经达到最大了吗?我让他检查了一下相关参数,parallel_max_servers当前开启的值是320,通过查询v$pg_sesstat视图可以查看到并行开启的信息。

这里显示确实无法完全开起来,而该节点也没有其它并行操作。该节点参数设置和其他节点是一样的,所以不存在参数问题。那么原因究竟出再哪里?无从排查只能怀疑是并行进程没有释放导致的,只能重启一下节点实例再观察。通过重启实例之后该问题没有再现。

Post a Comment

Your email is never published nor shared. Required fields are marked *

Name *
Email *
Website
Message

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK