Sundaramurthy Blog

February 4, 2010

Asynchronous I/O

Filed under: ASM,ASM Internal — sundar5 @ 11:57 pm

In oracle RDBMS database, behaviour of I/O calls depending on parameters FILESYSTEMIO_OPTIONS and DISK_ASYNCH_IO.
when FILESYSTEMIO_OPTIONS enables asynchronous I/O (AIO) value is set to SETALL/ASYNC But it has no affect when
ASM is used.

Generally ASM bypass the file system layer  because it was base on the DISK_ASYNCH_IO parameter.
ASM AIO can be enabled/disbaled  by setting disk_asynch_io true/false.

FILESYSTEMIO_OPTIONS:

1. “asynch”    : means buffered I/O + Async I/O
2. “directIO” : means Direct I/O only
3. “setall”       : means Direct I/O + Async I/O
4. “none”        : disables Async I/O and Direct I/O

 

How to check when AIO is enable or not in the Linux OS?

Example: Non-ASM on Linux OS
$cat /proc/slabinfo | grep kio

kioctx    79    110    384   10    1 : tunables   54   27    8 : slabdata     11     11      0
kiocb     22     45    256   15    1 : tunables  120   60    8 : slabdata      2      3      0

RDBMS init parameters

SQL> show parameter disk_asynch_io
NAME                                 TYPE        VALUE
———————————— ———– ———
disk_asynch_io                       boolean     TRUE
filesystemio_options                 string      setall
SQL>

$ps -ef |grep ora_db
oracle     422     1  0 Jan27 ?        00:00:35 ora_dbw0_test1
$strace -p 422

getrusage(RUSAGE_SELF, {ru_utime={21, 303761}, ru_stime={14, 244834}, …}) = 0
getrusage(RUSAGE_SELF, {ru_utime={21, 303761}, ru_stime={14, 244834}, …}) = 0
times(NULL)                             = 507883218
open(“/proc/332/stat”, O_RDONLY)        = 44
read(44, “332 (oracle) S 1 332 332 0 -1 0 “…, 999) = 225
close(44)                               = 0
times(NULL)                             = 507877817
io_submit(182929903616, 1, {…})       = 1
io_getevents(182929903616, 1, 1024, {…}{600, 0}) = 1
times(NULL)                             = 507877818
times(NULL)                             = 507877818

AIO is used shows io_submit/io_getevents calls

Example: ASM on Linux OS

ls -l /dev/oracleasm/disks

total 0
brw-rw—-  1 oracle dba 253,  53 Aug 14 18:07 DISK0
brw-rw—-  1 oracle dba 253,  37 Aug 14 18:07 DISK1
brw-rw—-  1 oracle dba 253, 130 Aug 14 18:07 DISK2
brw-rw—-  1 oracle dba 253, 131 Aug 14 18:07 DISK3
SQL> show parameter disk_asynch_io
NAME                                 TYPE        VALUE
———————————— ———– ——————————
disk_asynch_io                       boolean     TRUE
filesystemio_options                 string      SETALL

getrusage(RUSAGE_SELF, {ru_utime={758, 39760}, ru_stime={66, 609873}, …}) = 0
getrusage(RUSAGE_SELF, {ru_utime={758, 39760}, ru_stime={66, 609873}, …}) = 0
times(NULL)                             = 1931870226
read(16, “MSA\2\10P\260Bq\6″…, 80) = 80
read(16, “MSA\2\10P\222\377\377\377\260Bq\6″…, 80) = 80
getrusage(RUSAGE_SELF, {ru_utime={758, 39760}, ru_stime={66, 609873}, …}) = 0
getrusage(RUSAGE_SELF, {ru_utime={758, 39760}, ru_stime={66, 609873}, …}) = 0
times(NULL)

ASMLIB performs AIO depending on how the I/O is passed to it. It makes no decisions at all. This is entirely up to ASM layer.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: