原创作品,出自 “深蓝的blog” 博客,深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/46906847
异步IO之filesystemio_options参数
近日再跟一个老DBA聊天的时候,听说了一个关于异步IO的参数。于是带着些许的好奇,异步I/O也就意味着读写可同时进行。
于是回来查看了一下这个参数,实验了一下。
在未安装oracle的linux服务器查看
Last login: Fri Jun 5 16:09:07 2015 from 10.53.105.3
[root@master ~]# 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
看到kiocb行显示为0,说明异步IO没有启动。
实验前,先到官方文档查一下:
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。
实验:oracle开启异步I/O
环境:oracle11.2.0.4 64bit
[root@xckydb ~]# grep kio /proc/slabinfo
kioctx 23 36 320 12 1 : tunables 54 27 8 : slabdata 3 3 0
kiocb 0 0 256 15 1 : tunables 120 60 8 : slabdata 0 0 0
SQL> show parameter file
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options string none
ifile file
log_file_name_convert string
max_dump_file_size string unlimited
remote_login_passwordfile string EXCLUSIVE
session_max_open_files integer 10
spfile string /u01/app/oracle/product/11.2.0
/db_1/dbs/spfilexcky.ora
standby_file_management string MANUAL
tracefile_identifier string
utl_file_dir string
SQL> alter system set filesystemio_options=setall
2 ;