리눅스 fio

1 개요[ | ]

리눅스 fio
/usr/bin/fio
  • "Flexible I/O tester" → 유연한 입출력 테스트 도구
  • 디스크 성능 측정 프로그램
순차/랜덤 읽기/쓰기 IOPS 측정 등

2 기초 예시[ | ]

fio --directory=/ --name fio_test_file --direct=1 --rw=randrw --bs=16k --size=1G --numjobs=3 --time_based --runtime=60 --group_reporting --norandommap
→ 먼저 / 폴더에 1GiB짜리 파일 3개( fio_test_file.0.0, fio_test_file.1.0, fio_test_file.2.0 )를 생성한다.
→ 그 파일들을 대상으로 60초 동안 16KB짜리 랜덤 읽기/쓰기를 반복하여 성능을 측정한다.
→ 측정 후에는 지워주자. ( rm -f /fio_test_file.* )
→ 여기서는 randrw로 했는데 이렇게 하면 읽기/쓰기 수치가 뭉뚱그려져서 조화평균 값이 나온다.[1] 정확히 측정하려면 randread와 randwrite를 따로 수행하자...

3 명령어 예시[ | ]

디렉토리 16KB 랜덤 읽기
fio --directory=디렉토리 --name fio_test_file --direct=1 --rw=randread --bs=16k --size=1G --numjobs=16 --time_based --runtime=180 --group_reporting --norandommap
디렉토리 16KB 랜덤 쓰기
fio --directory=디렉토리 --name fio_test_file --direct=1 --rw=randwrite --bs=16k --size=1G --numjobs=16 --time_based --runtime=180 --group_reporting --norandommap
블록장치 1MiB 순차 읽기
fio --filename=/dev/장치명 --direct=1 --rw=read --randrepeat=0 --ioengine=libaio --bs=1024k --iodepth=8 --time_based=1 --runtime=180 --name=fio_direct_read_test
블록장치 1MiB 순차 쓰기
fio --filename=/dev/장치명 --direct=1 --rw=write --randrepeat=0 --ioengine=libaio --bs=1024k --iodepth=8 --time_based=1 --runtime=180 --name=fio_direct_write_test

4 같이 보기[ | ]

5 참고[ | ]

  1. read, write 수치가 따로 출력되기는 하지만, 평균값처럼 유사해짐
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}