Monday, September 12, 2016

Enable Asynchronous IO for file System

We noticed that on one of our standby database, the log apply was quite slow. I stopped managed recovery process which showed ORA-16037 in the alert log file along with trace file name.
ALTER DATABASE RECOVER managed standby database cancel
Fri Nov 20 16:13:12 2015
RFS[2]: Selected log 12 for thread 1 sequence 504809 dbid -1228626264 branch 748801133
Fri Nov 20 16:13:13 2015


Archived Log entry 11098 added for thread 1 sequence 504808 ID 0xbe776bb0 dest 1:
Fri Nov 20 16:13:44 2015
MRP0: Background Media Recovery cancelled with status 16037
Errors in file /u01/app/oracle/diag/rdbms/standbydb/MYDB/trace/MYDB_pr00_21313.trc:
ORA-16037: user requested cancel of managed recovery operation
Managed Standby Recovery not using Real Time Apply

Trace file was having following messages in it.
*** 2015-11-20 16:08:28.092
Media Recovery Log /arch/oracle/mydb/archive/ARC504565_0748801133.0001
Log read is SYNCHRONOUS though disk_asynch_io is enabled!

*** 2015-11-20 16:10:01.217
Media Recovery Log Media Recovery Log /arch/oracle/mydb/archive/ARC504566_0748801133.0001
Log read is SYNCHRONOUS though disk_asynch_io is enabled!

*** 2015-11-20 16:11:31.517
Media Recovery Log Media Recovery Log /arch/oracle/mydb/archive/ARC504567_0748801133.0001
Log read is SYNCHRONOUS though disk_asynch_io is enabled!

It meant that asynchronous IO was not working for the file systems which needed to be set by setting initialization parameter FILESYSTEMIO_OPTIONS=’SETALL’. By default value of this parameter is NONE. (Instance restart is required as this is not a dynamic init parameter)
It is recommended to set value of this parameter to SETALL (or ASYNCH or DIRECTIO). SETALL is equal to both ASYNCH and DIRECTIO.
Point to note is that parameters DISK_ASYNCH_IO (and TAPE_ASYNCH_IO) is by default set to TRUE which enables asynchronous IO regardless of where oracle files are stored, whereas FILESYSTEMIO_OPTIONS is specific to the files stored on the file system. Moreover, before setting this parameter, you should confirm if your file system supports asynchronous IO, otherwise you may face severe performance issue.
To set value of this parameter, set value in SQLPLUS if you are using spfile, and bounce the instance. If you are using pfile, set value in pfile and bounce the instance.

SQL> ALTER SYSTEM SET filesystemio_options=’SETALL’ SCOPE=spfile;



No comments:

Popular Posts - All Times