xfs
[Top] [All Lists]

Re: avoid mbox file fragmentation

To: Peter Grandi <pg@xxxxxxxxxxxxxxxxxx>
Subject: Re: avoid mbox file fragmentation
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 21 Oct 2010 13:00:09 +1100
Cc: Linux XFS <xfs@xxxxxxxxxxx>
In-reply-to: <19646.55189.843933.481529@xxxxxxxxxxxxxxxxxx>
References: <4CBE2403.8070108@xxxxxxxxxxxxxxxxx> <20101019234217.GD12506@dastard> <19646.55189.843933.481529@xxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Wed, Oct 20, 2010 at 12:50:45PM +0100, Peter Grandi wrote:
> However, I am a fan of having *default* physical preallocation,
> because as a rule one can trade off space for speed nowadays, and
> padding files with "future growth" tails is fairly cheap, and one
> could modify the filesystem code or 'fsck' to reclaim unused space
> in "future grown" tails.

When writing lots of small files (e.g. unpacking a kernel tarball),
leaving space at the file tail due to preallocation (that will never
get used) means that the file data is now sparse on disk instead of
packed into adjacent blocks.

The result? Instead of the elevate merging adjacent file data IOs
into a large IO, they all get issued individually, and the seek
count for IO goes way up. Not truncating away the specualtive
prealocation beyond EOF will cause this, too, and that slows down
such workloads by an order of magnitude....

So, Peter, you don't get the pony because we gave it to someone
else. ;)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>