Things to do this week instead of arguing about mixers

Daniel P. Berrange berrange at redhat.com
Mon Apr 27 20:52:50 UTC 2009


On Mon, Apr 27, 2009 at 03:42:32PM -0500, Eric Sandeen wrote:
> Daniel P. Berrange wrote:
> > On Mon, Apr 27, 2009 at 02:10:10PM -0500, Eric Sandeen wrote:
> >> Now that we have ext4 as the new default filesystem, it'd be nice if we
> >> can get more applications to take advantage of some of the features.
> >>
> >> One big feature that has already been brought up on the list[1] is file
> >> preallocation, which allows an application to pre-allocate blocks it
> >> knows that it will eventually write into, thereby making sure it won't
> >> run out of space, and also generally getting a more efficient/contiguous
> >> file layout.
> >>
> >> * Come up with a list of apps which could benefit:
> > [snip]
> >>   - virt image tools?
> > 
> > We're one step ahead of you !  libvirt supports it as of 0.6.3 for its
> > raw file storage management APIs, and this is in Fedora 11 trees
> 
> Cool!
> 
> > http://git.et.redhat.com/?p=libvirt.git;a=commit;h=70e7672184ff639856d5f2f3bf7849464031dff9
> > 
> > Thanks to Amit Shah for doing the patch for us, and providing us some
> > compelling performance figures at the same time:
> > 
> > http://www.amitshah.net/2009/03/comparison-of-file-systems-and-speeding.html
> 
> Ah, that explains the call to posix_fallocate() I saw in the library :)
> 
> Just FWIW, this will still be slow on ext3, but fast on
> ext4/xfs/btrfs/ocfs2 - as Amit's blog entry shows, I guess.
> 
> If you didn't want to fall back to the slow behavior on ext3, you might
> consider only using fallocate() if it's there, rather than
> posix_fallocate().  But the behavior is up to you of course.  :)

For this particular use case we want to it always fully allocate the
blocks, even if that means slowly writing lots of zeros. We run this
code in the background anyway, so it wouldn't block apps completely
in the slow path.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the devel mailing list