linux下几种文件系统的测试比较
在linux下对部分文件系统进行测试
一、
我的实验平台
我使用的是vmware workstation7.1.4.16648 虚拟机
安装的操作系统信息
[[email protected] ~]# uname -r
2.6.18-274.3.1.el5.centos.plusPAE
[[email protected] ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
安装软件包,由于我的内核不支持这些文件系统所以要从新编译内核。这里为了方便直接使用rpm包
当然你可以自己选择你要安装的软件包。
jfsutils-1.1.12-1.i386.rpm
kmod-xfs-0.4-2.i686.rpm
reiserfs-utils-3.6.19-2.4.1.i386.rpm
kernel-PAE-2.6.18-274.3.1.el5.centos.plus.i686.rpm
kmod-xfs-PAE-0.4-2.i686.rpm
xfsprogs-2.9.4-1.el5.centos.i386.rpm
iozone-3-397.i386.rpm 测试软件
安装好之后需要重启,在开机的时候按c选择新内核。
创建挂载点
mkdir /test
创建测试文件
echo ok > a.txt
创建一个分区大小为5G
fdisk /dev/sda6
partprobe /dev/sda
定义变量
[[email protected] ~]# export PATH=$PATH:/opt/iozone/bin/
二、测试
格式化并挂载
[[email protected] ~]# mkfs.jfs /dev/sda6
[[email protected] ~]# mount /dev/sda6 /test
[[email protected] ~]# cp a.txt /test
[[email protected] ~]# cat /test/a.txt
ok
[[email protected] ~]# iozone -a -s 256M -y 512 -q 16384 -i 0 -i 1 -i 2 -f /test/a.txt -Rb /root/jfs.out
换用另外一种文件系统。
[[email protected]~]#umount /test
[[email protected] ~]# mkfs.msdos /dev/sda6
[[email protected] ~]# mount /dev/sda6 /test/
[[email protected] ~]# mount | grep /dev/sda6
/dev/sda6 on /test type vfat (rw)
[[email protected] ~]# cp a.txt /test
[[email protected] ~]# iozone -a -s 256M -y 512 -q 16384 -i 0 -i 1 -i 2 -f /test/a.txt -Rb /root/msdos.out
[[email protected]~]#umount /test
[[email protected] ~]# mkfs.reiserfs /dev/sda6
[[email protected] ~]# mount /dev/sda6 /test/
[[email protected] ~]# mount | grep /dev/sda6
/dev/sda6 on /test type reiserfs (rw)
[[email protected] ~]# cp a.txt /test
[[email protected] ~]# iozone -a -s 256M -y 512 -q 16384 -i 0 -i 1 -i 2 -f /test/a.txt -Rb /root/reiserfs.out
[[email protected]~]#umount /test
[[email protected] ~]# mkfs.vfat /dev/sda6
[[email protected] ~]# mount /dev/sda6 /test/
[[email protected] ~]# mount | grep /dev/sda6
/dev/sda6 on /test type vfat (rw)
[[email protected] ~]# cp a.txt /test
[[email protected] ~]# iozone -a -s 256M -y 512 -q 16384 -i 0 -i 1 -i 2 -f /test/a.txt -Rb /root/vfat.out
[[email protected]~]#umount /test
[[email protected] ~]# mkfs.ext2 /dev/sda6
[[email protected] ~]# mount /dev/sda6 /test/
[[email protected] ~]# mount | grep /dev/sda6
/dev/sda6 on /test type ext2 (rw)
[[email protected] ~]# cp a.txt /test
[[email protected] ~]# iozone -a -s 256M -y 512 -q 16384 -i 0 -i 1 -i 2 -f /test/a.txt -Rb /root/ext2.out
[[email protected]~]#umount /test
[[email protected] ~]# mkfs.ext3 /dev/sda6
[[email protected] ~]# mount /dev/sda6 /test/
[[email protected] ~]# mount | grep /dev/sda6
/dev/sda6 on /test type ext3 (rw)
[[email protected] ~]# cp a.txt /test
[[email protected] ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory deadline [cfq] 我这里使用的是cfq的调度器。当然可以选其它的。
[[email protected] ~]# iozone -a -s 256M -y 512 -q 16384 -i 0 -i 1 -i 2 -f /test/a.txt -Rb /root/ext3.out
上面的几步生成的文件在/root目录下。现在我们把他们拷贝到windows物理机上,使用excel表格对其进行查看并生成图表。他们分别是jfs.out msdos.out vfat.out reiserfs.out ext2.out ext3.out
将他们的数据进行汇总。生成如下表格。
Writer Report
|
||||||
512
|
1024
|
2048
|
4096
|
8192
|
16384
|
|
vfat
|
128993
|
295256
|
290324
|
216991
|
266363
|
285530
|
reiserfs
|
188279
|
326756
|
395590
|
334815
|
372086
|
304915
|
msdos
|
109272
|
298102
|
288295
|
76501
|
69384
|
68879
|
jfs
|
117993
|
123613
|
334155
|
368279
|
356599
|
255912
|
ext3
|
123353
|
268012
|
278477
|
300236
|
287828
|
292127
|
ext2
|
214527
|
395795
|
379014
|
336805
|
280937
|
243431
|
Re-writer Report
|
||||||
512
|
1024
|
2048
|
4096
|
8192
|
16384
|
|
vfat
|
360347
|
392229
|
418957
|
341449
|
323572
|
342254
|
reiserfs
|
369994
|
319204
|
372478
|
305264
|
331936
|
334218
|
msdos
|
391910
|
391711
|
460153
|
327675
|
359518
|
351287
|
jfs
|
381317
|
451540
|
311273
|
368121
|
367546
|
322160
|
ext3
|
332748
|
342744
|
304882
|
254195
|
290173
|
251773
|
ext2
|
329912
|
331276
|
276586
|
302740
|
258146
|
248679
|
Reader Report
|
||||||
512
|
1024
|
2048
|
4096
|
8192
|
16384
|
|
vfat
|
3958807
|
2285514
|
1672146
|
1659643
|
1705112
|
1704681
|
reiserfs
|
3262687
|
2129694
|
1704313
|
1697121
|
1706778
|
1699189
|
msdos
|
3857616
|
2243231
|
1682449
|
1687343
|
1701559
|
1688820
|
jfs
|
3542629
|
2397883
|
1678367
|
1695550
|
1659328
|
1668687
|
ext3
|
2883621
|
2135539
|
1570129
|
1642003
|
1535582
|
1656151
|
ext2
|
3727445
|
2193565
|
1672242
|
1675416
|
1690466
|
1701349
|
Re-reader Report
|
||||||
512
|
1024
|
2048
|
4096
|
8192
|
16384
|
|
vfat
|
3596675
|
2366473
|
1674281
|
1660916
|
1703285
|
1715119
|
reiserfs
|
3454671
|
2162012
|
1699794
|
1702984
|
1708402
|
1713942
|
msdos
|
3960472
|
2085224
|
1701349
|
1694673
|
1634192
|
1722206
|
jfs
|
3806632
|
2396068
|
1687148
|
1707689
|
1687680
|
1683768
|
ext3
|
3900656
|
2151243
|
1547175
|
1660895
|
1587634
|
1657670
|
ext2
|
3862612
|
2102095
|
1691448
|
1677506
|
1691262
|
1704834
|
Random Read Report
|
||||||
512
|
1024
|
2048
|
4096
|
8192
|
16384
|
|
vfat
|
3701606
|
2332161
|
1678883
|
1683032
|
1704036
|
1704191
|
reiserfs
|
3380850
|
2160211
|
1708647
|
1720489
|
1727847
|
1694882
|
msdos
|
3921664
|
2184405
|
1690663
|
1691798
|
1716793
|
1636507
|
jfs
|
3498755
|
2380488
|
1703650
|
1712263
|
1680075
|
1718493
|
ext3
|
3724798
|
2147630
|
1638185
|
1688050
|
1665486
|
1656381
|
ext2
|
3828926
|
2259706
|
1692540
|
1681810
|
1688495
|
1700169
|
Random Write Report
|
||||||
512
|
1024
|
2048
|
4096
|
8192
|
16384
|
|
vfat
|
301743
|
286053
|
361601
|
369892
|
301592
|
325591
|
reiserfs
|
246132
|
291344
|
258925
|
259856
|
336348
|
317177
|
msdos
|
279234
|
304020
|
314028
|
346769
|
318278
|
371848
|
jfs
|
252826
|
317921
|
308659
|
296387
|
388753
|
357928
|
ext3
|
211595
|
274346
|
252266
|
330400
|
229209
|
292664
|
ext2
|
267525
|
304389
|
271809
|
251311
|
331283
|
297469
|
转载于:https://blog.51cto.com/abliq/672461