#是否已经安装了AIO包
#rpm -qa|grep aio
libaio-0.3.107-10.el6.x86_64
libaio-devel-0.3.107-10.el6.x86_64
libsane-hpaio-3.12.4-4.el6_4.1.x86_64
#数据库在链接时是否已经加载了aio的包
$/usr/bin/ldd $ORACLE_HOME/bin/oracle | grep libaio
libaio.so.1 => /lib64/libaio.so.1 (0x00000032e6800000)
如果没有看到libaio的包,说明Oracle没有链接aio,那么这时就需要重新make oracle的可执行文件,10g以后的方法为
make PL_ORALIBS=-laio -f ins_rdbms.mk async_on
#数据库的初始化参数开启了异步IO
SQL> show parameter disk_asynch_io
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
disk_asynch_io boolean TRUE
SQL> show parameter filesystemio_options
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options string SETALL
filesystemio_options有4个选项
ASYNCH enable asynchronous I/O on file system files, which has no timing requirement for transmission.
DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.
SETALL: enable both asynchronous and direct I/O on file system files.
NONE: disable both asynchronous and direct I/O on file system files.
#修改内核参数文件/etc/sysctl.conf
fs.aio-max-nr = 1048576
#确认异步IO特性已经使用
#cat /proc/slabinfo | grep kio
kioctx 8338 8380 384 10 1 : tunables 54 27 8 : slabdata 838 838 1
kiocb 1377 1665 256 15 1 : tunables 120 60 8 : slabdata 111 111 344
kiocb的第二、三列都不为0,表示ORACLE的异步IO特性已经使用。
来源:https://www.cnblogs.com/niyuelong/p/10223806.html