- 论坛徽章:
- 0
|
参考:
http://zhouqimin.spaces.live.com ... 7BB91235B!216.entry
linux系统下,常见文件系统性能简单对比,主要比较大文件读写,小文件读写。
很多文章没有将ntfs和fat32纳入对比,可能考虑到效率,但驱动发展这么多年了我认为和原生的windows不会有太多差别。
ntfs读写基于ntfs-3g。由于软件仓库和内核配置的不便,没有比较reiser4,zfs,btrfs等。
测试时,写文件采用cp命令,从本地盘其它分区复制文件到同一个新格式化的目标分区。
由于写大文件时,时间包括读的时间,故写大文件的时间都减去ext3文件读的大概时间37.5,得到如下统计数据:
Write-big Read-big Write-small Read-small
fat32 47.396 37.407 61.839 1.212
ntfs 63.120 37.158 69.434 7.668
hpfs+ 34.859 37.196 41.798 0.970
ext2 35.151 37.039 40.871 0.357
ext3 34.291 37.542 52.092 0.587
ext4 29.908 37.164 37.876 0.746
jfs 36.019 37.168 73.001 0.579
reiserfs 35.138 38.020 51.239 1.248
xfs 25.786 37.007 116.260 0.516
可见,综合性能较好的依次为ext2,ext4,ext3。
其它的,都有拖后腿的项。最差的,是ntfs,较差的是fat32。
如果考虑到长期使用会产生文件碎片,则最好的是ext4。
----------------------------------------------------------------------------------
详细数据如下:
ls /mnt/sda6/2009-08-23-winxp-sp3/ -lh
总计 1.3G
-rw------- 1 root root 1.3G 08-23 03:31 sda1.000
-------------------------------
fat32:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m24.896s
user 0m0.073s
sys 0m14.230s
read big file:
time cat sda1.000 > /dev/null
real 0m37.407s
user 0m0.116s
sys 0m4.135s
write small file:
time cp /usr/portage/dev* ./ -r
real 1m1.839s
user 0m0.300s
sys 0m9.708s
read small files:
time tar cf - dev* > /dev/null
real 0m1.212s
user 0m0.106s
sys 0m0.895s
--------------------------------
ntfs:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m40.620s
user 0m0.133s
sys 0m8.084s
read big file:
time cat sda1.000 > /dev/null
real 0m37.158s
user 0m0.186s
sys 0m2.912s
write small file:
time cp /usr/portage/dev* ./ -r
real 1m9.434s
user 0m0.445s
sys 0m4.545s
read small files:
time tar cf - dev* > /dev/null
real 0m7.668s
user 0m0.169s
sys 0m0.936s
---------------------------------------------------
hpfsplus:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m12.359s
user 0m0.085s
sys 0m8.183s
read big file:
time cat sda1.000 > /dev/null
real 0m37.196s
user 0m0.124s
sys 0m5.140s
write small files:
time cp /usr/portage/dev* ./ -r
real 0m41.798s
user 0m0.253s
sys 0m7.059s
read small files:
time tar cf - dev* > /dev/null
real 0m0.970s
user 0m0.098s
sys 0m0.676s
------------------------------------
ext2:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m12.651s
user 0m0.081s
sys 0m9.768s
read big file:
time cat sda1.000 > /dev/null
real 0m37.039s
user 0m0.106s
sys 0m3.865s
write small files:
time cp /usr/portage/dev* ./ -r
real 0m40.871s
user 0m0.275s
sys 0m3.806s
read small files:
time tar cf - dev* > /dev/null
real 0m0.357s
user 0m0.116s
sys 0m0.242s
-------------------------------------
ext3
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m11.791s
user 0m0.095s
sys 0m16.565s
read big files:
time cat sda1.000 > /dev/null
real 0m37.542s
user 0m0.102s
sys 0m4.021s
write small files:
time cp /usr/portage/dev* ./ -r
real 0m52.092s
user 0m0.299s
sys 0m5.008s
read small files:
time tar cf - dev* > /dev/null
real 0m0.587s
user 0m0.123s
sys 0m0.308s
--------------------------------------
ext4:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m7.408s
user 0m0.089s
sys 0m11.204s
read big files:
time cat sda1.000 > /dev/null
real 0m37.164s
user 0m0.121s
sys 0m4.143s
write small files:
time cp /usr/portage/dev* ./ -r
real 0m37.876s
user 0m0.282s
sys 0m4.861s
read small files:
time tar cf - dev* > /dev/null
real 0m0.746s
user 0m0.104s
sys 0m0.292s
------------------------------------------
jfs:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m13.519s
user 0m0.095s
sys 0m9.604s
read big files:
time cat sda1.000 > /dev/null
real 0m37.168s
user 0m0.097s
sys 0m4.194s
write small files:
time cp /usr/portage/dev* ./ -r
real 1m13.001s
user 0m0.302s
sys 0m4.578s
read small files:
time tar cf - dev* > /dev/null
real 0m0.579s
user 0m0.124s
sys 0m0.266s
------------------------------------------
reiserfs:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m12.638s
user 0m0.090s
sys 0m20.041s
read big files:
time cat sda1.000 > /dev/null
real 0m38.020s
user 0m0.116s
sys 0m5.662s
write small files:
time cp /usr/portage/dev* ./ -r
real 0m51.239s
user 0m0.318s
sys 0m8.380s
read small files:
time tar cf - dev* > /dev/null
real 0m1.248s
user 0m0.155s
sys 0m0.490s
----------------------------------------
xfs:
write big file:
time cp /mnt/sda6/2009-08-23-winxp-sp3/sda1.000 ./
real 1m3.286s
user 0m0.084s
sys 0m8.669s
read big files:
time cat sda1.000 > /dev/null
real 0m37.007s
user 0m0.119s
sys 0m4.171s
write small files:
time cp /usr/portage/dev* ./ -r
real 1m56.260s
user 0m0.351s
sys 0m5.605s
read small files:
time tar cf - dev* > /dev/null
real 0m0.516s
user 0m0.108s
sys 0m0.299s |
|