db file async I/O submit等待事件

本文介绍如何解决Oracle数据库中出现的dbfileasyncI/Osubmit等待事件问题,通过调整参数disk_asynch_io和filesystemio_options来优化数据库性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SYS@sinitek>select event,count(*) from v$session_wait group by event;

EVENT                                                              COUNT(*)
---------------------------------------------------------------- ----------
SQL*Net message from client                                              70
log file sync                                                             3
wait for a undo record                                                    1
db file async I/O submit                                                  2
rdbms ipc message                                                        10
db file sequential read                                                  12
pmon timer                                                                1
wait for stopper event to be increased                                    1
Streams AQ: qmn slave idle wait                                           1
log file parallel write                                                   1
Space Manager: slave idle wait                                            1

EVENT                                                              COUNT(*)
---------------------------------------------------------------- ----------
SQL*Net message to client                                                 1
Streams AQ: qmn coordinator idle wait                                     1
Streams AQ: waiting for time management or cleanup tasks                  1
VKTM Logical Idle Wait                                                    1
direct path read                                                          1
DIAG idle wait                                                            2


发现其中有db file async I/O submit 等待时间

这个事件产生的原因:

在11g数据库中,默认的异步I/O是打开的

SYS@sinitek>show parameter disk

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string
asm_diskstring                       string
disk_asynch_io                       boolean     TRUE

但是实际filesystemio_options并没有设置

SYS@sinitek>show parameter filesystem

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options                 string      none


我们可以关闭异步I/O 或者启动filesystemio_options两种方法来消除这个等待时间

SYS@sinitek>alter system set disk_asynch_io =false   scope=spfile;

or

SYS@sinitek>alter system set filesystemio_options =asynch scope=spfile;
[oracle@db ~]$ cat /proc/slabinfo | grep kio
kioctx                26     40    192   20    1 : tunables  120   60    8 : slabdata      2      2      0
kiocb                  8     30    128   30    1 : tunables  120   60    8 : slabdata      1      1      0

可以通过以上命令看是否启用了异步I/O 如果kiocb中有值,就证明启用了异步I/O

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值