반응형

 

SSD, HDD, 또는 Cloud Infra에서 제공하는 가상 Storage의 IOPS 성능이 궁금할 때,
fio 명령을 사용하면 쉽게 IOPS 측정 결과를 얻을 수 있다.

$ sudo apt install fio

## fio 명령 옵션 설명
##  --numjobs=8   8개의 쓰레드가 동시에 I/O 테스트 실행. 생성되는 파일도 8개.
##  --size=1G     각 테스트용 파일의 크기
##  --runtime=10  10초 동안 테스트

## 10초 동안
$ fio --directory=/home/sejong/fio --name fio_test_file \
        --direct=1 --rw=randwrite --bs=4K --size=1G \
        --numjobs=8 --time_based --runtime=10 \
        --group_reporting --norandommap --rwmixread 30
        
... 중간 생략 ...

Jobs: 8 (f=8): [w(8)][100.0%][w=1924MiB/s][w=493k IOPS][eta 00m:00s]
fio_test_file: (groupid=0, jobs=8): err= 0: pid=3313523: Wed Aug 23 15:20:07 2023
  write: IOPS=466k, BW=1822MiB/s (1910MB/s)(17.8GiB/10001msec); 0 zone resets
    clat (usec): min=10, max=6785, avg=16.77, stdev=25.55
     lat (usec): min=10, max=6786, avg=16.84, stdev=25.55
    clat percentiles (usec):
     |  1.00th=[   12],  5.00th=[   13], 10.00th=[   14], 20.00th=[   14],
     | 30.00th=[   15], 40.00th=[   16], 50.00th=[   16], 60.00th=[   17],
     | 70.00th=[   18], 80.00th=[   19], 90.00th=[   20], 95.00th=[   22],
     | 99.00th=[   27], 99.50th=[   30], 99.90th=[  103], 99.95th=[  120],
     | 99.99th=[ 1532]
   bw (  MiB/s): min= 1628, max= 1953, per=99.78%, avg=1817.71, stdev=12.47, samples=152
   iops        : min=416986, max=500024, avg=465333.05, stdev=3191.37, samples=152
  lat (usec)   : 20=90.35%, 50=9.49%, 100=0.06%, 250=0.08%, 500=0.01%
  lat (usec)   : 750=0.01%, 1000=0.01%
  lat (msec)   : 2=0.01%, 4=0.01%, 10=0.01%
  cpu          : usr=4.28%, sys=29.64%, ctx=4664591, majf=0, minf=115
  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,4663934,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=1822MiB/s (1910MB/s), 1822MiB/s-1822MiB/s (1910MB/s-1910MB/s), io=17.8GiB (19.1GB), run=10001-10001msec

Disk stats (read/write):
  nvme0n1: ios=0/4613003, merge=0/103199, ticks=0/55894, in_queue=56493, util=99.15%
  
$

+ Recent posts