Operating System - HP-UX
1748008 Members
4475 Online
108757 Solutions
New Discussion юеВ

Re: Direct io (mincache and convosync) not working?

 
SOLVED
Go to solution
Danny Petterson - DK
Trusted Contributor

Direct io (mincache and convosync) not working?

Hi!

Have a 11.31-box, with somes Oracle Database. The DBA wants direct IO. Mounted the database-disk with mincache and convosync:

/oracle/ORADB1/databases on /dev/vg21/lvol2 ioerror=mwdisable,largefiles,mincache=direct,delaylog,nodatainlog,convosync=direct,dev=80210002

So far so good, however, this is what tusc tells me about direct IO:

[17520] open("/oracle/ORADB2/databases/XTL/oradata/test01.dbf", O_RDONLY|0x800, 01210) ................................................. = 17
[17520] open("/oracle/ORADB2/databases/XTL/oradata/test01.dbf", O_RDONLY|0x800, 07645) ................................................. = 17
[17520] open("/oracle/ORADB2/databases/XTL/oradata/test01.dbf", O_RDWR|0x800|O_DSYNC, 030) ............................................. = 17
[17520] open("/oracle/ORADB2/databases/XTL/oradata/test01.dbf", O_RDONLY|0x800, 01210) ................................................. = 17
[17520] open("/oracle/ORADB2/databases/XTL/oradata/test01.dbf", O_RDONLY|0x800, 07645) ................................................. = 17
[17520] open("/oracle/ORADB2/databases/XTL/oradata/test01.dbf", O_RDWR|0x800|O_DSYNC, 030) ............................................. = 17

...indicating that Direct IO is NOT used. And the DBA tells me that to.

How come? What to do?

Thanks in advance.

Greetings
Danny
24 REPLIES 24
Tim Nelson
Honored Contributor

Re: Direct io (mincache and convosync) not working?

I believe you need OnlineJFS licensed in order to enable these.. ( could be wrong, it has been a long time )..

Tim Nelson
Honored Contributor

Re: Direct io (mincache and convosync) not working?

Disregard my response.. I cannot find proof of the comment anywhere.. I must have been dreaming...

Sorry...
James R. Ferguson
Acclaimed Contributor

Re: Direct io (mincache and convosync) not working?

Hi:

> Tim: Disregard my response.. I cannot find proof of the comment anywhere.. I must have been dreaming...

No, you're not :-) The OnlineJFS requirement for 'convosync' and 'mincache=direct' are documented in the 'mount_vxfs(1M)' manpages.

However, if I recall correctly, without OnlinejFS the mount would fail if these options were used. A 'cat /etc/mnttab' will show what mount options are in force.

Regards!

...JRF...
Danny Petterson - DK
Trusted Contributor

Re: Direct io (mincache and convosync) not working?

Hi Gurus!

Thanks for your answers - and its true, these mount-options only work with OnlineJFS, which is installed on the system - the line in my initial mail, showing the mount-options for the mountpoint, are in fact from the "mount"-command - showing that the convosync and mincache are already in effect.

But still - the tusc should return direct-io for the database-files, not O_RDONLY.

So - any ideas would be appreciated.

Thanks.
Danny

Re: Direct io (mincache and convosync) not working?

Danny,

ARe you sure you are interpreting what you see correctly here?

Cos what I see is the same file (/oracle/ORADB2/databases/XTL/oradata/test01.dbf) being opened read-only (maybe as part of the header checks oracle does at startup), followed by it being opened read-write with the O_DSYNC flag. If you look at the mount_vxfs man page you will see when you mount with mincache=direct,convosync=direct then any files opened with O_DSYNC will bypass the filesystem buffer cache and do direct IO.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Danny Petterson - DK
Trusted Contributor

Re: Direct io (mincache and convosync) not working?

Hi Duncan!

Thanks a bunch for your reply.

Hm - you have a valid point there, no doubt. I was trusting a MetaLink-document 555601.1, which describes how to check this. This note says, that if a datafile is opened with direct IO, the open-statements from tusc should include O_DIRECT.

To kind of verify this, I tried to:
1 - create a database-file on a filesystem, mounted without convosync and mincache=direct. It still says O_DSYNC.

2 - Alter the database to not use direct IO - still, database-files on filesystems both with or without the aforementioned mountoptions is O_DSYNC.

I might misinterpretate something but initially this kind of shows that direct IO is not working.

Im pretty sure I'm missing something crucial here, I just don't know what.

Again, thanks a lot so far.
Greetings
Danny

Re: Direct io (mincache and convosync) not working?

Oracle _always_ opens files R/W with the O_DSYNC flag, regardless of what the filesystem is set up to do.

Read the mount_vxfs man page carefully, and also have a look at what the VX_DIRECT caching advisory does when direct IO is enabled (see the vxfsio(7) man page)

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Danny Petterson - DK
Trusted Contributor

Re: Direct io (mincache and convosync) not working?

Hm - interesting - thanks.

IF it succeeds to get the Oracle database-file opened using Direct IO, will tusc then show the O_DIRECT-flag?

Sorry for all the stupid questions.

Greetings
Danny
Dennis Handly
Acclaimed Contributor

Re: Direct io (mincache and convosync) not working?

>indicating that Direct IO is NOT used. And the DBA tells me that to.

To get O_DIRECT, the application must use that in its open. I suppose open(2) could modify the system call based on the filesystem mount types.