Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Synchronous writes & TEMP
VC wrote:
> Frank,
>
> "Frank van Bortel" <fvanbortel_at_netscape.net> wrote in message
> news:c83d1v$n9s$1_at_news1.tilbu1.nb.home.nl...
>
>>VC wrote: >> >> >>>Frank, >>> >>>Asynchronous IO is irrelevant to my question. >>>The question is why Oracle uses synchronous OS write calls when data >>>integrity is _not_ at stake (or is it) ? >>> >>>Regards. >>> >>>VC >>> >>>"Frank van Bortel" <fvanbortel_at_netscape.net> wrote in message >>>news:c838er$fsc$1_at_news1.tilbu1.nb.home.nl... >>> >>> >>>>VC wrote: >>>> >>>> >>>>I'd say Karsten had a plausible explanation: the process >>>>that needs temp to be written has nothing better to do >>>>than wait - so why bother with an extra communications >>>>process and async writes when there's a synchronous write, >>>>that will only return when done? >>>> >>>>Ready to be beaten up, technically speaking ;) >>>>-- >>>> >>>>Regards, >>>>Frank van Bortel >>>> >>> >>> >>> >>Yeah - you've been pounding on that enough by now.
>>Start reading the thread. >> >>Why should it not, when it *has to wait*? >>I'll repeat that: when it (the process) has to wait >>(for the writing to complete). >> >>Looks more efficient to use sync than >>async + comm mechanism to me.
So now you will?
but you just do not have a clue what you are
> talking about.
Hey - I'm still ready to be beaten up - as stated beforehand.
Before you embarras
> yourself any further,
I'm not embarrassed... (2 s's, please)
I'll give you a hint: Oracle can use both
> asynchronous IO _and_ synchronous writes at the same
> time when performing IO to the TEMP tablespace.
So? I mixed up delayed writes, synchronous writes, async IO.
Why did you not use delayed writes vs synchronous writes in
the first place? Would have made it clearer for morons like me.
When you reconcile your
> mental model of Oracle's IO with this simple fact,
> you'll probably realize that synchronous writes and asynchronous IO are
> orthogonal.
Simple english, please? Not my native tongue, you know. To me, orthogonal is a mathematical figure, and I cannot fit that picture in file system writes. Parallel? No not as parallel writes, but doing synchronous write requests asynchronously? Must be a better way to express that, but I'll leave it to technically educated, native English speaking people.
> Please do yourself a favour and read, like, a book or something on OS I/O
> fundamentals and then we'll talk -- this is really basic stuff..
>
>
>>Thus Karsten's explanation looks plausible.
From ixora, "Oracle Internals Notes", section on buffered IO:
(http://www.ixora.com.au/notes/buffered_io.htm)
<qoute>
Because delayed writes involve a risk of data loss, Oracle never uses
them. Oracle insists on the synchronous completion of writes for all
buffered I/O to database files. This is done by using the O_DSYNC flag
when opening database files. This means that the data itself must be
written synchronously, but that delayed writes may be used for updates
to the file access and modification times recorded by the file system.
</quote>
So my best guess is: it in the habit of Oracle to use synchronous writes.
On the other hand - would you like your benefits calculated wrong, because Oracle missed dome data in performing the group by statement (using delayed writes)? Does it make any difference at all? You state it does, but we had this raw IO vs buffered IO thread not too long ago. I'd like to see some test results, presumably from a C-program (as Oracle will always use O_DSYNC)
-- Regards, Frank van BortelReceived on Sat May 15 2004 - 06:46:21 CDT