Linux下啟用異步IO


#是否已經安裝了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特性已經使用。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM