Re: O_DIRECT in freebsd

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Sean Chittenden <sean(at)chittenden(dot)org>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: O_DIRECT in freebsd
Date: 2003-06-18 00:01:37
Message-ID: Pine.LNX.4.21.0306180957240.31214-100000@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 17 Jun 2003, Tom Lane wrote:

> "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > The reason I mention it is that Postgres already supports O_DIRECT I think
> > on some other platforms (for whatever reason).
>
> [ sounds of grepping... ] No. The only occurrence of O_DIRECT in the
> source tree is in TODO:
>
> * Consider use of open/fcntl(O_DIRECT) to minimize OS caching
>
> I personally disagree with this TODO item for the same reason Sean
> cited: Postgres is designed and tuned to rely on OS-level disk caching,
> and bypassing that cache is far more likely to hurt our performance than
> help it.

DB2 and Oracle, from memory, allow users to pass hints to the planner to
use/not use file system caching. This could be useful if you had an
application retrieving a large amount of data on an adhoc basis. The large
retrieval would empty out the disk cache there by negatively impacting
upon other applications operating on data which should be cached.

Gavin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message deststar 2003-06-18 00:09:58 Re: [HACKERS] sa_family_t in cygwin compile of cvs
Previous Message Peter Eisentraut 2003-06-17 22:31:50 Re: [HACKERS] CVS -Tip compile issue -- FreeBSD 4.8