Re: Moving db to linux
- From: Mladen Gogala <mgogala@xxxxxxxxxxxx>
- To: oracle-l@xxxxxxxxxxxxx
- Date: Sat, 28 Feb 2004 21:17:46 -0500
On 02/28/2004 08:09:19 PM, Nuno Souto wrote:
>> ----- Original Message -----
>> if (stat3=posix_memalign(&buff,ALIGN,BUFFSIZE)) {
>> fprintf(stderr,"ALIGN ERR:%s\n",strerror(stat3));
>> exit(0);
>> }
> :D I LIKE that! Would you believe this is the FIRST time EVER
> I've seen this little piece of code included in ANY program that
> purports to test I/O? Yet it is of capital importance: it makes a
> HUGE difference in getting any performance numbers. Well done!
Nuno, I agree, it's absolutely crucial because without the proper alignment,
direct I/O will not work. If you look into open(2), for O_DIRECT flag,
it does say that buffers need to be aligned on the buffer size. I am
running the latest 2.4 kernel, and if I declare buffer as buff[BUFFSIZE],
I get EINVAL for the next I/O operation. Exactly the same thing happens
to Oracle 10 when I set the DIRECTIO flag. I did strace of CKPT
process, and that was precisely what I saw. I chose CKPT because
oracle was reporting problems with accessing control files when
I did "alter database mount". I must humbly admit contacting Dave
Kleinkamp from IBM team which is developing JFS, and it was he who has
put the posix_memalign, not me. Below is his message:
--- Dave Kleikamp <shaggy@xxxxxxxxxxxxxx> wrote:
> Subject: Re: JFS, Linux and direct I/O
> From: Dave Kleikamp <shaggy@xxxxxxxxxxxxxx>
> To: Mladen Gogala <mgogala@xxxxxxxxxxxx>
> Date: Fri, 27 Feb 2004 08:38:57 -0600
>
> On Thu, 2004-02-26 at 23:13, Mladen Gogala wrote:
> > Hi!
> > Few months ago, I asked about JFS and direct I/O and I received the
> > answer that JFS on Linux supports direct I/O. Oracle doesn't think so and
> > I ventured to write a little test program on my RH-9, with kernel 2.4.25.
> > Test program is attached and it inevitably fails with O_DIRECT flags and
> > works without them. How exactly can I use direct I/O with JFS? The fact
> > that IBM claims that direct I/O is supported was the primary reason for me
>
> > to chose JFS. Please, explain me how can I utilize direct I/O from JFS
> > files? In the mean time, I'll start testing XFS.
> > Thanks!
>
> The problem is with your test case. The buffer passed to read and write
> must be aligned to the file system's block size. From the open(2) man
> page:
>
> "Transfer sizes, and the alignment of user buffer and file offset must
> all be multiples of the logical block size of the file system."
>
> Attached is a modified version of the test case which succeeds on the
> 2.4.25 kernel.
The modified version is the one that you saw earlier.
--
Mladen Gogala
Oracle DBA
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
- Follow-Ups:
- Re: Moving db to linux
- From: Nuno Souto
- References:
- RE: Moving db to linux
- From: Jesse, Rich
- Re: Moving db to linux
- From: Nuno Souto
- Re: Moving db to linux
- From: Mladen Gogala
- Re: Moving db to linux
- From: Nuno Souto
- Re: Moving db to linux
- From: Mladen Gogala
- Re: Moving db to linux
- From: Nuno Souto
Other related posts:
- » Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » RE: Moving db to linux
- » RE: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » RE: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- » Re: Moving db to linux
- Re: Moving db to linux
- From: Nuno Souto
- RE: Moving db to linux
- From: Jesse, Rich
- Re: Moving db to linux
- From: Nuno Souto
- Re: Moving db to linux
- From: Mladen Gogala
- Re: Moving db to linux
- From: Nuno Souto
- Re: Moving db to linux
- From: Mladen Gogala
- Re: Moving db to linux
- From: Nuno Souto