https://github.com/axboe/fio

FIO

Flexible I/O tester

FIO를 이용해서 file I/O의 read/write IOPS와 같은 성능을 측정할 수 있다.

FIO 설치

apt를 통한 설치

간단하게 apt를 이용하여 설치할 수 있다.

sudo apt-get install fio

코드 컴파일을 통한 설치

FIO 코드의 커스텀이 필요하거나, 기본적으로 포함하지 않는 기능을 포함한 fio를 사용하고자 할 때에는 코드 컴파일을 통해 설치하여야 한다.

  • 아래의 링크에서 fio를 다운로드

https://github.com/axboe/fio/releases

  • 압축 해제
#tar -xzf {다운로드 받은 fio 파일 이름}
tar -xzf fio-3.30.tar.gz
  • configuration 적용

configure에 option으로 기본적으로 포함되지 않는 기능을 추가할 수 있다.

./configure
  • 빌드
make
  • 설치
make install

FIO 사용법

fio는 (1)커맨드 라인에 option을 모두 설정하여 사용하는 방식과 (2)jobfile을 만들어 jobfile 내부에 설정을 기록해두고, 이를 실행하는 방식이 있다.

Command line

#fio [options]
fio --ioengine=libaio --direct=1 --rw=randrw --size=1G

jobfile

  • jobfile 생성
vi job.fio
  • job.fio
# -- job file 예시 --
#[global]
#rw=randread
#size=128m
#
#[job1]
#
#[job2]
#
# -- job file 예시 끝 --

[global]
ioengine=libaio
direct=1
rw=randrw
size=1G
  • jobfile 실행
fio job.fio

FIO options

수많은 옵션이 존재하므로 공식 문서를 확인하는 것을 추천

https://fio.readthedocs.io/en/latest/fio_doc.html