Skip site navigation (1) Skip section navigation (2)

Re: O_DIRECT use

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: O_DIRECT use
Date: 2002-01-04 21:48:50
Message-ID: 200201042148.g04Lmo628419@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> Why exactly would we wish to minimize OS caching?
> 
> > Not sure. Someone on IRC brought it up.  If we are sequential scanning a
> > large table, caching may be bad because we are pushing out stuff already
> > in the cache that may be useful.
> 
> Yeah, but people normally try to set things up to avoid doing large
> sequential scans, at least in all the contexts where they need high
> performance.  For index searches you definitely want all the caching
> you can get.
> 
> 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.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-hackers by date

Next:From: Brent VernerDate: 2002-01-04 21:53:34
Subject: Re: O_DIRECT use
Previous:From: Tom LaneDate: 2002-01-04 21:47:10
Subject: Re: O_DIRECT use

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group