Tweak XFS performance
May 2, 2011 00:00 · 107 words · 1 minute read
XFS is a fast file system, but it can be tweaked to be a little bit faster. Here are the tweaks I use with my disks:
You can create the xfs filesystem with a 128-megabyte log and 8 allocation groups.
# mkfs.xfs -f -l internal,size=128m -d agcount=8 /dev/md0
After that you can mount the filesystem with 8 log buffers, and atime and diratime disabled. Note that the mount line below also passes nobarrier - it is faster, but it trades away some crash safety, so think twice before you copy it.
# mount -t xfs /dev/md0 /mnt/gentoo -o noatime,nodiratime,nobarrier,logbufs=8
Also do NOT forget to align your partitions.