原文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
网友评论