环境是vbox虚拟机下面的Ubuntu14.04LTS。
测试工具是iozone,使用如下指令。
time iozone -i0 -i1 -g16M -n16M -aI
先来看xfs下面的测试结果。
KB reclen write rewrite read reread 16384 4 19876 21476 9138 9301 16384 8 37581 40067 14217 17411 16384 16 73332 83779 27556 32186 16384 32 105489 113865 40962 54091 16384 64 134065 135160 68299 83021 16384 128 146964 149977 110950 141755 16384 256 149715 137343 160200 191708 16384 512 168248 144506 189436 248133 16384 1024 132793 139397 207721 277869 16384 2048 132949 133511 273983 331338 16384 4096 123000 148125 323698 352565 16384 8192 156489 123381 375348 393959 16384 16384 159037 148396 391325 410133 iozone test complete. real 0m15.917s user 0m0.248s sys 0m2.841s
再来看看ext4的。
KB reclen write rewrite read reread 16384 4 18430 18480 6998 6775 16384 8 33112 36112 11438 12414 16384 16 68939 72004 22202 24436 16384 32 98636 117864 39044 43731 16384 64 133008 143006 68180 57096 16384 128 153730 147185 100729 118309 16384 256 137746 145158 150317 167784 16384 512 120772 137821 205707 222197 16384 1024 144137 134827 202466 287423 16384 2048 152712 142612 266181 338671 16384 4096 144987 148278 319171 345078 16384 8192 161927 139666 395033 403686 16384 16384 145343 144820 457691 445409 iozone test complete. real 0m18.967s user 0m0.268s sys 0m2.889s
反复测试的结果相同。xfs效能优于ext4。