Home > Database > Mysql Tutorial > body text

AIO analysis in Oracle

一个新手
Release: 2017-09-08 10:50:42
Original
1173 people have browsed it

Linux Asynchronous I/O (AIO) is an enhanced feature provided in the Linux kernel. It is a standard feature of the Linux 2.6 kernel. The basic idea behind AIO is to allow a process to initiate many I/O operations without blocking or waiting for any operation to complete. The process can retrieve the results of the I/O operation later or when it is notified that the I/O operation is complete.

Synchronous IO: The thread starts an IO operation and then immediately enters the waiting state, and does not wake up until the IO operation is completed to continue execution.
Asynchronous IO: The thread sends an IO request to the kernel, and then continues to process other things. After the kernel completes the IO request, it will notify the thread that the IO operation is completed

1.--Check whether the system uses asynchronous IO . Slab is the Linux memory allocator, and AIO-related memory structures have been allocated.

more /proc/slabinfo |grep kio
[root@localhost ~]# grep kio /proc/slabinfo
kioctx 0 0 384 10 1 : tunables 54 27 0 : slabdata 0 0 0
kiocb 0 0 256 15 1 : tunables 120 60 0 : slabdata 0 0 0
Copy after login

See that the kiocb line displays 0, indicating that asynchronous IO is not started.

2. Check whether the database has asynchronous io enabled

(11G)SYS@qixindb> show parameter disk_asynch_io
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
disk_asynch_io boolean TRUE
(11G)SYS@qixindb> show parameter filesystem
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options string none
Copy after login
filesystemio_options 的四种值:
ASYNCH: enable asynchronous I/O on file system files, which has no timing requirement for transmission.
在文件系统文件上启用异步I/O,在数据传送上没有计时要求。
DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.
在文件系统文件上启用直接I/O,绕过buffer cache。
SETALL: enable both asynchronous and direct I/O on file system files.
在文件系统文件上启用异步和直接I/O。
NONE: disable both asynchronous and direct I/O on file system files.
在文件系统文件上禁用异步和直接I/O。
Copy after login

3. Oracle has linked the aio package

[oracle@localhost ~]$ /usr/bin/ldd $ORACLE_HOME/bin/oracle | grep libaio
libaio.so.1 => /lib64/libaio.so.1 (0x0000003e13000000)
Copy after login

Instructions: Check the display Oracle has linked the aio package

4. Adjust the database parameters to enable aio
The filesystemio_options parameter in the database is set to none. It seems that asynchronous IO is not configured in oracle.
It can be done here Adjust the filesystemio_options parameter in the database to setall;

SQL> alter system set filesystemio_options = setall scope=spfile; 
SQL> alter system set disk_asynch_io = true scope=spfile; 
SQL> shutdown immediate;
SQL> startup;
Copy after login

5. Check whether aio is effective

[oracle@localhost ~]$ more /proc/slabinfo |grep kio
kioctx 130 160 384 10 1 : tunables 54 27 8 : slabdata 16 16 0
kiocb 16 30 256 15 1 : tunables 120 60 8 : slabdata 2 2 1
Copy after login

Supplement: When free buffer waits waiting events occur or io is not strong, you can consider Turn on aio.

The above is the detailed content of AIO analysis in Oracle. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!