IDS - DIRECT I/O for cooked files problem
Posted in 2010
On IDS 11.5FC5 under Solaris 10 with DIRECT_IO=1 and cooked-file chunks, the online.log reported "Direct I/O cannot be used for the chunk file ...". IBM support explained that Informix calls Solaris' directio() and the call is failing (likely ENOTTY, i.e. a filesystem that doesn't accept advisory functions), suggesting truss to confirm. When the poster revealed the chunks sat on NFS, Art Kagel identified that as the cause: NFS doesn't support O_DIRECT, so direct I/O is silently skipped. The fix recommended was to place the chunks on a local UFS or ZFS filesystem.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management, Server Administration
Hello, IDS 11.5FC5 in running on SunOS 5.10 (pagesize 8192), DIRECT_IO is enable (set to 1) in ONCONFIG. Cooked files are used to create the dbpaces with a default pagesize of 2048 bytes. When IDS is started the following messge is found in the 'online.log': 11:10:10 Direct I/O cannot be used for the chunk file '/informix/devices/dbspace1'. 11:10:10 Direct I/O cannot be used for the chunk file '/informix/devices/dbspace2'. Any ideas as to why Direct I/O cannot be used? If so, how tocorrect it? Thanks! Reyna _________________________________________________________ Reyna Sabina Phone: (305) 361-4324 NOAA/AOML/PHOD Fax: (305) 361-4392 4301 Rickenbacker Causeway Email: Reyna.Sabina@noaa.gov Miami, FL 33149-1087 "Things do not get better by being left alone." -Winston Churchill
Reyna wrote: Hello, IDS 11.5FC5 in running on SunOS 5.10 (pagesize 8192), DIRECT_IO is enable (set to 1) in ONCONFIG. Cooked files are used to create the dbpaces with a default pagesize of 2048 bytes. When IDS is started the following messge is found in the 'online.log': 11:10:10 Direct I/O cannot be used for the chunk file '/informix/devices/dbspace1'. 11:10:10 Direct I/O cannot be used for the chunk file '/informix/devices/dbspace2'. Any ideas as to why Direct I/O cannot be used? If so, how tocorrect it? Thanks! Reyna Respone: It looks like on Solaris we use the system call directio() to try and enable that feature. From looking at the code it would appear that the directio() call failed, but we don't seem to report the error code. I would suspect however, from looking at the man page, that the error code was probably ENOTTY which states that the file is in a file system that does not accept advisory fuctions. You could likely confirm this by using truss. Otherwise I'd look at the man page for directio() or futher Sun documentation on the type of filesystem you have to define to be able to use the directio() call on it. I found this link http://www.informit.com/articles/article.aspx?p=606585&seqNum=6 which looks to imply that to use directio() you have to turn it on via an option when you mount the file system. Anyway maybe somebody with more Solaris knowledge will pipe in. But basically the message you are receiving at the database level was that we received an error when we tried to call directio() (but we don't report exactly what error we got, but there only appears to be 1 error that would make sense from how we call it and that's the ENOTTY). Jacques Renaut IBM Informix Advanced Support APD TEAM
What kind of filesystem are you using? Regards. On Fri, Feb 19, 2010 at 5:12 PM, Reyna.Sabina <Reyna.Sabina@noaa.gov> wrote: > Hello, > > IDS 11.5FC5 in running on SunOS 5.10 (pagesize 8192), > DIRECT_IO is enable (set to 1) in ONCONFIG. > Cooked files are used to create the dbpaces with a > default pagesize of 2048 bytes. > > When IDS is started the following messge is found in the 'online.log': > 11:10:10 Direct I/O cannot be used for the chunk file > '/informix/devices/dbspace1'. > 11:10:10 Direct I/O cannot be used for the chunk file > '/informix/devices/dbspace2'. > > Any ideas as to why Direct I/O cannot be used? If so, how tocorrect it? > > Thanks! > > Reyna > _________________________________________________________ > Reyna Sabina Phone: (305) 361-4324 > NOAA/AOML/PHOD Fax: (305) 361-4392 > 4301 Rickenbacker Causeway Email: Reyna.Sabina@noaa.gov > Miami, FL 33149-1087 > > "Things do not get better by being left alone." > > -Winston Churchill > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --0016e6da7db8afd15d047ff7de30
Hmm, never mind my info on how to turn it on, it looks like I misread the link...if you turn it on with the mount option, that should turn it on for everything. Where as we are turning it on via the directio() call using DIRECTIO_ON. Jacques Renaut IBM Informix Advanced Support APD Team
On Fri, 19 Feb 2010, Fernando Nunes wrote: > What kind of filesystem are you using? > Regards. It is O/S dependent (SunOS 5.10) file system (NFS). Thanks! > > On Fri, Feb 19, 2010 at 5:12 PM, Reyna.Sabina <Reyna.Sabina@noaa.gov> wrote: > > > Hello, > > > > IDS 11.5FC5 in running on SunOS 5.10 (pagesize 8192), > > DIRECT_IO is enable (set to 1) in ONCONFIG. > > Cooked files are used to create the dbpaces with a > > default pagesize of 2048 bytes. > > > > When IDS is started the following messge is found in the 'online.log': > > 11:10:10 Direct I/O cannot be used for the chunk file > > '/informix/devices/dbspace1'. > > 11:10:10 Direct I/O cannot be used for the chunk file > > '/informix/devices/dbspace2'. > > > > Any ideas as to why Direct I/O cannot be used? If so, how tocorrect it? > > > > Thanks! > > > > Reyna > > _________________________________________________________ > > Reyna Sabina Phone: (305) 361-4324 > > NOAA/AOML/PHOD Fax: (305) 361-4392 > > 4301 Rickenbacker Causeway Email: Reyna.Sabina@noaa.gov > > Miami, FL 33149-1087 > > > > "Things do not get better by being left alone." > > > > -Winston Churchill > > > > > > > > > ******************************************************************************* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > -- > Fernando Nunes > Portugal > > http://informix-technology.blogspot.com > My email works... but I don't check it frequently... > > --0016e6da7db8afd15d047ff7de30 > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >
It may be that the type of filesystem that is holding the chunks does not support DIRECT_IO. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) See you at the 2010 IIUG Informix Conference April 25-28, 2010 Overland Park (Kansas City), KS www.iiug.org/conf Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Fri, Feb 19, 2010 at 12:12 PM, Reyna.Sabina <Reyna.Sabina@noaa.gov>wrote: > Hello, > > IDS 11.5FC5 in running on SunOS 5.10 (pagesize 8192), > DIRECT_IO is enable (set to 1) in ONCONFIG. > Cooked files are used to create the dbpaces with a > default pagesize of 2048 bytes. > > When IDS is started the following messge is found in the 'online.log': > 11:10:10 Direct I/O cannot be used for the chunk file > '/informix/devices/dbspace1'. > 11:10:10 Direct I/O cannot be used for the chunk file > '/informix/devices/dbspace2'. > > Any ideas as to why Direct I/O cannot be used? If so, how tocorrect it? > > Thanks! > > Reyna > _________________________________________________________ > Reyna Sabina Phone: (305) 361-4324 > NOAA/AOML/PHOD Fax: (305) 361-4392 > 4301 Rickenbacker Causeway Email: Reyna.Sabina@noaa.gov > Miami, FL 33149-1087 > > "Things do not get better by being left alone." > > -Winston Churchill > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --00151747b400351293047ff8cd0b
NFS isn't OS dependent, it is an OS independent networked filesystem (hence NFS). NFS does NOT support O_DIRECT! You can use a local UFS or ZFS filesystem instead. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) See you at the 2010 IIUG Informix Conference April 25-28, 2010 Overland Park (Kansas City), KS www.iiug.org/conf Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Fri, Feb 19, 2010 at 1:42 PM, Reyna.Sabina <Reyna.Sabina@noaa.gov> wrote: > On Fri, 19 Feb 2010, Fernando Nunes wrote: > > > What kind of filesystem are you using? > > Regards. > > It is O/S dependent (SunOS 5.10) file system (NFS). > > Thanks! > > > > > On Fri, Feb 19, 2010 at 5:12 PM, Reyna.Sabina <Reyna.Sabina@noaa.gov> > wrote: > > > > > Hello, > > > > > > IDS 11.5FC5 in running on SunOS 5.10 (pagesize 8192), > > > DIRECT_IO is enable (set to 1) in ONCONFIG. > > > Cooked files are used to create the dbpaces with a > > > default pagesize of 2048 bytes. > > > > > > When IDS is started the following messge is found in the 'online.log': > > > 11:10:10 Direct I/O cannot be used for the chunk file > > > '/informix/devices/dbspace1'. > > > 11:10:10 Direct I/O cannot be used for the chunk file > > > '/informix/devices/dbspace2'. > > > > > > Any ideas as to why Direct I/O cannot be used? If so, how tocorrect it? > > > > > > Thanks! > > > > > > Reyna > > > _________________________________________________________ > > > Reyna Sabina Phone: (305) 361-4324 > > > NOAA/AOML/PHOD Fax: (305) 361-4392 > > > 4301 Rickenbacker Causeway Email: Reyna.Sabina@noaa.gov > > > Miami, FL 33149-1087 > > > > > > "Things do not get better by being left alone." > > > > > > -Winston Churchill > > > > > > > > > > > > > > > > ******************************************************************************* > > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > > > > > -- > > Fernando Nunes > > Portugal > > > > http://informix-technology.blogspot.com > > My email works... but I don't check it frequently... > > > > --0016e6da7db8afd15d047ff7de30 > > > > > > > > ******************************************************************************* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --0015174beffede71a4047ffa6b64