Loading

阿里云ECS磁盘性能测试

阿里官方给出的性能指标

顺序读

  • 测试命令
fio -directory=/var/lib/data -direct=1 -iodepth=1 -thread -ioengine=libaio -randrepeat=0 -bs=4k -size=4G -group_reporting -rw=read -name=4k-read

解释

-directory   #测试磁盘目录
direct=1     #测试过程绕过机器自带的buffer。使测试结果更真实
iodepth=16   #IO队列的深度,表示在这个文件上同一时刻运行16个I/O,默认为1。如果ioengine   #采用异步方式,该参数表示一批提交保持的io单元数
ioengine=libaio  #定义使用哪种IO,此为libaio,(默认是sync)
randrepeat=0     #设置产生的随机数是不可重复的
bs=4k            #单次io的块文件大小为4k
size=4G          #本次的测试文件大小为5g,以每次4k的io进行测试(可以基于时间,也可以基于容量测试)
group_reporting     #关于显示结果的,汇总每个(线程/进程)的信息
rw=read          #测试顺序读的I/O,下面是可选的参数
-name     #自定义测试名字
  • 测试结果
read: IOPS=2095, BW=8382KiB/s (8583kB/s)(4096MiB/500395msec)

解释

IOPS:每秒钟的IO数,
BW:带宽KB/s

顺序写

  • 测试命令
fio -directory=/var/lib/data -direct=1 -iodepth=4 -thread=1 -ioengine=libaio -randrepeat=0 -bs=4k -size=4G -group_reporting -rw=write -name=4k-write
  • 测试结果
write: IOPS=2649, BW=10.3MiB/s (10.9MB/s)(4096MiB/395785msec)

随机读

  • 测试命令
fio -directory=/var/lib/data -direct=1 -iodepth=4 -thread=1 -ioengine=libaio -randrepeat=0 -bs=4k -size=4G -group_reporting -rw=randread -name=4k-randread
  • 测试结果
read: IOPS=2616, BW=10.2MiB/s (10.7MB/s)(4096MiB/400814msec)

随机写

  • 测试命令
fio -directory=/var/lib/data -direct=1 -iodepth=4 -thread=1 -ioengine=libaio -randrepeat=0 -bs=4k -size=4G -group_reporting -rw=randwrite -name=4k-randwrite
  • 测试结果
write: IOPS=2590, BW=10.1MiB/s (10.6MB/s)(4096MiB/404819msec)

顺序读写

  • 测试命令
fio -directory=/var/lib/data -direct=1 -iodepth=4 -thread=1 -ioengine=libaio -randrepeat=0 -bs=4k -size=4G -group_reporting -rw=rw -name=4k-rw
  • 测试结果
read: IOPS=2505, BW=9.79MiB/s (10.3MB/s)(2047MiB/209161msec)
write: IOPS=2508, BW=9.80MiB/s (10.3MB/s)(2049MiB/209161msec)

随机读写

  • 测试命令
fio -directory=/var/lib/data -direct=1 -iodepth=4 -thread=1 -ioengine=libaio -randrepeat=0 -bs=4k -size=4G -group_reporting -rw=randrw -name=4k-randrw
  • 测试结果
read: IOPS=2523, BW=9.86MiB/s (10.3MB/s)(2046MiB/207596msec)
write: IOPS=2527, BW=9.87MiB/s (10.4MB/s)(2050MiB/207596msec)
posted @ 2021-11-18 16:19  亚里士多智  阅读(278)  评论(0编辑  收藏  举报