> I noticed this in the FreeBSD 5.1 release notes:
> "A new DIRECTIO kernel option enables support for read operations
> that bypass the buffer cache and put data directly into a userland
> buffer. This feature requires that the O_DIRECT flag is set on the
> file descriptor and that both the offset and length for the read
> operation are multiples of the physical media sector size. [MERGED]"
> MERGED means that it should also appear in FreeBSD 4.9.
> Will PostgreSQL pick this up automatically, or do we need to add
> extra checks?

Extra checks, though I'm not sure why you'd want this.  This is the
equiv of a nice way of handling raw IO for read only
operations... which would be bad.  Call me crazy, but unless you're on
an embedded device with a non-existent FS cache or are Oracle and are
handling the IO buffer in user space, the buffer cache is what helps
speed up PostgreSQL since PostgreSQL leaves all of the caching
operations and optimization/alignment of pages up to the OS (much to
the behest of madvise() which could potentially speed up access of the
VM, but I won't get into that... see TODO.mmap).


Sean Chittenden

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to