Re: O_DIRECT in freebsd

Поиск
Список
Период
Сортировка
От Sean Chittenden
Тема Re: O_DIRECT in freebsd
Дата
Msg-id 20030617071121.GI97131@perrin.int.nxad.com
обсуждение исходный текст
Ответ на O_DIRECT in freebsd  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
> 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).

-sc

-- 
Sean Chittenden


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Our FLOAT(p) precision does not conform to spec
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: O_DIRECT in freebsd