mkfs: enable new features by default
Since the LTS is coming up, enable parent pointers and exchange-range by
default for all users. Also fix up an out of date comment.
I created a really stupid benchmarking script that does:
#!/bin/bash
# pptr overhead benchmark
umount /opt /mnt
rmmod xfs
for i in 1 0; do
umount /opt
mkfs.xfs -f /dev/sdb -n parent=$i | grep -i parent=
mount /dev/sdb /opt
mkdir -p /opt/foo
for ((i=0;i<5;i++)); do
time fsstress -n 100000 -p 4 -z -f creat=1 -d /opt/foo -s 1
done
done
This is the result of creating an enormous number of empty files in a
single directory:
# ./dumb.sh
naming =version 2 bsize=4096 ascii-ci=0, ftype=1, parent=0
real 0m18.807s
user 0m2.169s
sys 0m54.013s
naming =version 2 bsize=4096 ascii-ci=0, ftype=1, parent=1
real 0m20.654s
user 0m2.374s
sys 1m4.441s
As you can see, there's a 10% increase in runtime here. If I make the
workload a bit more representative by changing the -f argument to
include a directory tree workout:
-f creat=1,mkdir=1,mknod=1,rmdir=1,unlink=1,link=1,rename=1
naming =version 2 bsize=4096 ascii-ci=0, ftype=1, parent=1
real 0m12.742s
user 0m28.074s
sys 0m10.839s
naming =version 2 bsize=4096 ascii-ci=0, ftype=1, parent=0
real 0m12.782s
user 0m28.892s
sys 0m8.897s
Almost no difference here. If I then actually write to the regular
files by adding:
-f write=1
naming =version 2 bsize=4096 ascii-ci=0, ftype=1, parent=1
real 0m16.668s
user 0m21.709s
sys 0m15.425s
naming =version 2 bsize=4096 ascii-ci=0, ftype=1, parent=0
real 0m15.562s
user 0m21.740s
sys 0m12.927s
So that's about a 2% difference.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
1 file changed