[linux-audio-dev] Re: File writes with O_SYNC slow

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Re: File writes with O_SYNC slow
From: Eric W. Biederman (ebiederm+eric_AT_ccr.net)
Date: Thu Apr 20 2000 - 10:02:31 EEST


"Benjamin C.R. LaHaise" <blah_AT_kvack.org> writes:

> On Wed, 19 Apr 2000, Karl JH Millar wrote:
>
> > Furthermore, doing a write and then a fsync should be *just* as slow as a
> > synchronous write, but I'm measuring it as over 10 times faster.
>
> Doing synchronous writes involves synching metadata for every 4KB of data,
> not the entire 256KB chunk.

Or more precisely for ever (data or indirect) block appended to the
file there is a metadata sync. Plus a forced write of the data
blocks every 32 data blocks written...

The metadata sync will kill you on appends whichever way you slice it.

For the practical effect of keeping dirty buffers down write+fsync
looks like a better choice than using O_SYNC...

Eric


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Apr 20 2000 - 10:14:37 EEST