{"id":106,"date":"2009-11-24T20:46:00","date_gmt":"2009-11-24T22:46:00","guid":{"rendered":"http:\/\/www.soudba.com.br\/?p=106"},"modified":"2009-11-24T20:46:00","modified_gmt":"2009-11-24T22:46:00","slug":"enabling-asynchronous-i-o-in-oracle-9i-and-10g","status":"publish","type":"post","link":"https:\/\/www.soudba.com.br\/?p=106","title":{"rendered":"Enabling Asynchronous I\/O in Oracle 9i and 10g"},"content":{"rendered":"<p>To enable async I\/O in Oracle, the disk_asynch_io parameter needs to be set to true:<\/p>\n<p>disk_asynch_io=true<\/p>\n<p>Note this parameter is set to true by default in Oracle 9i and 10g:<\/p>\n<p>SQL&gt; show parameter disk_asynch_io;<\/p>\n<p>NAME                                 TYPE        VALUE<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>disk_asynch_io                       boolean     TRUE<br \/>SQL&gt;<\/p>\n<p>If you use filesystems instead of raw devices, block devices (available in 10gR2) or ASM for datafiles, then you need to ensure that the datafiles reside on filesystems that support asynchronous I\/O (e.g., OCFS\/OCFS2, ext2, ext3). To do async I\/O on filesystems the filesystemio_options parameter needs to be set to &#8220;asynch&#8221; in addition to disk_asynch_io=true:<\/p>\n<p>filesystemio_options=asynch<\/p>\n<p>This parameter is platform-specific. By default, this parameter is set to none for Linux and thus needs to be changed:<\/p>\n<p>SQL&gt; show parameter filesystemio_options;<\/p>\n<p>NAME                                 TYPE        VALUE<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>filesystemio_options                 string      none<br \/>SQL&gt;<\/p>\n<p>The filesystemio_options can have the following values with Oracle9iR2:<br \/>   asynch: This value enables asynchronous I\/O on file system files.<br \/>   directio: This value enables direct I\/O on file system files.<br \/>   setall: This value enables both asynchronous and direct I\/O on file system files.<br \/>   none: This value disables both asynchronous and direct I\/O on file system files.<\/p>\n<p>If you also want to enable Direct I\/O Support which is available in RHEL 3\/4, set filesystemio_options to &#8220;setall&#8221;.<\/p>\n<p>Ensure that the datafiles reside on filesystems that support asynchronous I\/O (e.g., OCFS, ext2, ext3).<\/p>\n<p>Tuning Asynchronous I\/O for Oracle 9i and 10g<\/p>\n<p>For RHEL 3 it is recommended to set aio-max-size to 1048576 since Oracle uses I\/Os of up to 1MB. It controls the maximum I\/O size for asynchronous I\/Os. Note this tuning parameter is not applicable to 2.6 kernel, i.e RHEL 4.<\/p>\n<p>To determine the maximum I\/O size in bytes, execute:<\/p>\n<p>$ cat \/proc\/sys\/fs\/aio-max-size<br \/>131072<\/p>\n<p>To change the maximum number of bytes without reboot:<\/p>\n<p># echo 1048576 &gt; \/proc\/sys\/fs\/aio-max-size<\/p>\n<p>Alternatively, you can use sysctl(8) to change it:<\/p>\n<p># sysctl -w fs.aio-max-size=1048576<\/p>\n<p>To make the change permanent, add the following line to the \/etc\/sysctl.conf file. This file is used during the boot process:<\/p>\n<p>$ echo &#8220;fs.aio-max-size=1048576&#8221; &gt;&gt; \/etc\/sysctl.conf<\/p>\n<p>Checking Asynchronous I\/O Usage<\/p>\n<p>To verify whether $ORACLE_HOME\/bin\/oracle was linked with async I\/O, you can use the Linux commands ldd and nm.<\/p>\n<p>In the following example, $ORACLE_HOME\/bin\/oracle was relinked with async I\/O:<\/p>\n<p>$ ldd $ORACLE_HOME\/bin\/oracle | grep libaio<br \/>        libaio.so.1 =&gt; \/usr\/lib\/libaio.so.1 (0x0093d000)<br \/>$ nm $ORACLE_HOME\/bin\/oracle | grep io_getevent<br \/>         w io_getevents@@LIBAIO_0.1<br \/>$<\/p>\n<p>In the following example, $ORACLE_HOME\/bin\/oracle has NOT been relinked with async I\/O:<\/p>\n<p>$ ldd $ORACLE_HOME\/bin\/oracle | grep libaio<br \/>$ nm $ORACLE_HOME\/bin\/oracle | grep io_getevent<br \/>         w io_getevents<br \/>$<\/p>\n<p>Referencia:<\/p>\n<p>http:\/\/www.puschitz.com\/TuningLinuxForOracle.shtml<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To enable async I\/O in Oracle, the disk_asynch_io parameter needs to be set to true: disk_asynch_io=true Note this parameter is set to true by default in Oracle 9i and 10g: SQL&gt; show parameter disk_asynch_io; NAME TYPE VALUE&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;disk_asynch_io boolean &hellip; <a href=\"https:\/\/www.soudba.com.br\/?p=106\">Continue lendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49,81,107],"tags":[],"class_list":["post-106","post","type-post","status-publish","format-standard","hentry","category-como-verificar-se-o-oracle-esta-em-modo-async","category-disk_asynch_io","category-filesystemio_options"],"_links":{"self":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=106"}],"version-history":[{"count":0,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts\/106\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}