存储读写速度测试

存储读写速度测试

SD card读写速度测试



write:
time dd if=/dev/zero of=./tempfile bs=128M count=8 oflag=direct

read:
time dd if=./tempfile of=/dev/null bs=128M count=8 iflag=direct

read and write:
time dd if=./tempfile of=./tempfile_cp bs=128M count=8 iflag=direct oflag=direct


不准确的测试命令:

sync
echo 3 > /proc/sys/vm/drop_caches
time dd if=/dev/zero of=./tempfile bs=128M count=8 oflag=dsync
time sync

sync
echo 3 > /proc/sys/vm/drop_caches
time dd if=./tempfile of=/dev/null bs=128M count=8 iflag=dsync
time sync

sync
echo 3 > /proc/sys/vm/drop_caches
time dd if=./tempfile of=./tempfile_cp bs=8M count=8 iflag=dsync oflag=dsync
time sync



fio

seq write
fio -name=flash_w -filename=./tempfile -direct=1 -iodepth=20 -thread -rw=write -ioengine=libaio -bs=64M -size=2G -numjobs=1 -runtime=60 -group_reporting

seq read
fio -name=flash_r -filename=./tempfile -direct=1 -iodepth=20 -thread -rw=read -ioengine=libaio -bs=64M -size=2G -numjobs=1 -runtime=60 -group_reporting


iozone


sysbench


reference:
https://sunkai.net/23.html
https://bbs.huaweicloud.com/forum/thread-90290-1-1.html



posted @ 2022-07-13 11:13  王阳开  阅读(172)  评论(0编辑  收藏  举报