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: | jim(at)nasby(dot)net, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: O_DIRECT in freebsd |
Date: | 2003-06-18 14:05:34 |
Message-ID: | 200306181405.h5IE5Yd13123@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Also, keep in mind writes to O_DIRECT devices have to wait for the data
to get on the platters rather than into the kernel cache.
---------------------------------------------------------------------------
Tom Lane wrote:
> "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> >> DB2 and Oracle, from memory, allow users to pass hints to the planner to
> >> use/not use file system caching.
>
> > Might it make sense to do this for on-disk sorts, since sort_mem is
> > essentially being used as a disk cache (at least for reads)?
>
> If sort_mem were actually being used that way, it might be ... but it
> isn't, and so I doubt O_DIRECT would be an improvement. It seems more
> likely to force disk I/O that otherwise might not happen at all, if the
> kernel happens to have sufficient buffer space on hand.
>
> I'll concede though that a large sort would probably have the effect of
> blowing out the kernel's disk cache. So while O_DIRECT might be a net
> pessimization as far as the sort itself is concerned, it would probably
> be more friendly to the rest of the system, by leaving disk buffers free
> for more productive uses. It'd all depend on your workload ...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2003-06-18 14:35:37 | Re: pg_get_triggerdef in pg_dump |
Previous Message | Bruce Momjian | 2003-06-18 14:03:29 | Re: information Windows - PostgreSQL |