sync async threads throughput throughput XFS ext4 XFS ext4 1 1.90/124k 1.41/92k 1.72/112k 1.41/92k 2 1.01/64k 1.65/108k 0.97/62k 1.65/108k 4 0.27/17k 1.55/102k 0.21/13k 1.55/102k 8 0.13/8k 1.45/95k 0.15/9k 1.45/95k 16 0.12/7k 1.45/95k 0.12/7k 1.45/95k
It’s pretty clear from these results that lock contention is killing XFS as the thread count grows. ext4 performance shows that it uses exclusive locking as well, but it is not degrading like XFS is due to different lock types being used. 但是當xfs的鎖爭用bug解決之後:
sync async threads throughput throughput vanilla patched vanilla patched 1 1.90/124k 1.83/120k 1.72/112k 1.69/111k 2 1.01/64k 2.85/185k 0.97/62k 2.57/168k 4 0.27/17k 3.68/241k 0.21/13k 3.41/223k 8 0.13/8k 4.42/290k 0.15/9k 4.16/273k 16 0.12/7k 4.95/325k 0.12/7k 4.86/319k
Throughput scales with thread count – each thread runs at 100% CPU utilsation, and XFS gets up to 3x as much throughput as ext4 does. So, basically, XFS is still the file system you want for direct IO。 掛在文件時的優化(noatime,nodiratime): mount –t ext4 –o rw,noatime,nodiratime /dev/sda6 /data noatime 會有0-10%的性能提升,一般平均會有3%的性能提升。 noatime: Do not update inode access times on this filesystem (e.g, for faster access on the news spool to speed up news servers). nodiratime: Do not update directory inode access times on this filesystem. noatime,nodiratime的配置也可以在/etc/fstab中進行。