
> that works well enough to make it uncommon for backends to have to
> write dirty buffers for themselves.  If we can, then doing all the
> writes O_SYNC would not be a problem.

One problem with O_SYNC would be, that the OS does not group writes any 
more. So the code would need to eighter do it's own sorting and grouping
(256k) or use aio, or you won't be able to get the maximum out of the disks.

Andreas

Mon, 10 Nov 2003 16:51:21 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: Experimental patch for inter-page delay in VACUUM
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> One problem with O_SYNC would be, that the OS does not group writes any 
> more. So the code would need to eighter do it's own sorting and grouping
> (256k) or use aio, or you won't be able to get the maximum out of the disks.

Or just run multiple writer processes, which I believe is Oracle's
solution.

			regards, tom lane

Mon, 10 Nov 2003 10:54:53 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Experimental patch for inter-page delay in VACUUM 
Tom Lane wrote:
> "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> > One problem with O_SYNC would be, that the OS does not group writes any 
> > more. So the code would need to eighter do it's own sorting and grouping
> > (256k) or use aio, or you won't be able to get the maximum out of the disks.
> 
> Or just run multiple writer processes, which I believe is Oracle's
> solution.

Yes, that might need to be the final solution because the O_SYNC will be
slow.  However, that is a lot of "big wrench" solution to removing
sync() --- it would be nice if we could find a more eligant way.

In fact, one goffy idea would be if the OS does sync every 30 seconds to
just write() the buffers and wait 30 seconds for the OS to issue the
sync, then recycle the WAL buffers --- again, just a crazy thought.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Mon, 10 Nov 2003 14:03:56 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Experimental patch for inter-page delay in VACUUM