• 最新动态
  • 315 MB/s real4m33.037s user0m1.952s sys1m23.991s [root@deve

    作者:U盘装系统 文章来源:u盘装系统 发布时间:2015-08-08 13:25点击:

    LINUX下磁盘IO机能测试评估与优化

    时间:2013-05-23 09:25来历: 作者:admin 点击: 次

    LINUX下磁盘IO机能测试评估: 一:dd 这不是一个专业的测试东西,不外假如对付测试功效的要求不是很苛刻的话,平时可以利用来 对磁盘的读写速度作一个简朴的评估. 观念描写: /dev/null:绰号

    接待各人分享本身的文档,请点击查阅:分享要领,
    假如你喜欢这文章,可以点击文章末了处百度分享,分享到你的各类社区保藏,或推荐给伴侣……

    LINUX下磁盘IO机能测试评估:

     

    一:dd

    这不是一个专业的测试东西,不外假如对付测试功效的要求不是很苛刻的话,平时可以利用来

    对磁盘的读写速度作一个简朴的评估.

     

    观念描写:

    /dev/null:绰号叫无底洞,你可以向它输出任何数据,它通吃,而且不会撑着!

    /dev/zero:是一个输入设备,你可你用它来初始化文件.

     

    /dev/null------它是空设备,也称为位桶(bit bucket)任何写入它的输出城市被丢弃,假如不

    想让动静以尺度输出显示或写入文件,那么可以将动静重定向到位桶.

     

    /dev/zero------该设备无穷尽地提供0,可以利用任何你需要的数目——设备提供的要多的多,

    他可以用于向设备或文件写入字符串0.

     

     

    测试情况:

    1.测试磁盘的IO写速度

    测试处事器:Dell R710 4块300G的sas硬盘做的raid5

    =======================================

    酒仙桥234处事器

    [root@club_c2 ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 4.11606 seconds, 597 MB/s

     

    real0m17.010s

    user0m0.059s

    sys0m5.323s

    [root@club_c2 ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 4.17078 seconds, 589 MB/s

     

    real0m19.993s

    user0m0.062s

    sys0m5.396s

    [root@club_c2 ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 4.13825 seconds, 594 MB/s

     

    real0m4.970s

    user0m0.053s

    sys0m4.662s

    [root@club_c2 ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 4.14597 seconds, 593 MB/s

     

    real0m15.880s

    user0m0.054s

    sys0m5.296s

    ======================================

     

    测试处事器:Dell R720 3块1T的sas硬盘做的raid 5

    ======================================

    [root@BJ-XYWY-TT-S ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 41.9644 s, 58.6 MB/s

     

    real0m42.761s

    user0m0.049s

    sys0m4.832s

    [root@BJ-XYWY-TT-S ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 57.8129 s, 42.5 MB/s

     

    real0m58.574s

    user0m0.064s

    sys0m5.321s

    [root@BJ-XYWY-TT-S ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 73.3101 s, 33.5 MB/s

     

    real1m14.115s

    user0m0.057s

    sys0m5.268s

    [root@BJ-XYWY-TT-S ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 57.1162 s, 43.0 MB/s

     

    real0m57.956s

    user0m0.053s

    sys0m5.266s

    ===================================

     

    结论:从以上数据比拟可以看出,写同样2.5GB的文件 旧处事器硬盘的写是新采购处事器的写速度

    的10倍以上。

     

    2.测试磁盘的IO读速度

    测试处事器:Dell R710 4块300G的sas硬盘做的raid5(为TT处事器 正在提供读处事的同时

    举办测试)

    ====================================

    [root@club_c2 ~]# df -m

    Filesystem           1M-blocks      Used Available Use% Mounted on

    /dev/sda2                79353     56963     18294  76% /

    /dev/sda5               469736    356678     88812  81% /data

    /dev/sda1                  190        12       169   7% /boot

    tmpfs                    16089         0     16089   0% /dev/shm

     

    [root@club_c2 ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485424+1 records in

    10485424+1 records out

    85896599040 bytes (86 GB) copied, 622.215 seconds, 138 MB/s

     

    real10m22.222s

    user0m2.020s

    sys1m29.195s

     

    [root@club_c2 ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485424+1 records in

    10485424+1 records out

    85896599040 bytes (86 GB) copied, 668.701 seconds, 128 MB/s

     

    real11m9.036s

    user0m2.009s

    sys1m30.678s

    ====================================

     

     

    测试处事器:Dell R720 3块1T的sas硬盘做的raid 5

    =====================================

    [root@BJ-XYWY-TT-S ~]# df -m

    Filesystem           1M-blocks      Used Available Use% Mounted on

    /dev/sda2                80635      4540     72000   6% /

    tmpfs                    16015         0     16015   0% /dev/shm

    /dev/sda1                  194        31       153  17% /boot

    /dev/sda5              1791905    193494   1507388  12% /data

     

    [root@BJ-XYWY-TT-S ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485760+0 records in

    10485760+0 records out

    85899345920 bytes (86 GB) copied, 288.598 s, 298 MB/s

     

    real4m48.600s

    user0m1.906s

    sys1m40.585s

     

    [root@BJ-XYWY-TT-S ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485760+0 records in

    10485760+0 records out

    85899345920 bytes (86 GB) copied, 289.268 s, 297 MB/s

     

    real4m49.285s

    user0m2.016s

    sys1m46.656s

     

    [root@BJ-XYWY-TT-S ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485760+0 records in

    10485760+0 records out

    85899345920 bytes (86 GB) copied, 289.126 s, 297 MB/s

     

    real4m49.142s

    user0m1.915s

    sys1m44.174s

    ===================================

     

     

     

     

    同批次一样处事器做读测试:

    为屏蔽其它因素影响 我找了同批次的其它处事器做测试 系统情况 硬盘等全部

    沟通

    ====================================

    [root@develop-dd ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485424+1 records in

    10485424+1 records out

    85896599040 bytes (86 GB) copied, 279.047 seconds, 308 MB/s

     

    real4m39.076s

    user0m2.005s

    sys1m23.022s

    [root@develop-dd ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485424+1 records in

    10485424+1 records out

    85896599040 bytes (86 GB) copied, 273.026 seconds, 315 MB/s

     

    real4m33.037s

    user0m1.952s

    sys1m23.991s

     

    [root@develop-dd ~]# time dd if=/dev/sda2 of=/dev/null bs=8k

    10485424+1 records in

    10485424+1 records out

    85896599040 bytes (86 GB) copied, 281.58 seconds, 305 MB/s

     

    real4m41.603s

    user0m1.922s

    sys1m25.505s

    ==================================

     

     

    同批次处事器做写测试:

    ===================================

    [root@develop-dd ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 3.805 seconds, 646 MB/s

     

    real0m4.659s

    user0m0.053s

    sys0m4.605s

    [root@develop-dd ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 3.97341 seconds, 619 MB/s

     

    real0m7.877s

    user0m0.072s

    sys0m5.093s

    [root@develop-dd ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 4.81706 seconds, 510 MB/s

     

    real0m15.508s

    user0m0.055s

    sys0m5.213s

    [root@develop-dd ~]# time dd if=/dev/zero of=/test.dbf bs=8k count=300000

    300000+0 records in

    300000+0 records out

    2457600000 bytes (2.5 GB) copied, 4.05051 seconds, 607 MB/s

     

    real0m9.150s

    user0m0.054s

    sys0m5.215s

    ==============================

    综上所述 假如解除其他影响,新批次处事器和旧批次处事器读写测试数据如下:

    -----------------------------------------------------------