Neil Conway wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > Another idea --- if fsync() is slow because it can't find the dirty
> > buffers, use write() to write the buffers, copy the buffer to local
> > memory, mark it as clean, then open the file with O_SYNC and write
> > it again.
> 
> Yuck.
> 
> Do we have any idea how many kernels are out there that implement
> fsync() as poorly as HPUX apparently does? I'm just wondering if we're
> contemplating spending a whole lot of effort to work around a bug that
> is only present on an (old?) version of HPUX. Do typical BSD derived
> kernels exhibit this behavior? What about Linux? Solaris?

Not sure, but it almost doesn't even matter --- any solution which has
fsync/O_SYNC/sync() in a critical path, even the path of replacing dirty
buffers --- is going to be too slow, I am afraid.  Doesn't matter how
fast fsync() is, it is going to be slow.  

I think Tom's only issue with HPUX is that even if fsync is out of the
critical path (background writer) it is going to consume lots of CPU
time finding those dirty buffers --- not sure how slow that would be.
If it is really slow on HPUX, we could disable the fsync's for the
background writer and just how the OS writes those buffers aggressively.

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to