Замеряем iops диска

Установка

Centos:
  • yum install -y make gcc libaio-devel
Debian:
  • apt-get install -y gcc make libaio-dev


Собираем
cd /usr/src
wget http://brick.kernel.dk/snaps/fio-2.0.6.tar.gz
tar -xf fio-2.0.6.tar.gz
cd fio-2.0.6
make

Тесты 

Чтение

/usr/src/fio-2.0.6/fio -readonly -name iops -rw=randread -bs=512 -runtime=20 -iodepth 64 -filename /dev/sda -ioengine libaio -direct=1

обращаем внимание на параметры:
iodepth 64 - глубина теста
/dev/sda

Пример вывода (iodepth=1)

sas
Jobs: 1 (f=1): [r] [100.0% done] [1559K/0K /s] [3045 /0 iops] [eta 00m:00s]
iops: (groupid=0, jobs=1): err= 0: pid=13240
read : io=30581KB, bw=1528.7KB/s, iops=3057 , runt= 20005msec
slat (usec): min=30 , max=14554 , avg=42.15, stdev=137.56
    clat (usec): min=1 , max=21535 , avg=281.76, stdev=1207.70

     lat (usec): min=44 , max=24350 , avg=324.33, stdev=1219.01
    clat percentiles (usec):
     |  1.00th=[    1],  5.00th=[    1], 10.00th=[    1], 20.00th=[    1],
     | 30.00th=[   25], 40.00th=[   26], 50.00th=[   26], 60.00th=[   26],
     | 70.00th=[   27], 80.00th=[   29], 90.00th=[   32], 95.00th=[ 1768],
     | 99.00th=[ 6944], 99.50th=[ 7648], 99.90th=[ 8768], 99.95th=[ 9024],
     | 99.99th=[12992]
    bw (KB/s)  : min=  834, max= 1853, per=100.00%, avg=1528.74, stdev=174.74
    lat (usec) : 2=24.86%, 4=4.15%, 10=0.01%, 20=0.10%, 50=64.91%
    lat (usec) : 100=0.42%, 250=0.31%, 500=0.06%, 1000=0.01%
    lat (msec) : 2=0.27%, 4=1.46%, 10=3.42%, 20=0.03%, 50=0.01%
  cpu          : usr=1.56%, sys=12.69%, ctx=61161, majf=0, minf=28
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=61162/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=30581KB, aggrb=1528KB/s, minb=1565KB/s, maxb=1565KB/s, mint=20005msec, maxt=20005msec

Disk stats (read/write):
  sda: ios=60811/2, merge=0/46, ticks=19105/1, in_queue=19107, util=95.59%


ssd
Jobs: 1 (f=1): [r] [100.0% done] [6088K/0K /s] [11.9K/0  iops] [eta 00m:00s]
iops: (groupid=0, jobs=1): err= 0: pid=13254
  read : io=118795KB, bw=5939.8KB/s, iops=11879 , runt= 20000msec
    slat (usec): min=29 , max=577 , avg=36.07, stdev=13.61
    clat (usec): min=1 , max=979 , avg=45.08, stdev=52.62
     lat (usec): min=46 , max=1049 , avg=81.54, stdev=57.28
    clat percentiles (usec):
     |  1.00th=[    1],  5.00th=[   25], 10.00th=[   26], 20.00th=[   26],
     | 30.00th=[   26], 40.00th=[   26], 50.00th=[   27], 60.00th=[   27],
     | 70.00th=[   28], 80.00th=[   31], 90.00th=[  151], 95.00th=[  183],
     | 99.00th=[  237], 99.50th=[  241], 99.90th=[  255], 99.95th=[  266],
     | 99.99th=[  362]
    bw (KB/s)  : min= 5721, max= 6156, per=100.00%, avg=5939.33, stdev=84.84
    lat (usec) : 2=1.46%, 4=0.61%, 20=0.13%, 50=86.24%, 100=0.07%
    lat (usec) : 250=11.33%, 500=0.16%, 750=0.01%, 1000=0.01%
  cpu          : usr=5.71%, sys=44.81%, ctx=237592, majf=0, minf=28
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=237590/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=118795KB, aggrb=5939KB/s, minb=6082KB/s, maxb=6082KB/s, mint=20000msec, maxt=20000msec

Запись (данные на диске будут уничтожены)

/usr/src/fio-2.0.6/fio -name iops -rw=randwrite -bs=512 -runtime=20 -iodepth 64 -filename /dev/sdd -ioengine libaio -direct=1


Источник

https://www.stableit.ru/2010/10/linux-fio.html

Disk stats (read/write):
sdb: ios=236309/15, merge=0/8, ticks=17759/2, in_queue=17760, util=88.84%


Комментарии

Популярные сообщения из этого блога

mikbill расшифровка завершений сессий

Accel-ppp команды

Zabbix agent установка и настройка