Re: More on 2.1.65 slowdown (disc thrashing)

Richard Gooch (rgooch@atnf.CSIRO.AU)
Sat, 22 Nov 1997 10:58:28 +1100


Janos Farkas writes:
> On Fri, Nov 21, 1997 at 09:17:08PM +1100, Richard Gooch wrote:
> > Hi, all. To followup on my previous message where I reported a
> > slowdown and increased disc head movement when running latex2html on a
> > document, I've had a look at what perl does and distilled the essence.
>
> > fsync ( fileno (fp) );
>
> Just recently, fsync has been changed to unconditionally call sync(),
> because it has been found that fsync on very large files can take
> enormous times (even hours!). This is because it wanted to sync all
> the indirect blocks in addition to the changed data blocks, so it
> could be unbearably slow. Now, it seems making this to sync() always
> is not too wise either. Possibly the best thing would be to do
> this only on substantially large files (>64M or so). Maybe making
> fdatasync() work in the same shot would be nice too, before the VFS
> interface will be frozen...

OK... dumb question: why did fsync() need to write the indirect
blocks? I presume that indirect blocks are not always changing, so why
bother rewriting?

Regards,

Richard....