Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Direct I-O Enabling

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Enabling Direct I/O with Kernel Parameters

Oracle recommends that all database files use Direct I/O, which is a disk access method that
bypasses the additional overhead on the OS buffer. One important exception to this rule is the
archived redo log filesystem which should use OS buffer caching. The following information
details the method for ensuring that the OS uses Direct I/O:

Direct I/O for Linux


Direct I/O support is not available and is not supported on Red Hat Enterprise Linux 2.1 and
UnitedLinux. It is available and is supported on Red Hat Enterprise Linux 3 also over NFS, if
the driver being used on the system supports varyio. To enable direct I/O support:
 Set the filesystemio_options parameter in the parameter file to DIRECTIO
(filesystemio_options = DIRECTIO)
 If the asynchronous I/O option is in use, the filesystemio_options parameter in the
parameter file should be set to SETALL.
Also with 10g, this feature is already working which means that is does not require any patch.
For Oracle9i, the DBA will need to download <patch:2448994> - Abstract: DIRECT IO
SUPPORT OVER NFS
Enabling Asynchronous I/O in Oracle 9i and 10g

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> show parameter disk_asynch_io;

NAME TYPE VALUE


------------------------------------ -----------
------------------------------
disk_asynch_io boolean TRUE
SQL>

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 "asynch" in
addition to disk_asynch_io=true:
filesystemio_options=asynch
This parameter is platform-specific. By default, this parameter is set to none for Linux
and thus needs to be changed:
SQL> show parameter filesystemio_options;

NAME TYPE VALUE


------------------------------------ -----------
------------------------------
filesystemio_options string none
SQL>
The filesystemio_options can have the following values with Oracle9iR2:
asynch: This value enables asynchronous I/O on file system files.
directio: This value enables direct I/O on file system files.
setall: This value enables both asynchronous and direct I/O on file system files.
none: This value disables both asynchronous and direct I/O on file system files.

If you also want to enable Direct I/O Support which is available in RHEL 3/4,
set filesystemio_options to "setall".

Ensure that the datafiles reside on filesystems that support asynchronous I/O (e.g.,
OCFS, ext2, ext3).

Asynchronous I/O Support

Note:
On Linux, Automatic Storage Management uses asynchronous I/O by
default. Asynchronous I/O is not supported for database files stored on NFS
file systems.

Oracle Database supports kernel asynchronous I/O. This feature is disabled by default.

By default, the DISK_ASYNCH_IO initialization parameter in the parameter file is set to TRUE
to enable asynchronous I/O on raw devices. To enable asynchronous I/O on file system
files:

1. Ensure that all Oracle Database files are located on file systems that support
asynchronous I/O.
2. Set the FILESYSTEMIO_OPTIONS initialization parameter in the parameter file to one of
the following values:
Linux Distribution Recommended Value
SUSE Linux Enterprise Server 9 SETALL
Other distributions ASYNCH

3.

C.6 Direct I/O Support

Direct I/O support is available and supported on Red Hat Enterprise Linux 3 and SUSE
Linux Enterprise Server 9.

Note:
To use direct I/O on Red Hat Enterprise Linux 3, the driver that you use must support
vary I/O.

On Linux on POWER, you can use direct I/O on Red Hat Linux 4.

To enable direct I/O support:

 Set the FILESYSTEMIO_OPTIONS initialization parameter to DIRECTIO.


 If you are using the asynchronous I/O option, then set
the FILESYSTEMIO_OPTIONS initialization parameter to SETALL.

You might also like