Re: O_DIRECT in freebsd

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: O_DIRECT in freebsd
Дата
Msg-id 3964.1067439994@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: O_DIRECT in freebsd  (Doug McNaught <doug@mcnaught.org>)
Ответы Re: O_DIRECT in freebsd  (Manfred Spraul <manfred@colorfullife.com>)
Список pgsql-hackers
Doug McNaught <doug@mcnaught.org> writes:
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> 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.

> Linux and Solaris have had this for a while.  I'm pretty sure it's
> been discussed before--search the archives.  I think the consensus
> was that it might be useful for WAL writes, but would be a fair amount
> of work and would introduce portability issues...

Not for WAL --- we never read the WAL at all in normal operation.  (If
it works for writes, then we would want to use it for writing WAL, but
that's not apparent from what Christopher quoted.)

IIRC there was speculation that this would be useful for large seqscans
and for vacuuming.  It'd take some hacking to propagate the knowledge of
that context down to where the fopen occurs, though.
        regards, tom lane


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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: O_DIRECT in freebsd
Следующее
От: Manfred Spraul
Дата:
Сообщение: Re: O_DIRECT in freebsd