Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to confirm 'direct io' on linux?
On Tue, 23 Aug 2005 20:21:23 +0000, NetComrade wrote:
> We are currently testing running Oracle 9.2.0.6 on Redhat 4.0 AMD x64.
> We are using Veritas File System, and ODM..
> We have linked odm.so files into $oracle-home/lib
> On solaris, I believe OS calls should've been ODM, or at least kaio
> (when using truss), what should we be seeing on linux when using
> strace?
open(....,O_DIRECT) is what you should see. Direct I/O on Linux is available on Ext3 and JFS which are free. I haven't tested VxFS but I can not imagine that it would not perform direct I/O when instructed to do so. Here is how you check: $ svrmgrl
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 24 20:13:24 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 243269632 bytes
Fixed Size 1218748 bytes Variable Size 71305028 bytes Database Buffers 167772160 bytes Redo Buffers 2973696 bytesDatabase mounted.
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining Scoring Engine options
$
$ strace -o /tmp/dbwr.out -p 4681 & (Process 4681 is the database writer)
[1] 4708
$ Process 4681 attached - interrupt to quit
$
$ svrmgrl
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 24 20:15:33 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining Scoring Engine options
SQL> alter database open;
Database altered.
SQL> select count(*) from scott.emp;
COUNT(*)
14
SQL>
$ grep O_DIRECT /tmp/dbwr.out
open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_system_1j2cfzfv_.dbf", O_RDONLY|O_DIRECT|O_LARGEFILE) = 19
open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_system_1j2cfzfv_.dbf", O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) = 19
fcntl64(19, F_GETFL) = 0xd002 (flags O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_undotbs1_1j2cfzm4_.dbf", O_RDONLY|O_DIRECT|O_LARGEFILE) = 20 open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_undotbs1_1j2cfzm4_.dbf", O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) = 20 fcntl64(20, F_GETFL) = 0xd002 (flags O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE)open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_sysaux_1j2cfzgq_.dbf", O_RDONLY|O_DIRECT|O_LARGEFILE) = 21 open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_sysaux_1j2cfzgq_.dbf", O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) = 21
fcntl64(21, F_GETFL) = 0xd002 (flags O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE)open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_users_1j2cfzmf_.dbf", O_RDONLY|O_DIRECT|O_LARGEFILE) = 22 open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_users_1j2cfzmf_.dbf", O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) = 22
fcntl64(22, F_GETFL) = 0xd002 (flags O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_perfstat_1j2f56l5_.dbf", O_RDONLY|O_DIRECT|O_LARGEFILE) = 23 open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_perfstat_1j2f56l5_.dbf", O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) = 23 fcntl64(23, F_GETFL) = 0xd002 (flags O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE)open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_indx_1j2ft1ov_.dbf", O_RDONLY|O_DIRECT|O_LARGEFILE) = 24 open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_indx_1j2ft1ov_.dbf", O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) = 24
fcntl64(24, F_GETFL) = 0xd002 (flags O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE)open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_temp_1j2cjwbg_.tmp", O_RDONLY|O_DIRECT|O_LARGEFILE) = 25 open("/oradata/10g/oracle/datafile/10G/datafile/o1_mf_temp_1j2cjwbg_.tmp", O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE) = 25
fcntl64(25, F_GETFL) = 0xd002 (flags O_RDWR|O_SYNC|O_DIRECT|O_LARGEFILE)$
By definition, every I/O to the handle opened by O_DIRECT bypasses system buffering and goes directly to the user buffers instead. At the end, I humbly confess that I am lazy and therefore using OMF (Oracle Managed Files).
-- http://www.mgogala.comReceived on Wed Aug 24 2005 - 19:21:35 CDT
![]() |
![]() |