Re: O_DIRECT use
От | Bruce Momjian |
---|---|
Тема | Re: O_DIRECT use |
Дата | |
Msg-id | 200201042312.g04NCir06014@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: O_DIRECT use (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: O_DIRECT use
|
Список | pgsql-hackers |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > >> For that matter, I would expect that O_DIRECT also defeats readahead, > >> so I'd fully expect it to be a loser for seqscans too. > > > I am told on FreeBSD it does not disable read-ahead, just caching; > > something that needs more research. > > Hmm. I always thought of read-ahead as preloading buffer cache entries. > > It'd be interesting to get a description of *exactly* what this flag > does, rather than handwavy approximations. Time to start reading the > kernel code, I suppose. I found this before adding the item: http://www.pairlist.net/pipermail/flow-tools/2001-October/000058.html And this for FreeBSD 4.4: 2.1 Kernel Changes The O_DIRECT flag has been added to open(2) and fcntl(2). Specifying this flag for open files will attempt to minimizethe cache effects of reading and writing. I also found: http://www.ukuug.org/events/linux2001/papers/html/AArcangeli-o_direct.html These later ones seem to indicate there isn't read-ahead, meaning we would have to do our own prefetches. Eck. I am unclear if that is true on all OS's. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: