Oracle uses asynchronous IO (aio) configuration in Linux

Source: Internet
Author: User
Unlike setting asynchronous IO in RHEL3 described in [Note225751.1], you do not need to set aio-max-size, and

Unlike setting asynchronous IO in RHEL3 described in [Note 225751.1], you do not need to set aio-max-size, and

1. First install the following necessary rpm packages with the root user

# Rpm-Uvh libaio-0.3.106-3.2.x86_64.rpm
# Rpm-Uvh libaio-devel-0.3.106-3.2.x86_64.rpm

2. Supporting asynchronous I/O at the system level
Unlike setting asynchronous IO in RHEL3 described in [Note 225751.1], you do not need to set aio-max-size, and the file does not exist in the '/proc/sys/fs' path. Since 2.6 kernel, I/O size restrictions have been removed [Note 549075.1]. In addition, according to [Note 471846.1], Oracle recommends setting the aio-max-nr value to 1048576 or higher.

# Echo>/proc/sys/fs/aio-max-nr 1048576

3. Enable asynchronous I/O at the database level
First, modify the database parameters. Unlike [Note 225751.1] setting asynchronous IO in RHEL 3, Oracle10gR2 enables support for asynchronous IO by default and does not need to re-compile the database software. In the '$ ORACLE_HOME/rdbms/lib' path, there is no 'skgaioi. o' file. In some cases, Oracle cannot report IO behaviors or events to the operating system [Note 365416.1]. Therefore, you need to perform the following operations.

Change to oracle user

SQL> alter system set disk_asynch_io = TRUE scope = spfile;

SQL> alter system setfilesystemio_options = asynchscope = spfile;

SQL> shutdown immediate
$ Cd $ ORACLE_HOME/rdbms/lib
$ Ln-s/usr/lib/libaio. so.1 skgaio. o
$ Make PL_ORALIBS =-laio-f ins_rdbms.mk async_on
SQL> startup

In Oracle10gR2, AIO is enabled by default. You can use ldd or nm to check whether oracle has enabled AIO support. If the output is enabled.

[Oraprod @ db01 ~] $/Usr/bin/ldd $ ORACLE_HOME/bin/oracle | grep libaio
Libaio. so.1 =>/usr/lib64/libaio. so.1 (0x00002aaaac4a9000)
[Oraprod @ db01 ~] $/Usr/bin/nm $ ORACLE_HOME/bin/oracle | grep io_getevent
W io_getevents @ LIBAIO_0.4

4. Check whether asynchronous I/O is in use
According to [Note 370579.1], you can view the slabinfo statistics to check whether AIO is running in the operating system. slab is a Linux memory distributor and the memory structure related to AIO has been allocated, the second and third columns of the kiocb values are used if they are not 0. Unlike kernel 2.4.x, kiobuf is not displayed because kiobuf has been removed from the kernel since kernel 2.5.43.


$ Cat/proc/slabinfo | grep kio
Kioctx 64 110 384 10 1: tunables 54 27 8: slabdata 11 11 0
Kiocb 13 315 256 15 1: tunables 120 60 8: slabdata 21 21 44

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.