Oracle 11g等待事件:db file async I/O submit
Oracle 11g等待事件:db file async I/O submit
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
有时候出现后台等待事件:db file async I/O submit
该等待跟oracle的异步io有关。
与oracle异步io相关的参数有2个:
SQL> show parameter filesystem
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
filesystemio_options string none
SQL> show parameter disk_asynch
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
disk_asynch_io boolean TRUE
disk_asynch_io 这个参数默认是true,,但是filesystemio_options默认是none。这种情况会出现db file async I/O submit等待事件。
如果不想这个等待事件出现,可以采取两种方法:
1:alter system set disk_asynch_io=false scope=spfile; 关闭异步io
2:alter system set filesystemio_options=asynch scope=spfile;
如果想开启oracle的异步io,除了设置上面的两个参数为true和asynch以外,还得操作系统支持异步io才行。
检查linux是否允许异步io:
另一个是:trace –p
做dbwr进程的跟踪,如果操作是pwrite,那么是同步io,如果是io_getevents,那么是异步io。
下面是参数的解释:
FILESYSTEMIO_OPTIONS可以设置的值如下:
ASYNCH: enable asynchronous I/O on file system files, which has no timing requirement for transmission.
DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.
SETALL: enable both asynchronous and direct I/O on file system files.
NONE: disable both asynchronous and direct I/O on file system files.
看下面的表格就一目了然了:
disk_asynch_io filesystemio_options strace DBWR AIO DBWR waits
FALSE NONE pwrite64 NO db file parallel write
FALSE ASYNCH pwrite64 NO db file parallel write
TRUE ASYNCH io_submit/io_getevents YES db file parallel write
TRUE NONE pwrite64 NO db file async I/O submit
另外,如果disk_asynch_io=false 的话,可以设置参数dbwr_io_slaves为一个大于0的值来模仿异步io
查看数据库中文件的异步io情况:
SQL> select file_no,filetype_name,asynch_io from v$iostat_file;
FILE_NO FILETYPE_NAME ASYNCH_IO
---------- ---------------------------- ---------
0 Other ASYNC_OFF
0 Control File ASYNC_OFF
0 Log File ASYNC_OFF
0 Archive Log ASYNC_OFF
0 Data File Backup ASYNC_OFF
0 Data File Incremental Backup ASYNC_OFF
0 Archive Log Backup ASYNC_OFF
0 Data File Copy ASYNC_OFF
0 Flashback Log ASYNC_OFF
0 Data Pump Dump File ASYNC_OFF
1 Data File ASYNC_OFF
2 Data File ASYNC_OFF
3 Data File ASYNC_OFF
4 Data File ASYNC_OFF
5 Data File ASYNC_OFF
6 Data File ASYNC_OFF
16 rows selected.
推荐阅读:
Linux上Oracle 11g安装步骤图文详解
Linux操作系统中Oracle 11g数据库安装过程图文详解
CentOS 5.6 上安装 Oracle 11g R2 单实例数据库详解
Oracle VM虚拟机中安装Oracle Clusterware 11g步骤
VM虚拟机下在Linux上安装Oracle 11G单实例数据库

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)
