環境内のパフォーマンス指標を測定する

このページでは、ボリュームのパフォーマンスを測定する方法について詳しく説明します。

Fio を使用してボリュームのパフォーマンスを測定する

I/O 生成ツール Fio を使用して、ベースラインのパフォーマンスを測定します。

Fio を使用する

Fio は、コマンドライン インターフェースまたは構成ファイルで指定できるワークロードを適用します。実行中、Fio には現在のスループットと 1 秒あたりの入出力(IOPS)数を示す進行状況インジケーターが表示されます。完了すると、詳細な概要が表示されます。

Fio の結果の例

次の例は、60 秒間実行される単一スレッドの 4k ランダム書き込みジョブを示しています。これは、ベースライン レイテンシを測定するのに便利な方法です。次のコマンドでは、--directory パラメータは、マウントされた NetApp Volumes 共有があるフォルダを参照します。

  $ FIO_COMMON_ARGS=--size=10g --fallocate=none --direct=1 --runtime=60 --time_based --ramp_time=5
  $ fio $FIO_COMMON_ARGS --directory=/netapp --ioengine=libaio --rw=randwrite --bs=4k --iodepth=1 --name=nv
  cvs: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
  fio-3.28
  Starting 1 process
  cvs: Laying out IO file (1 file / 10240MiB)
  Jobs: 1 (f=1): [w(1)][100.0%][w=7856KiB/s][w=1964 IOPS][eta 00m:00s]
  cvs: (groupid=0, jobs=1): err= 0: pid=1891: Wed Dec 21 14:56:37 2022
    write: IOPS=1999, BW=7999KiB/s (8191kB/s)(469MiB/60001msec); 0 zone resets
      slat (usec): min=4, max=417, avg=12.06, stdev= 5.71
      clat (usec): min=366, max=27978, avg=483.59, stdev=91.34
      lat (usec): min=382, max=28001, avg=495.96, stdev=91.89
      clat percentiles (usec):
      |  1.00th=[  408],  5.00th=[  429], 10.00th=[  437], 20.00th=[  449],
      | 30.00th=[  461], 40.00th=[  469], 50.00th=[  482], 60.00th=[  490],
      | 70.00th=[  498], 80.00th=[  515], 90.00th=[  529], 95.00th=[  553],
      | 99.00th=[  611], 99.50th=[  652], 99.90th=[  807], 99.95th=[  873],
      | 99.99th=[ 1020]
    bw (  KiB/s): min= 7408, max= 8336, per=100.00%, avg=8002.05, stdev=140.09, samples=120
    iops        : min= 1852, max= 2084, avg=2000.45, stdev=35.06, samples=120
    lat (usec)   : 500=70.67%, 750=29.17%, 1000=0.15%
    lat (msec)   : 2=0.01%, 4=0.01%, 50=0.01%
    cpu          : usr=2.04%, sys=3.25%, ctx=120561, majf=0, minf=58
    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 rwts: total=0,119984,0,0 short=0,0,0,0 dropped=0,0,0,0
      latency   : target=0, window=0, percentile=100.00%, depth=1

  Run status group 0 (all jobs):
    WRITE: bw=7999KiB/s (8191kB/s), 7999KiB/s-7999KiB/s (8191kB/s-8191kB/s), io=469MiB (491MB), run=60001-60001msec

パフォーマンスの結果の詳細については、次の行をご覧ください。

  • レイテンシ: lat (usec): min=382, max=28001, avg=495.96, stdev=91.89

    平均レイテンシは 495.96 マイクロ秒(usec)、約 0.5 ms で、これは理想的なレイテンシです。

  • IOPS: min= 1852, max= 2084, avg=2000.45, stdev=35.06, samples=120

    上の例では、平均 2,000 IOPS を示しています。この値は、0.5 ミリ秒のレイテンシ(IOPS = 1000 ms/0.5 ms = 2000)のシングルスレッド ジョブで想定されます。

  • スループット: bw ( KiB/s): min= 7408, max=8336, per=100.00%, avg=8002.05, stdev=140.09

    スループットの平均は 8, 002 KiBps です。これは、ブロックサイズが 4 KiB の 2,000 IOPS の予想結果です(2000 1/s * 4 KiB = 8,000 KiB/s)。

レイテンシを測定する

レイテンシは、ボリューム パフォーマンスの基本的な指標です。これは、クライアントとサーバーの機能、クライアントとサーバー(ボリューム)間の距離、その間の機器によって異なります。この指標の主なコンポーネントは、距離に起因するレイテンシです。

ボリュームの IP に ping を実行して、往復時間を取得できます。これはレイテンシのおおよその推定値です。

レイテンシは、ブロックサイズと、読み取りオペレーションと書き込みオペレーションのどちらを実行しているかによって影響を受けます。クライアントとボリューム間のベースライン レイテンシを測定するには、次のパラメータを使用することをおすすめします。

Linux

fio --directory=/netapp \
 --ioengine=libaio \
 --rw=randwrite \
 --bs=4k --iodepth=1 \
 --size=10g \
 --fallocate=none \
 --direct=1 \
 --runtime=60 \
 --time_based \
 --ramp_time=5 \
 --name=latency

Windows

fio --directory=Z\:\
--ioengine=windowsaio
--thread
--rw=randwrite
--bs=4k
--iodepth=1
--size=10g
--fallocate=none
--direct=1
--runtime=60
--time_based
--ramp_time=5
--name=latency

パラメータ rw(read/write/randread/randwrite)と bs(ブロックサイズ)をワークロードに合わせて置き換えます。ブロックサイズが大きいほどレイテンシが高くなります。読み取りは書き込みよりも高速です。結果は lat 行に表示されます。

IOPS を測定する

IOPS は、レイテンシと同時実行の直接的な結果です。クライアントのタイプに応じて、次のいずれかのタブを使用して IOPS を測定します。

Linux

fio --directory=/netapp \
--ioengine=libaio \
--rw=randread \
--bs=4k \
--iodepth=32 \
--size=10g \
--fallocate=none \
--direct=1 \
--runtime=60 \
--time_based \
--ramp_time=5 \
--name=iops

Windows

fio --directory=Z\:\
--ioengine=windowsaio
--thread
--rw=randread
--bs=4k
--iodepth=32
--size=10g
--fallocate=none
--direct=1
--runtime=60
--time_based
--ramp_time=5
--numjobs=16
--name=iops

ワークロードに合わせて、パラメータ rw(read/write/randread/randwrite)、bs(blocksize)、iodepth(concurrency)を置き換えます。結果は iops 行に表示されます。

スループットを測定する

スループットは IOPS にブロックサイズを掛けた値です。クライアントのタイプに応じて、次のいずれかのタブを使用してスループットを測定します。

Linux

fio --directory=/netapp \
--ioengine=libaio \
--rw=read \
--bs=64k \
--iodepth=32 \
--size=10g \
--fallocate=none \
--direct=1 \
--runtime=60 \
--time_based \
--ramp_time=5 \
--numjobs=16 \
--name=throughput

Windows

fio --directory=Z\:\
--ioengine=windowsaio
--thread
--rw=read
--bs=64k
--iodepth=32
--size=10g
--fallocate=none
--direct=1
--runtime=60
--time_based
--ramp_time=5
--numjobs=16
--name=throughput

ワークロードに合わせて、パラメータ rw(read/write/randread/randwrite)、bs(blocksize)、iodepth(concurrency)を置き換えます。高いスループットを実現できるのは、64,000 以上のブロックサイズと高い同時実行性を使用した場合のみです。

次のステップ

パフォーマンス ベンチマークを確認する。