博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[20171117]参数filesystemio_options.txt
阅读量:6375 次
发布时间:2019-06-23

本文共 6845 字,大约阅读时间需要 22 分钟。

[20171117]参数filesystemio_options.txt

--//前几天看别人的awr报表发现设置参数filesystemio_options=setall,问为什么?对方给出一个链接,某某人都是这样设置的,

--//自己很无语,我希望对方能提出自己的见解.

--//首先给出oracle官方的解析:

9.1.1.2 FILESYSTEMIO_OPTIONS Initialization Parameter

You can use the FILESYSTEMIO_OPTIONS initialization parameter to enable or disable asynchronous I/O or direct I/O on

file system files. This parameter is platform-specific and has a default value that is best for a particular platform.

FILESYTEMIO_OPTIONS can be set to one of the following values:

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.

--//我以前在学习时也测试过这个参数,因为对于os没有相关的命令了解某个文件的缓存情况,我仅仅在dg上测试,因为没有负载很难了解

--//该参数的设置的效果,仅仅在生产系统遇到一个存储的问题,获得一个小工具nocache,一下子茅舍顿开.
--//参考链接:

--//首先在讲解之前,我仅仅说明数据库采用文件系统的模式,ASM不在讨论范围.先讲讲我以前遇到的问题.

1.对于内存盘,不能设置FILESYSTEMIO_OPTIONS=setall,directio.

--//我的测试环境是建立在ramdisk上的,方法可以参考链接http://blog.itpub.net/267265/viewspace-1283884/

# mount | column -t | grep tmpfs

tmpfs              on  /dev/shm                  type  tmpfs        (rw)
tmpfs              on  /mnt/ramdisk              type  tmpfs        (rw,size=8G)

--//当然如果重启机器,测试数据库就消失了,不过因为是测试,我保留一个冷备份在磁盘中.直接拷贝就ok了.

# find /mnt/ramdisk/book -name "*.*" -print0  | xargs -0 -I{} cachestats {}

/mnt/ramdisk/book/sysaux01.dbf           pages in cache: 240642/240642 (100.0%)  [filesize=962568.0K, pagesize=4K]
/mnt/ramdisk/book/tea01.dbf              pages in cache: 10242/10242 (100.0%)  [filesize=40968.0K, pagesize=4K]
/mnt/ramdisk/book/redo03.log             pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redo02.log             pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redo01.log             pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/users01.dbf            pages in cache: 65538/65538 (100.0%)  [filesize=262152.0K, pagesize=4K]
/mnt/ramdisk/book/control02.ctl          pages in cache: 2612/2612 (100.0%)  [filesize=10448.0K, pagesize=4K]
/mnt/ramdisk/book/control01.ctl          pages in cache: 2612/2612 (100.0%)  [filesize=10448.0K, pagesize=4K]
/mnt/ramdisk/book/undotbs01.dbf          pages in cache: 275202/275202 (100.0%)  [filesize=1100808.0K, pagesize=4K]
/mnt/ramdisk/book/temp01.dbf             pages in cache: 104851/105986 (98.9%)  [filesize=423944.0K, pagesize=4K]
/mnt/ramdisk/book/system01.dbf           pages in cache: 194562/194562 (100.0%)  [filesize=778248.0K, pagesize=4K]
/mnt/ramdisk/book/redostb04.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redostb03.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redostb02.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redostb01.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/example01.dbf          pages in cache: 88642/88642 (100.0%)  [filesize=354568.0K, pagesize=4K]

# find /mnt/ramdisk/book -name "*.*" -print0  | xargs -0 -I{} cachedel {}

# find /mnt/ramdisk/book -name "*.*" -print0  | xargs -0 -I{} cachestats {}

/mnt/ramdisk/book/sysaux01.dbf           pages in cache: 240642/240642 (100.0%)  [filesize=962568.0K, pagesize=4K]
/mnt/ramdisk/book/tea01.dbf              pages in cache: 10242/10242 (100.0%)  [filesize=40968.0K, pagesize=4K]
/mnt/ramdisk/book/redo03.log             pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redo02.log             pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redo01.log             pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/users01.dbf            pages in cache: 65538/65538 (100.0%)  [filesize=262152.0K, pagesize=4K]
/mnt/ramdisk/book/control02.ctl          pages in cache: 2612/2612 (100.0%)  [filesize=10448.0K, pagesize=4K]
/mnt/ramdisk/book/control01.ctl          pages in cache: 2612/2612 (100.0%)  [filesize=10448.0K, pagesize=4K]
/mnt/ramdisk/book/undotbs01.dbf          pages in cache: 275202/275202 (100.0%)  [filesize=1100808.0K, pagesize=4K]
/mnt/ramdisk/book/temp01.dbf             pages in cache: 104851/105986 (98.9%)  [filesize=423944.0K, pagesize=4K]
/mnt/ramdisk/book/system01.dbf           pages in cache: 194562/194562 (100.0%)  [filesize=778248.0K, pagesize=4K]
/mnt/ramdisk/book/redostb04.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redostb03.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redostb02.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/redostb01.log          pages in cache: 12801/12801 (100.0%)  [filesize=51200.5K, pagesize=4K]
/mnt/ramdisk/book/example01.dbf          pages in cache: 88642/88642 (100.0%)  [filesize=354568.0K, pagesize=4K]

--//可以发现对于tmpfs类型文件系统无法清除缓存的.至于temp01.dbf不是100%,我估计可能sparse file的原因.

--//补充说明:
# ls -lk temp01.dbf
-rw-r----- 1 oracle oinstall 423944 2017-11-16 08:35:13 temp01.dbf
# du -sk temp01.dbf
420236  temp01.dbf
# cachestats temp01.dbf
temp01.dbf                               pages in cache: 104851/105986 (98.9%)  [filesize=423944.0K, pagesize=4K]
--//两者看到大小不一致. 423944/4=105986. 也就是实际文件没有这么大,还是完全缓存的.
----------------

SYS@book> alter system set filesystemio_options=setall scope=spfile;

System altered.

SYS@book> startup mount

ORACLE instance started.
Total System Global Area  634732544 bytes
Fixed Size                  2255792 bytes
Variable Size             197133392 bytes
Database Buffers          427819008 bytes
Redo Buffers                7524352 bytes
ORA-00205: error in identifying control file, check alert log for more info

ALTER DATABASE   MOUNT

ORA-00210: cannot open the specified control file
ORA-00202: control file: '/mnt/ramdisk/book/control02.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 22: Invalid argument
Additional information: 2
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/mnt/ramdisk/book/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 22: Invalid argument
Additional information: 2
ORA-205 signalled during: ALTER DATABASE   MOUNT...

--//设置filesystemio_options=directio也一样.

2.rman恢复与filesystemio_options:

--//参考链接:

--//我当时将移动硬盘插入我的机器,使用mount.cifs安装在服务端,在设置filesystemio_options=setall的情况下,rman恢复时报如下错

--//误.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/18/2016 08:34:31
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

3.下面为了测试方面,我将数据库移到本地硬盘. 具体步骤略..

--//另外4种设置情况,仅仅介绍2中setall,asynch. 限于篇幅另写一篇文章.

转载地址:http://lenqa.baihongyu.com/

你可能感兴趣的文章
foxbot机器人指令_FOXBOT编程手册.doc
查看>>
hourglass论文_论文笔记 Stacked Hourglass Networks for Human Pose Estimation
查看>>
新增成功到编制为空bug_在系统软件当中,原来经常会出现这些bug
查看>>
更新fielddata为true_elasticsearch 5.2使用ICU插件进行排序需要fielddata = true吗?
查看>>
卷积过滤器的宽度_CNN模型参数解析
查看>>
c++ using namespace std 如何编译成独立可执行文件_C++编程自学宝典:如何编写一个简单的项目程序?...
查看>>
mysql数据库默认密码在哪看_怎么查看mysql数据库的登录名和密码
查看>>
单元测试mysql切换到h2_java~springboot~h2数据库在单元测试中的使用
查看>>
storm mysql spout_(转发)storm 入门原理介绍
查看>>
mysql全文检索的意义_深度解析MySQL 5.7之中文全文检索
查看>>
mysql执行计划规范格式_查看MySQL执行计划的几种方法以及格式说明
查看>>
mondrain配置mysql_Mondrian 的数据源设置
查看>>
springmvc遇到的问题_SpringMVC的简介
查看>>
python重命名_MySQL数据库重命名之Python脚本
查看>>
mysql shell 状态_shell MySQL服务状态检查脚本示例
查看>>
vscode关闭自动更新_VSCode 高级使用技巧汇总
查看>>
python中sys用法_Python中 sys.argv[]的用法简明解释
查看>>
python从零开始学习if语句_从零开始:Python学习成长路线
查看>>
linux下sqllite与mysql_《PHP、MySQL和Apache入门经典(第5版)》一一2.3 在Linux/UNIX上安装MySQL-阿里云开发者社区...
查看>>
python 给图像构建graph_plotly | python可视化进阶之路
查看>>