Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

AIO of Oracle (Asynchronous io)

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Linux Asynchronous I AIO is an enhanced feature provided in the Linux kernel. It is a standard feature of the Linux 2.6 kernel, and the basic idea behind AIO is to allow processes to initiate a lot of I cando O operations without blocking or waiting for anything to complete. Later or when the process receives a notification that the Ibig O operation is complete, the process can retrieve the results of the Ibig O operation.

Synchronous IO: the thread starts an IO operation and then immediately enters the waiting state until the IO operation is completed before waking up to continue execution.

Asynchronous IO: the thread sends an IO request to the kernel and then continues to deal with other things. After the kernel completes the IO request, it will notify the thread that the IO operation is complete.

Add: when the background wait event ranks first is db file async I submit O submit, which is an asynchronous IO related wait event, you can consider turning on asynchronous io.

1.-- check to see if the system uses asynchronous IO. Slab is the memory allocator for Linux, and the memory structure associated with AIO has 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

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

2. Check whether asynchronous io is enabled in the database.

(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

Four values for filesystemio_options:

ASYNCH: enable asynchronous I/O on file system files, which has no timing requirement for transmission.

Enable asynchronous Ihop O on file system files, and there is no timing requirement for data transfer.

DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.

Enable direct buffer cache O on the file system file, bypassing it.

SETALL: enable both asynchronous and direct I/O on file system files.

Enable async and direct Igamo on file system files.

NONE: disable both asynchronous and direct I/O on file system files.

Disables async and direct Igamo on file system files.

3. Oracle has linked aio's package.

[oracle@localhost ~] $/ usr/bin/ldd $ORACLE_HOME/bin/oracle | grep libaio

Libaio.so.1 = > / lib64/libaio.so.1 (0x0000003e13000000)

Description: check the package that shows that oracle has linked to aio

4. Adjust the database parameters to enable aio

The filesystemio_options parameter in the database is set to none, and it seems that asynchronous IO is not configured in oracle.

Here you can 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

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 160

Kiocb 16 30 256 15 1: tunables 120 60 8: slabdata 2 2 1

6. Check whether asynchronous io is enabled at the database level.

Select name, asynch_io

From v$datafile f, v$iostat_file i

Where f.file# = i.file_no

And (filetype_name = 'Data File' or filetype_name =' Temp File')

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report