FreeBSD - измерение IOPS на дисках при помощи fio

Для планирования масштабирования аппаратных ресурсов понадобилось измерить производительность дисковых операций на сервере. В заббиксе уже настроены графики с отрисовкой IOPS. Теперь необходимо измерить максимальные значения IOPS. Для этого воспользуемся утилитой fio

Установим fio

cd /usr/ports/sysutils/fio/ && make install clean

Примеры тестов

Сделал два простых job-файла на произвольное чтение/запись соответственно. Кстати, примеры job-файлов лежат в /usr/local/share/examples/fio/

Файл rand-read.ini

[global]
ioengine=sync
buffered=0
rw=randread
bs=128k
size=512m
directory=/home/vukor/test/
thread

[file1]
iodepth=1

[file2]
iodepth=8

Файл rand-write.ini

[global]
ioengine=sync
buffered=0
rw=randwrite
bs=128k
size=512m
directory=/home/vukor/test/
thread

[file1]
iodepth=1

[file2]
iodepth=8

Результаты под текущей нагрузкой (раздел на программном gmirror RAID-1, UFS2)

Чтение:

# fio ./rand-read.ini
file1: (g=0): rw=randread, bs=128K-128K/128K-128K, ioengine=sync, iodepth=1
file2: (g=0): rw=randread, bs=128K-128K/128K-128K, ioengine=sync, iodepth=8
fio 2.0.7
Starting 2 threads
Jobs: 2 (f=2): [rr] [100.0% done] [13185K/0K /s] [100 /0  iops] [eta 00m:00s]
file1: (groupid=0, jobs=1): err= 0: pid=100251
  read : io=524288KB, bw=9232.8KB/s, iops=72 , runt= 56786msec
    clat (usec): min=646 , max=4252.5K, avg=13857.05, stdev=93498.29
     lat (usec): min=647 , max=4252.5K, avg=13858.12, stdev=93498.29
    clat percentiles (usec):
     |  1.00th=[  756],  5.00th=[  812], 10.00th=[  852], 20.00th=[ 1032],
     | 30.00th=[ 1912], 40.00th=[ 5408], 50.00th=[ 7712], 60.00th=[ 9664],
     | 70.00th=[11584], 80.00th=[15808], 90.00th=[24448], 95.00th=[34560],
     | 99.00th=[72192], 99.50th=[118272], 99.90th=[634880], 99.95th=[1744896],
     | 99.99th=[4227072]
    bw (KB/s)  : min=   36, max=19301, per=59.93%, avg=11065.44, stdev=5463.02
    lat (usec) : 750=0.85%, 1000=18.24%
    lat (msec) : 2=11.18%, 4=4.37%, 10=27.12%, 20=24.51%, 50=11.74%
    lat (msec) : 100=1.32%, 250=0.39%, 500=0.12%, 750=0.05%, 1000=0.02%
    lat (msec) : 2000=0.02%, >=2000=0.05%
  cpu          : usr=0.10%, sys=1.01%, ctx=17917, majf=0, minf=70
  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=4096/w=0/d=0, short=r=0/w=0/d=0
file2: (groupid=0, jobs=1): err= 0: pid=100252
  read : io=524288KB, bw=9271.3KB/s, iops=72 , runt= 56550msec
    clat (usec): min=51 , max=3617.8K, avg=13799.50, stdev=89377.06
     lat (usec): min=53 , max=3617.8K, avg=13800.57, stdev=89377.06
    clat percentiles (usec):
     |  1.00th=[  756],  5.00th=[  812], 10.00th=[  852], 20.00th=[  996],
     | 30.00th=[ 1912], 40.00th=[ 5536], 50.00th=[ 7648], 60.00th=[ 9792],
     | 70.00th=[11840], 80.00th=[16320], 90.00th=[24704], 95.00th=[35072],
     | 99.00th=[66048], 99.50th=[100864], 99.90th=[544768], 99.95th=[2277376],
     | 99.99th=[3620864]
    bw (KB/s)  : min=   72, max=21669, per=59.21%, avg=10932.38, stdev=5161.96
    lat (usec) : 100=0.05%, 750=0.81%, 1000=19.38%
    lat (msec) : 2=10.03%, 4=4.42%, 10=26.34%, 20=24.07%, 50=12.57%
    lat (msec) : 100=1.81%, 250=0.27%, 500=0.12%, 750=0.02%, 1000=0.02%
    lat (msec) : >=2000=0.07%
  cpu          : usr=0.10%, sys=1.02%, ctx=17863, majf=0, minf=69
  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=4096/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=1024.0MB, aggrb=18465KB/s, minb=9232KB/s, maxb=9271KB/s, mint=56550msec, maxt=56786msec

Запись:

# fio ./rand-write.ini 
file1: (g=0): rw=randwrite, bs=128K-128K/128K-128K, ioengine=sync, iodepth=1
file2: (g=0): rw=randwrite, bs=128K-128K/128K-128K, ioengine=sync, iodepth=8
fio 2.0.7
Starting 2 threads
file1: Laying out IO file(s) (1 file(s) / 512MB)
file2: Laying out IO file(s) (1 file(s) / 512MB)
Jobs: 1 (f=1): [_w] [99.3% done] [0K/0K /s] [0 /0  iops] [eta 00m:02s]      
file1: (groupid=0, jobs=1): err= 0: pid=101198
  write: io=524288KB, bw=1921.5KB/s, iops=15 , runt=272857msec
    clat (usec): min=54 , max=7673.6K, avg=66603.93, stdev=210797.99
     lat (usec): min=59 , max=7673.6K, avg=66609.97, stdev=210798.08
    clat percentiles (usec):
     |  1.00th=[   59],  5.00th=[   62], 10.00th=[   65], 20.00th=[   70],
     | 30.00th=[   77], 40.00th=[   82], 50.00th=[   90], 60.00th=[  100],
     | 70.00th=[  195], 80.00th=[109056], 90.00th=[250880], 95.00th=[346112],
     | 99.00th=[651264], 99.50th=[831488], 99.90th=[2039808], 99.95th=[3194880],
     | 99.99th=[7700480]
    bw (KB/s)  : min=   32, max=119042, per=59.18%, avg=2195.76, stdev=10554.73
    lat (usec) : 100=59.64%, 250=10.91%, 500=0.73%, 750=0.20%, 1000=0.29%
    lat (msec) : 2=0.42%, 4=1.05%, 10=1.95%, 20=0.46%, 50=0.85%
    lat (msec) : 100=2.25%, 250=11.16%, 500=8.25%, 750=1.17%, 1000=0.34%
    lat (msec) : 2000=0.20%, >=2000=0.12%
  cpu          : usr=0.03%, sys=2.53%, ctx=1636626, majf=0, minf=39
  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=0/w=4096/d=0, short=r=0/w=0/d=0
file2: (groupid=0, jobs=1): err= 0: pid=101199
  write: io=524288KB, bw=1855.5KB/s, iops=14 , runt=282566msec
    clat (usec): min=52 , max=7971.6K, avg=68975.26, stdev=243237.80
     lat (usec): min=57 , max=7971.6K, avg=68980.37, stdev=243237.93
    clat percentiles (usec):
     |  1.00th=[   57],  5.00th=[   61], 10.00th=[   65], 20.00th=[   74],
     | 30.00th=[   77], 40.00th=[   81], 50.00th=[   88], 60.00th=[   99],
     | 70.00th=[  195], 80.00th=[103936], 90.00th=[242688], 95.00th=[350208],
     | 99.00th=[675840], 99.50th=[905216], 99.90th=[3162112], 99.95th=[5275648],
     | 99.99th=[7962624]
    bw (KB/s)  : min=   46, max=255055, per=63.72%, avg=2364.14, stdev=14287.55
    lat (usec) : 100=60.52%, 250=9.94%, 500=0.73%, 750=0.27%, 1000=0.15%
    lat (msec) : 2=0.61%, 4=0.83%, 10=1.81%, 20=0.49%, 50=1.07%
    lat (msec) : 100=2.78%, 250=11.25%, 500=7.59%, 750=1.20%, 1000=0.34%
    lat (msec) : 2000=0.24%, >=2000=0.17%
  cpu          : usr=0.04%, sys=2.46%, ctx=1638020, majf=0, minf=6
  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=0/w=4096/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
  WRITE: io=1024.0MB, aggrb=3710KB/s, minb=1855KB/s, maxb=1921KB/s, mint=272857msec, maxt=282566msec

Ссылки

Комментарии

 
blog/2012/05/04-шпаргалка_-_измерение_iops_на_дисках.txt · Последние изменения: 2013/07/04 10:15 — Антон Бугреев · []