Re: More on 2.1.65 slowdown (disc thrashing)

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Mon, 24 Nov 1997 13:08:21 +0100 (MET)


On Fri, 21 Nov 1997, Janos Farkas wrote:

> 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.

Unacceptable when a device sync is faster :)

> 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...

Well, we could just fsync all files with:
- only direct and single indirect blocks
- files that only have <= xx dirty blocks in-core

And files with double / triple indirect blocks can be
dev-synced (maybe even an 'asynchronous sync'... :-)

Rik.

----------
Send Linux memory-management wishes to me: I'm currently looking
for something to hack...