Ref .. http://en.wikipedia.org/wiki/IOPS
### FIO ####
%> fio random.fio
1 2 3 |
IOPS * TransferSizeInBytes = BytesPerSec |
### FIO ####
%> fio random.fio
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
[ran-read-buf] rw=randread size=5G direct=0 directory=/home/benm bs=4k name=ran-read-buf group_reporting ioengine=sync loops=1 iodepth=1 [ran-read-dir] rw=randread size=5G direct=1 directory=/home/benm bs=4k name=ran-read-dir group_reporting ioengine=sync loops=1 iodepth=1 #numjobs=5 [seq-read-buf] rw=read size=5G direct=0 directory=/home/benm bs=4k name=seq-read-buf #group_reporting ioengine=sync ioengine=libaio loops=1 iodepth=1 [seq-read] rw=read size=5G direct=1 directory=/home/benm bs=4k name=seq-read group_reporting ioengine=sync loops=1 iodepth=1 [ran-write-buf] rw=randwrite size=10G direct=1 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ iodepth=1 group_reporting name=ran-write-buf [ran-write-dir] rw=randwrite size=10G direct=1 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ iodepth=1 group_reporting name=ran-write-dir [seq-write-buf] rw=write size=16G direct=0 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ iodepth=1 group_reporting name=seq-write-buf #runtime=10 [seq-write-dir] rw=write size=16G direct=1 bs=4k directory=/home/benm/ iodepth=1 group_reporting name=seq-write-dir |
#runtime=10
Ref.
http://www.thegeekstuff.com/2011/05/iozone-examples/
http://www.sparksupport.com/blog/quick-setup-of-iozone-benchmarking-tool
http://blog.cloudharmony.com/2010/06/disk-io-benchmarking-in-cloud.html
### iozone ##
0=write/rewrite
1=read/re-read
2=random-read/write
3=Read-backwards
4=Re-write-record
5=stride-read
6=fwrite/re-fwrite
7=fread/Re-fread,
8=random mix
9=pwrite/Re-pwrite
10=pread/Re-pread
11=pwritev/Re-pwritev
12=preadv/Re-preadv
$ ./iozone -i [test-type]
4. Specify the file size using iozone -s
By default, iozone will automatically create
temporary files of size from 64k to 512M, to perform various testing
5. Specify the record size for testing using iozone -r
When you run a test, for a specific file size, it tests with different
record sizes ranging from 4k to 16M.
ตีวอย่าง..
/opt/iozone/bin/iozone -R -l 5 -u 5 -r 4k -s 100m -F /home/f1 /home/f2 /home/f3 /home/f4 /home/f5
..
./iozone -o -i 0 -i 1 -i 2 -e -+n -r 128K -s 512M -u 1 -l 1 -F /mydata/test01
ทดสอบ
# information disk.
cat /sys/class/block/sda/device/model
ls -l /dev/disk/by-id/
TOSHIBA DT01ACA3
./iozone -o -i 0 -i 1 -i 2 -e -+n -r 4K -s 128M -u 1 -l 1 -F /mydata/test01
ทดสอบ write ไฟล์ ขนาด 128 M ด้วย record ขนาด 4 K โดย ใช้ /mydata/test01 เป็น tempfile.
iops calculator.
http://www.wmarow.com/strcalc/
การเพิ่ม จำนวน disk สามารถ เพิ่ม IOPS ได้ ซึงหาก เพิ่มจำ นวน disk หมายถึงการ ทำ raid.
Raid type มีผลต่อ IOPS
สำหรับ HDD ความเร็วรอบ มีผลต่อ ค่า IOPS
การคำนวณ IOPS โดยประมาณ
Ref. http://jairocetina.blogspot.com/2011/08/calculate-iops-in-disk-or-storage-array.html
Calculation
It is very simple. Let’s suppose you have 15000 rpm disk with average seek time 2ms. 150000 rotations per minute means disk will rotate
15000 / 60s = 250 times per second
and that means that one rotation will take
1s / 250 = 4 ms
In average case it will take half of that to rotate disk platter to the right place. Now add that to the seek time and you’ll get the total time needed to serve one I/O request. Divide 1 sec (1000 ms) with 4ms + 2ms and you’ll get
1000 / 6 = 167 IOPS
An outcome with more precision is:
Model: Western Digital VelociRaptor 2.5″ SATA hard drive
Rotational speed: 10,000 RPM
Average latency: 3 ms (0.003 seconds)
Average seek time: 4.2 (r)/4.7 (w) = 4.45 ms (0.0045 seconds)
Calculated IOPS for this disk: 1/(0.003 + 0.0045) = about 133 IOPS
In a RAID is important see penalties in the following table:
## I/O Impact
RAID level Read Write
0 1 1
(10) 1 2
5 1 4
6 1 6
ถ้า DISK 15000 rpm ค่า IOPS อยู่ที่ประมาณ 167
http://www.thegeekstuff.com/2011/05/iozone-examples/
http://www.sparksupport.com/blog/quick-setup-of-iozone-benchmarking-tool
http://blog.cloudharmony.com/2010/06/disk-io-benchmarking-in-cloud.html
### iozone ##
0=write/rewrite
1=read/re-read
2=random-read/write
3=Read-backwards
4=Re-write-record
5=stride-read
6=fwrite/re-fwrite
7=fread/Re-fread,
8=random mix
9=pwrite/Re-pwrite
10=pread/Re-pread
11=pwritev/Re-pwritev
12=preadv/Re-preadv
$ ./iozone -i [test-type]
4. Specify the file size using iozone -s
By default, iozone will automatically create
temporary files of size from 64k to 512M, to perform various testing
5. Specify the record size for testing using iozone -r
When you run a test, for a specific file size, it tests with different
record sizes ranging from 4k to 16M.
ตีวอย่าง..
/opt/iozone/bin/iozone -R -l 5 -u 5 -r 4k -s 100m -F /home/f1 /home/f2 /home/f3 /home/f4 /home/f5
..
./iozone -o -i 0 -i 1 -i 2 -e -+n -r 128K -s 512M -u 1 -l 1 -F /mydata/test01
ทดสอบ
# information disk.
cat /sys/class/block/sda/device/model
ls -l /dev/disk/by-id/
TOSHIBA DT01ACA3
./iozone -o -i 0 -i 1 -i 2 -e -+n -r 4K -s 128M -u 1 -l 1 -F /mydata/test01
ทดสอบ write ไฟล์ ขนาด 128 M ด้วย record ขนาด 4 K โดย ใช้ /mydata/test01 เป็น tempfile.
iops calculator.
http://www.wmarow.com/strcalc/
การเพิ่ม จำนวน disk สามารถ เพิ่ม IOPS ได้ ซึงหาก เพิ่มจำ นวน disk หมายถึงการ ทำ raid.
Raid type มีผลต่อ IOPS
สำหรับ HDD ความเร็วรอบ มีผลต่อ ค่า IOPS
การคำนวณ IOPS โดยประมาณ
Ref. http://jairocetina.blogspot.com/2011/08/calculate-iops-in-disk-or-storage-array.html
Calculation
It is very simple. Let’s suppose you have 15000 rpm disk with average seek time 2ms. 150000 rotations per minute means disk will rotate
15000 / 60s = 250 times per second
and that means that one rotation will take
1s / 250 = 4 ms
In average case it will take half of that to rotate disk platter to the right place. Now add that to the seek time and you’ll get the total time needed to serve one I/O request. Divide 1 sec (1000 ms) with 4ms + 2ms and you’ll get
1000 / 6 = 167 IOPS
An outcome with more precision is:
Model: Western Digital VelociRaptor 2.5″ SATA hard drive
Rotational speed: 10,000 RPM
Average latency: 3 ms (0.003 seconds)
Average seek time: 4.2 (r)/4.7 (w) = 4.45 ms (0.0045 seconds)
Calculated IOPS for this disk: 1/(0.003 + 0.0045) = about 133 IOPS
In a RAID is important see penalties in the following table:
## I/O Impact
RAID level Read Write
0 1 1
(10) 1 2
5 1 4
6 1 6
ถ้า DISK 15000 rpm ค่า IOPS อยู่ที่ประมาณ 167
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
[ran-read-buf] rw=randread size=5G direct=0 directory=/home/benm bs=4k name=ran-read-buf group_reporting ioengine=sync loops=1 iodepth=1 [ran-read-dir] rw=randread size=5G direct=1 directory=/home/benm bs=4k name=ran-read-dir group_reporting ioengine=sync loops=1 iodepth=1 #numjobs=5 [seq-read-buf] rw=read size=5G direct=0 directory=/home/benm bs=4k name=seq-read-buf #group_reporting ioengine=sync ioengine=libaio loops=1 iodepth=1 [seq-read] rw=read size=5G direct=1 directory=/home/benm bs=4k name=seq-read group_reporting ioengine=sync loops=1 iodepth=1 ## ran-write-buf.fio ## [ran-write-buf] rw=randwrite size=10G direct=1 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ iodepth=1 group_reporting name=ran-write-buf [ran-write-dir] rw=randwrite size=10G direct=1 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ iodepth=1 group_reporting name=ran-write-dir [seq-write-buf] rw=write size=16G direct=0 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ iodepth=1 group_reporting name=seq-write-buf #runtime=10 [seq-write-dir] rw=write size=16G direct=1 bs=4k directory=/home/benm/ iodepth=1 group_reporting name=seq-write-dir #runtime=10 |
#Plot Graf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[random-read] rw=randread size=512m ioengine=libaio iodepth=4 direct=1 bs=4k directory=/home/benm numjobs=4 log_avg_msec=1000 write_bw_log=read write_lat_log=read write_iops_log=read group_reporting |
#Test Disk
fio global.fio
#plot graf
fio_generate_plots ceph
ทดลอง ทดสอบ SSD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
[random-read] rw=randread size=512m ioengine=libaio iodepth=4 direct=1 bs=4k directory=/home/benm numjobs=1 #log_avg_msec=1000 write_bw_log=read-nonssd write_lat_log=read-nonssd write_iops_log=read-nonssd group_reporting [random-read] rw=randread size=1512M ioengine=libaio iodepth=4 direct=1 bs=4k directory=/home/benm/ssd numjobs=1 log_avg_msec=100 write_bw_log=read-ssd write_lat_log=read-ssd write_iops_log=read-ssd [ran-write-dir] rw=randwrite size=86m direct=1 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ iodepth=1 group_reporting name=ran-write-dir write_bw_log=write-nonssd write_lat_log=write-nonssd write_iops_log=write-nonssd log_avg_msec=100 [ran-write-dir] rw=randwrite size=2G direct=1 bs=4k #refill_buffers #numjobs=5 directory=/home/benm/ssd iodepth=1 name=ran-write-ssd write_bw_log=write-ssd write_lat_log=write-ssd write_iops_log=write-ssd |
#Read write direct block size 4k
fio_generate_plots bendisk
คำสั่งในการ plots graph