Re: fsync delays for a long time.

Andrew Morton
2002-02-14T21:22:13Z

Alan Cox wrote:
>
> > > fsync on a very large file is very slow on the 2.2 kernels
> >
> > This could very well be due to request allocation starvation.
> > fsync is sleeping in __get_request_wait() while bonnie keeps
> > on stealing all the requests.
>
> That may amplify it but in the 2.2 case fsync on any sensible sized file
> is already horribly performing. It hits databases like solid quite badly

I'm surprised. ext2's fsync in 2.2 is in fact quite optimal: a single
pass across the block tree, in probable-LBA-order. No livelock potential
there. Optimal. Note that it implements "only sync the stuff which was
dirty on entry" semantics.

But msync() is a different kettle of fish. It calls file_fsync(), which
syncs the entire device, livelockably. Are you sure `solid' is not
using msync?

-