btrfs ext4 xfs性能比较
2021年5月2日创建了三个分区,总容量都是50G。发现XFS占用的元数据最多,其次是ext4;btrfs元数据最少。
BTRFS | EXT4 | XFS | |
---|---|---|---|
git add . | real 21m23.858s user 17m8.905s sys 1m43.146s |
real 30m5.863s user 21m13.333s sys 2m41.837s |
real 26m8.169s user 19m3.882s sys 2m36.098s |
git commit | real 5m41.189s user 4m9.084s sys 0m43.782s |
real 13m47.376s user 6m51.124s sys 2m37.119s |
real 9m54.621s user 5m36.699s sys 1m59.425s |
git gc | real 41m45.560s user 62m45.492s sys 5m52.132s |
real 46m1.580s user 63m24.969s sys 4m31.180s |
real 52m18.160s user 67m40.972s sys 4m55.289s |
结论:在这三种文件系统中,BTRFS对Git(大量小文件)的支持最好。