美文网首页
linux下简单的测试磁盘读写速率(转载)

linux下简单的测试磁盘读写速率(转载)

作者: embedsky | 来源:发表于2019-04-22 19:48 被阅读0次

    原文https://blog.csdn.net/weiyuefei/article/details/51909055

    1. 测试读取速度

    sudo hdparm -tT /dev/md0
    /dev/md0:
    Timing cached reads: 35164 MB in 1.99 seconds = 17656.01 MB/sec
    Timing buffered disk reads: 818 MB in 3.01 seconds = 272.14 MB/sec

    $sudo time dd if=/dev/md0 bs=1024 count=10000000 of=/10Gb.file
    10000000+0 records in
    10000000+0 records out
    10240000000 bytes (10 GB, 9.5 GiB) copied, 153.551 s, 66.7 MB/s
    5.32user 44.02system 2:33.86elapsed 32%CPU (0avgtext+0avgdata 2536maxresident)k
    18005744inputs+20000000outputs (1major+87minor)pagefaults 0swaps
    

    2.测试写速度

    使用time命令和dd命令可以简单测试硬盘的写速率

    $sudo time dd if=/dev/md0 bs=1024 count=10000000 of=/10Gb.file
    10000000+0 records in
    10000000+0 records out
    10240000000 bytes (10 GB, 9.5 GiB) copied, 153.551 s, 66.7 MB/s
    5.32user 44.02system 2:33.86elapsed 32%CPU (0avgtext+0avgdata 2536maxresident)k
    18005744inputs+20000000outputs (1major+87minor)pagefaults 0swaps
    

    相关文章

      网友评论

          本文标题:linux下简单的测试磁盘读写速率(转载)

          本文链接:https://www.haomeiwen.com/subject/iegugqtx.html