Document directory
- This article from: http://rq2-79.iteye.com/blog/805899
This article from: http://rq2-79.iteye.com/blog/805899
Thanks to the original author
How does oracle10gr2 enable asynchronous IO in RHEL 5?
Document category: Database
Asynchronous I/O Optimization
Point: asynchronous I/O is compared with synchronous I/O. If synchronous I/O is used, the application must wait when an I/O operation is executed, until the I/O execution is complete. On the contrary, asynchronous I/O operations
Running in the background, I/O operations and applications can run at the same time, improving the system performance. Using asynchronous I/O increases the I/O traffic. If the application operates on bare devices, this advantage is more obvious,
Therefore, applications such as databases and file servers often use asynchronous I/O to execute multiple I/O operations at the same time.
Some time ago also in the company's server tossing, but found the document corresponding platform is oracle9ir2 in RHEL 3, Aix, HP-UNIX, testing half a day failed. I found several documents on my Oracle support today and finally understood the problem.
Platform: Redhat Enterprise Linux 5 64bit, Oracle 10gr2 10.2.0.4 64bit
1. First install the following necessary RPM packages with the root user
# Rpm-uvh libaio-0.3.106-3.2.i386.rpm
# Rpm-uvh libaio-0.3.106-3.2.x86_64.rpm
# Rpm-uvh libaio-devel-0.3.106-3.2.i386.rpm
# Rpm-uvh libaio-devel-0.3.106-3.2.x86_64.rpm
2. Supporting asynchronous I/O at the system level
And[Note 225751.1]
The asynchronous Io setting in RHEL 3 is different. You do not need to set AIO-max-size, and this file is not available in the '/proc/sys/fs' path. The IO size limit has been removed since 2.6 kernel.[Note 549075.1]
. In addition, according[Note 471846.1]
In Oracle, we recommend that you set 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. And [Note 225751.1]
In RHEL
3. the asynchronous Io settings are different. oracle10gr2 enables support for asynchronous Io by default and does not need to re-compile the database software. In '$ ORACLE_HOME/rdbms
/Lib 'path, and 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 must perform the following operations.
SQL> alter system set disk_asynch_io = true scope = spfile;
SQL> alter system set filesystemio_options = asynch scope = 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[Note 370579.1]
, You can viewSlabinfo
Unified
Check whether AIO is running in the operating system. slab is the Linux memory distributor and the memory structure related to AIO has been allocated. The second and third columns of 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
$