성능 확인

이 페이지에서는 Fio 도구를 사용하여 볼륨 성능을 확인하는 방법을 설명합니다. 애플리케이션을 최적화하려면 볼륨의 기준 성능을 설정하는 것이 중요합니다.

Fio를 사용하여 볼륨 성능 측정

I/O 생성기 도구인 Fio를 사용하여 기준 성능을 측정합니다.

Fio 사용

Fio는 명령줄 인터페이스나 구성 파일을 통해 지정할 수 있는 워크로드를 적용합니다. 실행되는 동안 Fio는 현재 처리량과 초당 입력 및 출력 (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.5ms로 이상적인 지연 시간입니다.

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

    위의 예에서는 평균 IOPS가 2,000입니다. 이 값은 지연 시간이 0.5ms (IOPS = 1000 ms/0.5 ms = 2000)인 단일 스레드 작업에 예상됩니다.

  • 처리량: bw ( KiB/s): min= 7408, max=8336, per=100.00%, avg=8002.05, stdev=140.09

    처리량 평균은 8,002KiBps로, 블록 크기가 4KiB (2000 1/s * 4 KiB = 8,000 KiB/s)인 2,000IOPS의 예상 결과입니다.

지연 시간 측정

지연 시간은 볼륨 성능의 기본 측정항목입니다. 이는 클라이언트 및 서버 기능, 클라이언트와 서버 (볼륨) 간 거리, 중간에 있는 장비의 결과입니다. 측정항목의 주요 구성요소는 거리로 인한 지연 시간입니다.

볼륨의 IP를 핑하여 왕복 시간을 확인할 수 있습니다. 왕복 시간은 지연 시간의 대략적인 추정치입니다.

지연 시간은 블록 크기와 읽기 또는 쓰기 작업을 수행하는지 여부에 따라 달라집니다. 다음 매개변수를 사용하여 클라이언트와 볼륨 간의 기준 지연 시간을 측정하는 것이 좋습니다.

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) 매개변수를 바꿉니다. 64k 이상의 블록 크기와 높은 동시성을 사용해야 높은 처리량을 달성할 수 있습니다.

다음 단계

성능 업계 기준치를 검토합니다.