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 Thu, 25 Aug 2005 00:21:35 GMT, Mladen Gogala <gogala_at_sbcglobal.net>
wrote:
>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 bytes
>Database mounted.
>SQL> !ps -ef|grep dbw
>oracle 4681 1 0 20:13 ? 00:00:00 ora_dbw0_10g
>oracle 4703 4672 0 20:13 pts/0 00:00:00 /bin/ksh -c ps -ef|grep dbw oracle 4707 4703 0 20:13 pts/0 00:00:00 grep dbw
>
>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)
>$
>
What should I _not_ be seeing?
I assume I should be seeing some 'open' command on datafiles.. but I
am not.. this is all i see on mount:
rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) =
0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 370000}}, NULL) = 0
rt_sigreturn(0x1) = -1 EINTR (Interrupted systemcall)
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={3, 0}}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [], NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={3, 0}}, NULL) = 0
umask(0) = 022open("/u01/app/oracle/product/920/dbs/lkFOTC", O_RDWR|O_CREAT|O_EXCL, 0660) = -1 EEXIST (File exists)
umask(022) = 0fcntl(12, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={1, 640000}}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [], NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={3, 0}}, NULL) = 0
ioctl(9, 0x56584f1c, 0x7fbfffdba0) = 0 ioctl(9, 0x56584f1c, 0x7fbfffdba0) = 0 ioctl(9, 0x56584f1c, 0x7fbfffdba0) = 0 ioctl(9, 0x56584f1c, 0x7fbfffdd70) = 0 ioctl(9, 0x56584f1c, 0x7fbfffdd60) = 0 ioctl(9, 0x56584f1c, 0x7fbfffdd60) = 0.......
![]() |
![]() |