Re: More on 2.1.65 slowdown (disc thrashing)

Andi Kleen (ak@muc.de)
21 Nov 1997 17:20:58 +0100


alan@lxorguk.ukuu.org.uk (Alan Cox) writes:

> > > fsync ( fileno (fp) );
> >
> > IIRC the fsync() function in ext2 was changed into a plain sync(). The
> > reason for this is that fsync() was extremely slow on large files, much
> > slower than a full sync would be.
> >
> > Perhaps the decision to sync or fsync could be made on the basis of the
> > file size?
>
> When I played with that for 2.0 the break point seems to between about 1 and
> 3Mbytes depending on RAM, disks etc. fsync is normally done on small files
> so it would be good to handle it nicely

syslogd is the most prominent user of fsync() and log files tend to grow
big..

-Andi