Author Topic: check iops read/write with fio on centos 6.x  (Read 8963 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
check iops read/write with fio on centos 6.x
« on: พฤษภาคม 10, 2017, 10:01:21 PM »
###check iops read/write with fio on centos 6.x

cd /root
yum install -y make gcc libaio-devel || ( apt-get update && apt-get install -y make gcc libaio-dev  </dev/null )
wget https://github.com/Crowd9/Benchmark/raw/master/fio-2.0.9.tar.gz ; tar xf fio*
cd fio*
make

Random read/write performance

If you simply want a way to compare different provider's disk performance, then this is the test I suggest. Run the following command:
   
./fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
   
This will create a 4 GB file, and perform 4KB reads and writes using a 75%/25% (ie 3 reads are performed for every 1 write) split within the file, with 64 operations running at a time. The 3:1 ratio is a rough approximation of your typical database.

FIO will now tick along printing a summary as it goes, that looks like this:
  Jobs: 1 (f=1): [m] [6.5% done] [39613K/13099K /s] [9903 /3274  iops] [eta 01m:12s]

###Reference
https://www.binarylane.com.au/support/solutions/articles/1000055889-how-to-benchmark-disk-i-o

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iops read/write with fio on centos 6.x
« Reply #1 on: พฤษภาคม 10, 2017, 10:03:54 PM »
###ผลเทสจากตัว Harddisk SSD Samsung 850-PRO ถือว่าเร็วใช้ได้

[root@localhost fio-2.0.9]# ./fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
test: (g=0): rw=randrw, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=64
fio-2.0.9
Starting 1 process
test: Laying out IO file(s) (1 file(s) / 4096MB)
Jobs: 1 (f=1): [m] [100.0% done] [253.8M/86928K /s] [64.1K/21.8K iops] [eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=12291: Wed May 10 22:01:59 2017
  read : io=3072.3MB, bw=254841KB/s, iops=63710 , runt= 12345msec
  write: io=1023.8MB, bw=84917KB/s, iops=21229 , runt= 12345msec
  cpu          : usr=7.05%, sys=44.52%, ctx=146255, majf=0, minf=23
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.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.1%, >=64=0.0%
     issued    : total=r=786502/w=262074/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=3072.3MB, aggrb=254840KB/s, minb=254840KB/s, maxb=254840KB/s, mint=12345msec, maxt=12345msec
  WRITE: io=1023.8MB, aggrb=84916KB/s, minb=84916KB/s, maxb=84916KB/s, mint=12345msec, maxt=12345msec

Disk stats (read/write):
    dm-0: ios=782222/260626, merge=0/0, ticks=596064/155852, in_queue=751921, util=99.23%, aggrios=786502/262079, aggrmerge=0/1, aggrticks=598983/156664, aggrin_queue=755511, aggrutil=99.14%
  sda: ios=786502/262079, merge=0/1, ticks=598983/156664, in_queue=755511, util=99.14%

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iops read/write with fio on centos 6.x
« Reply #2 on: พฤษภาคม 10, 2017, 10:05:41 PM »
ถ้าลองเทสเฉพาะ การอ่าน อย่างเดียว

[root@localhost fio-2.0.9]# ./fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randread
test: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=64
fio-2.0.9
Starting 1 process
Jobs: 1 (f=1): [r] [91.7% done] [376.8M/0K /s] [96.5K/0  iops] [eta 00m:01s]
test: (groupid=0, jobs=1): err= 0: pid=12294: Wed May 10 22:04:47 2017
  read : io=4096.0MB, bw=384975KB/s, iops=96243 , runt= 10895msec
  cpu          : usr=6.13%, sys=45.42%, ctx=151079, majf=0, minf=87
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.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.1%, >=64=0.0%
     issued    : total=r=1048576/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=4096.0MB, aggrb=384975KB/s, minb=384975KB/s, maxb=384975KB/s, mint=10895msec, maxt=10895msec

Disk stats (read/write):
    dm-0: ios=1025314/3, merge=0/0, ticks=652994/1, in_queue=653043, util=99.12%, aggrios=1048576/3, aggrmerge=0/0, aggrticks=667451/1, aggrin_queue=667321, aggrutil=99.03%
  sda: ios=1048576/3, merge=0/0, ticks=667451/1, in_queue=667321, util=99.03%

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iops read/write with fio on centos 6.x
« Reply #3 on: พฤษภาคม 10, 2017, 10:08:28 PM »
### Test ioping
cd /root
yum install -y make gcc libaio-devel || ( apt-get update && apt-get install -y make gcc libaio-dev  </dev/null )
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ioping/ioping-0.8.tar.gz ; tar xf ioping*
cd ioping*
make

##เริ่มเทส
./ioping -c 10 .