I created a new filesystem on a 232.9 GB partition on a 500 GB external USB drive that will be used as backup storage for dump files. Out of curiosity, I recreated the filesystem using FFS2 (I never created an FFS2 before). I noticed it was much faster, so I clocked it for comparison:

# ### FFS ###
# time newfs -O 1 sd1a
   ...
    1m55.04s real     0m0.26s user     0m0.40s system
# time fsck -f /dev/rsd1a
...
    1m13.89s real     0m0.30s user     0m0.10s system
# dumpfs -m sd1a
newfs -O 1 -b 32768 -e 8192 -f 4096 -g 16384 -h 64 -m 5 -o time -s 488353792 sd1a


# ### FFS2 ###
# time newfs -O 2 sd1a
   ...
    0m3.98s real     0m0.20s user     0m0.02s system
# time fsck -f /dev/rsd1a
...
    0m7.58s real     0m0.40s user     0m0.16s system
# dumpfs -m sd1a
newfs -O 2 -b 32768 -e 4096 -f 4096 -g 16384 -h 64 -m 5 -o time -s 488353792 sd1a

# ### END ###

The only difference in the default parametrization of `newfs` is the "max blocks per group" (-e). So I also tried `-e 4096` for FFS, but that did not change the result, still slow.

A quick search of FFS vs FFS2 returns mailing list threads that mention FFS and FFS2 are identical in performance. The only difference, which the manual also states, is that FFS is the default for less than 1 TB filesystems while FFS2 becomes the default for larger filesystems.

I'm on an old snapshot, so maybe this is irrelevant:

OpenBSD 5.2-current (GENERIC.MP) #1: Wed Aug 29 21:17:12 MDT 2012
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Nonetheless, I just thought it was interesting that the real time executions are an order of a magnitude different. Any thoughts?

Reply via email to