mkfs compared on different filesystems

How long does it take to mkfs a 10GB disk with all the different filesystems out there?

See my test results here using the new guestfish sparse / filesystem support. btrfs is “best” and ext3 comes off “worst”.

As a test this is interesting, but it’s not that relevant for most users — they will be most interested in how well the filesystem performs for their workload, which is not affected by mkfs time and hard to measure in general benchmarks anyway.

Update

In response to Stephen’s comment, I retested this using a memory-backed block device so there is no question about whether the host backing store affects the test:

$ for fs in ext2 ext3 ext4 xfs jfs reiserfs nilfs2 ntfs msdos btrfs hfs hfsplus gfs gfs2
    do guestfish sparse /dev/shm/test.img 10G : run : echo $fs : sfdiskM /dev/sda , : \
        time mkfs $fs /dev/sda1
    done
ext2
elapsed time: 1.45 seconds
ext3
elapsed time: 2.71 seconds
ext4
elapsed time: 2.58 seconds
xfs
elapsed time: 0.13 seconds
jfs
elapsed time: 0.27 seconds
reiserfs
elapsed time: 0.33 seconds
nilfs2
elapsed time: 0.08 seconds
ntfs
elapsed time: 2.07 seconds
msdos
elapsed time: 0.14 seconds
btrfs
elapsed time: 0.07 seconds
hfs
elapsed time: 0.17 seconds
hfsplus
elapsed time: 0.17 seconds
gfs
elapsed time: 0.84 seconds
gfs2
elapsed time: 2.76 seconds
About these ads

4 Comments

Filed under Uncategorized

4 responses to “mkfs compared on different filesystems

  1. Stephen Smoogen

    Isn’t that a comparison of a filesystem ontop of another filesystem or were those real hardware underneath? [Or was it a filesystem inside of memory?]

    Now the question is how long does it take fsck each of those as that is something people will really really feel :)

  2. rich

    Stephen,

    guestfish runs a virtual machine (appliance) and the disks attached to that are on a filesystem. In the case of these tests, that was an ext4 filesystem. It is possible also to use memory instead of a backing file, or (if you run this as root) a physical device. However (probably) the overhead of that should be the same for all of those tests.

    It is possible to use guestfish to test fsck times too. But it’s hard to determine a good test that would be relevant to users.

  3. mkntfs zero-fills the entire volume by default. There is a huge difference in time if this is turned off by the -f/–fast/-Q/–quick command line option (which actually we should have done already years ago).

    In my case, it’s 1.53 vs 0.03 seconds.

    This suggests that apparently mkntfs is the fastest.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s