HAMMER version 2 ready for testing on master branch

Matthew Dillon dillon at apollo.backplane.com
Sun Jun 28 12:36:36 PDT 2009


    HAMMER now supports upgrading to version 2 via the hammer
    version-upgrade directive.  This is currently only available on the
    master development branch.  Though I am confident that I won't break the
    filesystem, please only upgrade if you are willing to lose the FS.
    After a week or so the feature should be tested well enough.

    When upgrading using the 'hammer version-upgrade <fs> 2' directive, be
    sure you are running the latest and greatest from the master branch.
    If you are running an older HAMMER, the version-upgrade will fail with
    an error.  DO NOT FORCE IT.  Do not use the 'force' directive.  If you
    do this with an old HAMMER VFS you will get an old WIP and break your
    filesystem.  Use 'hammer version <fs>' to list available versions and
    be sure that that version 2 is marked 'NORM', not 'WIP'.

    Note that the older version 1 HAMMER VFS will not be able to read
    directories created by version 2.  Also note that directories which
    existed prior to the upgrade will still use the old layout.

    --

    Once upgraded, any new directories created in the HAMMER fs will place
    the directory entry B-Tree elements in the same B-Tree localization
    domain as the inode elements.  This change significantly improves 'find'
    and 'ls -lR' times, and moderately improves tar-up and cpdup times.

    However, the initial B-Tree layout is still horrendously bad so you will
    not see the improvement with newly laid-down directory trees until after
    you reblock the btree via 'hammer reblock-btree'.  I'm working on the
    initial B-Tree layout issue.  Ultimately, though, it's not a big deal
    since the B-tree is reblocked daily anyway.

    Tests (after reblock-btree) on 20 copies of /usr/src: 862924 files / 15GB:

    test29:/root# /usr/bin/time find /mnt/test.<blah> | wc -l
	45.49 real         0.60 user         5.91 sys		OLD
	28.73 real         0.57 user         4.92 sys		NEW
	(58% improvement)

    test29:/root# /usr/bin/time find /mnt/test.<blah> -ls | wc -l
	49.74 real         3.74 user        18.41 sys		OLD
	36.28 real         3.71 user        17.98 sys		NEW
	(37% improvement)

    test29:/root# /usr/bin/time tar cf - /mnt/test.<blah> | wc -c
 	820.87 real        10.53 user        94.41 sys		OLD
	745.51 real         9.81 user        92.86 sys		NEW
	(10% improvement)

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Kernel mailing list