Subject: Re: msdosfs performance problem
To: Michael van Elst <>
From: Chuck Silvers <>
List: tech-kern
Date: 11/30/2005 16:58:25
On Wed, Nov 30, 2005 at 08:09:34PM +0100, Michael van Elst wrote:
> On Wed, Nov 30, 2005 at 08:00:20AM -0800, Chuck Silvers wrote:
> Hi Chuck,
> > > I guess there is no optimization done for overwriting complete pages
> > > and the old data is first read from the disk before it gets overwritten.
> > 
> > that's right, for over-writing existing pages of a file, we currently
> > read the page in from backing store before overwriting it.
> what about newly allocated pages? msdosfs still shows the same behaviour.
> Could that be caused by msdofs extending files first and then "rewriting"
> the new pages.

yea, that's exactly what msdosfs does.

> > > If that is right, how do other filesystems avoid this problem?
> > 
> > they don't.
> Then I should see the same behaviour for ufs, but I don't.

ffs optimizes extending writes such that nothing is read from disk
and pages are not redundantly zeroed before being filled with new data
(for pages that will be completely filled with application data).
but overwrites of existing pages will read the old data from disk.
(I'm assuming you're talking about netbsd's ffs/ufs... some other OSs'
implementations have additional optimizations to avoid reading the
old data.)