oracle 异步io 慢,Oracle数据库异步IO导致查询响应缓慢

客户的环境是两台HP-UX ia64 B.11.31部署的一套Oracle 11.2.0.4.4 RAC Database,存储是一套EMC,一套HDS,通过赛门铁克storage foundation将两套存储做成镜像,实现节点之间的共享存储。前期只有一套HDS在使用,在将EMC加入到storage foundation之后,RAC的第一个节点出现查询操作缓慢的情况,包括sqlplus本地登陆缓慢,查询只有两条数据的临时表耗时12秒,数据库实例启动也非常的慢。

最终该问题通过检查等待事件的方式得以解决,下面简单描述一下处理过程:

会话1:

在服务器本地使用sqlplus登陆数据库实例,

1).执行下面的SQL语句确定本会话的SID:

SQL> SELECT DISTINCT SID FROM V$MYSTAT;

2).执行查询2条数据的临时表(固定耗时12秒)。

会话2:

在服务器本地使用sqlplus登陆数据库实例,

执行下面的SQL语句,查询会话1在查询2条数据的临时表时发生的等待事件:

SQL> set linesize 200

SQL> set pagesize 200

SQL> col program format a30

SQL> col machine format a30

SQL> col wait_class format a30

SQL> select username,program,machine,event,wait_class from v$session where wait_class <>'Idle' and sid=572

USERNAME                      PROGRAM                        MACHINE                        EVENT                                                            WAIT_CLASS

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

SYS                            sqlplus@rx9900a (TNS V1-V3)    rx9900a                        asynch descriptor resize                                        Other

该等待事件的WAIT_CLASS为Other,比较异常,从EVENT可以大概了解该等待和异步IO有一定的关系,通过在MOS上检索该EVENT找到如下一篇文章:

Bug 9829397  Excessive CPU and many "asynch descriptor resize" waits for SQL using Async IO

This note gives a brief overview of bug 9829397.

The content was last updated on: 28-JUN-2013

Click here for details of each of the sections below.

Affects:

Product (Component)

Oracle Server (Rdbms)

Range of versionsbelievedto be affected

Versions >= 11.2 but BELOW 12.1

Versionsconfirmedas being affected

Platforms affected

Generic (all / most platforms affected)

It is believed to be a regression in default behaviour thus:

Regression introduced in 11.2.0.2

Fixed:

Description

Some queries in 11.2 may exhibit higher CPU usage than earlier

releases with many "asynch descriptor resize" waits occurring

compared to the same SQL in earlier releases.

Rediscovery Notes:

Async IO is in use.

The total time waiting for "asynch descriptor resize" is

typically very small but with very high counts. The high

wait count indicates many resizes of the number of AIO

descriptors unnecessarily wasting CPU.

Workaround Disable async IO.

eg: Set DISK_ASYNCH_IO = false <<<< 禁用异步IO

References:

For more information about "asynch descriptor resize" see the following: Note:1273748.1 High Numbers of 'asynch descriptor resize' waits Note:1081977.1 Details of the "asynch descriptor resize" wait event.

Getting a Fix Use one of the "Fixed" versions listed above (for Patch Sets / bundles use the latest version available as

contents are cumulative - the "Fixed" version listed above is

the first version where the fix is included) or Click here for suggestions on how to get a fix for this issue

Please note:The above is a summary description only. Actual symptoms can vary. Matching to any symptoms here does not confirm that you are encountering this problem. For questions about this bug please consult Oracle Support.

References

Bug:9829397(This link will only work for PUBLISHED bugs)

Note:245840.1Information on the sections in this article

从文章可以看出该问题可能是个bug,通过在数据库实例关闭异步IO即可解决问题,根据文章执行如下的操作:

SQL> show parameter io

NAME                                TYPE        VALUE

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

......

disk_asynch_io                      boolean    TRUE

......

SQL> alter system set disk_asynch_io=false scope=spfile sid='scrk1';

System altered.

重启RAC第一个节点数据库实例之后问题即得到解决。

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值