"리눅스 fio"의 두 판 사이의 차이

13번째 줄: 13번째 줄:
:→ 그 파일들을 대상으로 60초 동안 16KB짜리 랜덤 읽기/쓰기를 반복하여 성능을 측정한다.
:→ 그 파일들을 대상으로 60초 동안 16KB짜리 랜덤 읽기/쓰기를 반복하여 성능을 측정한다.
:→ 측정 후에는 지워주자. ( <code>rm -f /fio_test_file.*</code> )
:→ 측정 후에는 지워주자. ( <code>rm -f /fio_test_file.*</code> )
:→ randrw는 읽기/쓰기를 동시에 수행하기 때문에 평균값이 나온다...<ref>read/write 수치가 각각 따로 나오기는 하지만, 거의 비슷하게 평균이 되어 버린다. 정확히 측정하려면 randread와 randwrite를 따로 수행하자.</ref>


==명령어 예시==
==명령어 예시==

2017년 11월 27일 (월) 14:26 판

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]

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 수치가 각각 따로 나오기는 하지만, 거의 비슷하게 평균이 되어 버린다. 정확히 측정하려면 randread와 randwrite를 따로 수행하자.
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}