1.クラウドハードドライブのパフォーマンスメトリック
クラウドハードドライブのパフォーマンス指標は、通常、次の指標によって測定されます
- IOPS:1秒あたりの読み取りと書き込みの数(時間(カウント))。ストレージデバイスの基盤となるドライブタイプによって、さまざまな
IOPSの合計IOPSが決まります
。1秒あたりに実行されるI / O操作の合計数です。ランダム読み取りIOPS:
1秒あたりに指定されるランダム読み取りI / O操作の平均数。ランダム書き込みIOPS。 1秒あたりに指定されたランダム書き込みI / O操作の平均数
シーケンシャル読み取りIOPS1
秒あたりに指定されたシーケンシャル読み取りI / O操作の平均数シーケンシャル書き込みIOPS1秒あたりに指定されたシーケンシャル書き込みI / O操作の平均数 - スループット:1秒あたりの読み取りおよび書き込みデータの量。単位は、MB / S
スループットの市場価値の単位時間あたりに正常に送信できるデータの量です。
Hadoopオフラインコンピューティングサービスなどの一般的なシナリオである、多数の順次読み取りおよび書き込みアプリケーションをデプロイする必要がある場合は、スループットに注意を払う必要があります。 -
レイテンシー:IO操作の送信時間から受信確認までの経過時間(秒単位)。
アプリケーションがデータベースなどのレイテンシーの影響を受けやすい場合(レイテンシーが長すぎると、アプリケーションのパフォーマンスが低下したりエラーが発生したりします)、使用することをお勧めします。 SSDストレージ2.特定のパラメーターの説明
[root@host-10-0-1-36 ~]# fio --bs=4k --ioengine=libaio --iodepth=1 --direct=1 --rw=read --time_based --runtime=600 --refill_buffers --norandommap --randrepeat=0 --group_reporting --name=fio-read --size=100G --filename=/dev/vdb
fio-read: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.1
Starting 1 process
Jobs: 1 (f=1): [R(1)][100.0%][r=9784KiB/s,w=0KiB/s][r=2446,w=0 IOPS][eta 00m:00s]
fio-read: (groupid=0, jobs=1): err= 0: pid=22004: Wed Oct 10 21:35:42 2018
read: IOPS=2593, BW=10.1MiB/s (10.6MB/s)(6078MiB/600001msec)
slat (usec): min=4, max=1532, avg=11.98, stdev= 8.10
clat (nsec): min=1021, max=66079k, avg=370367.39, stdev=395393.29
lat (usec): min=44, max=66086, avg=382.88, stdev=399.21
clat percentiles (usec):
| 1.00th=[ 42], 5.00th=[ 44], 10.00th=[ 45], 20.00th=[ 46],
| 30.00th=[ 48], 40.00th=[ 51], 50.00th=[ 383], 60.00th=[ 578],
| 70.00th=[ 644], 80.00th=[ 701], 90.00th=[ 783], 95.00th=[ 865],
| 99.00th=[ 988], 99.50th=[ 1020], 99.90th=[ 1336], 99.95th=[ 2057],
| 99.99th=[11338]
bw ( KiB/s): min= 2000, max=68272, per=99.98%, avg=10370.55, stdev=8123.28, samples=1199
iops : min= 500, max=17068, avg=2592.62, stdev=2030.82, samples=1199
lat (usec) : 2=0.01%, 20=0.01%, 50=37.97%, 100=10.63%, 250=0.39%
lat (usec) : 500=6.09%, 750=31.54%, 1000=12.65%
lat (msec) : 2=0.67%, 4=0.03%, 10=0.01%, 20=0.01%, 50=0.01%
lat (msec) : 100=0.01%
cpu : usr=1.43%, sys=5.12%, ctx=1555984, majf=0, minf=35
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwt: total=1556003,0,0, short=0,0,0, dropped=0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
READ: bw=10.1MiB/s (10.6MB/s), 10.1MiB/s-10.1MiB/s (10.6MB/s-10.6MB/s), io=6078MiB (6373MB), run=600001-600001msec
Disk stats (read/write):
vdb: ios=1555778/0, merge=0/0, ticks=570518/0, in_queue=569945, util=95.04%
パラメータの詳細 | 意味 |
---|---|
私 | 実行されたMIOの数 |
bw | 平均IO帯域幅 |
iops | IOPS |
周り | スレッドの実行時間 |
スラット | 提出の遅れ |
データ | 完了の遅延 |
年 | 反応時間 |
CPU | CPU使用率 |
IO深度 | ioキュー |
IO送信 | 1回のIO送信で送信されるIOの数 |
完了しました | |
IOが発行されました | |
IOレイテンシ |
3.FIOテストツールのパラメーターの説明
[root@host-10-0-1-36 ~]# fio -direct=1 -iodepth=64 -rw=read -ioengine=libaio -bs=4096k -size=100G -numjobs=1 -runtime=300 -group_reporting -filename=/dev/vdb -name=Write_PPS_Testing
パラメータ | 説明 |
---|---|
-direct = 1 | テスト中にI / Oキャッシュが無視され、データが直接書き込まれることを示します |
-iodepth = 128 | AIOを使用する場合、同時I / O数の上限が128であることを示します。 |
-rw = randwrite | テスト中の読み取りおよび書き込み戦略がランダム書き込みであることを示します。他のテストでは、次のように設定できます。randread(ランダム読み取り)read(シーケンシャル読み取り)write(シーケンシャル書き込み)randrw(ランダム読み取りと書き込みの混合) |
-ioengine = libaio | テストメソッドがlibaio(Linux AIO、非同期I / O)であることを示します。アプリケーションは通常、次の2つの方法でI / Oを使用します。同期:同期I / Oは、一度に1つのI / O要求のみを発行でき、カーネルが完了するのを待ってから戻ります。このように、単一スレッドのiodepthは常に1未満ですが、複数のスレッドを同時に実行することで解決できます。通常、16〜32のスレッドを使用して、同時に作業し、iodepthを埋めます。非同期:非同期I / Oは通常、libaioを使用して一度にI / O要求のバッチを送信し、バッチの完了を待って対話の数を減らします。これにより、より効率的になります。 |
-bs = 4k | 1つのI / Oのブロックファイルサイズが4KBであることを示します。このパラメーターが指定されていない場合のデフォルトサイズも4KBです。IOPSをテストするときは、bsを比較的小さい値(この例では4kなど)に設定することをお勧めします。スループットをテストするときは、bsをより大きな値(この例では1024kなど)に設定することをお勧めします。 |
-サイズ= 1G | テストファイルのサイズが1GiBであることを示します |
-numjobs = 1 | テストスレッドの数が1であることを示します |
-ランタイム= 1000 | テスト時間が1000秒であることを示します。設定されていない場合は、前述の-sizeで指定されたサイズのファイルを書き込み続け、毎回-bs値でブロックサイズを書き込みます。 |
-group_reporting | さまざまなジョブの要約表示情報ではなく、各プロセスの統計情報がテスト結果に要約されることを意味します |
-ファイル名= iotest | iotestなどのテストファイルの名前を指定します。ベアディスクをテストすると、実際のハードディスクのパフォーマンスを得ることができますが、ベアディスクを直接テストすると、ファイルシステム構造が破壊されます。テストの前に、データのバックアップを作成してください。 |
-name = Rand_Write_Testing | テストタスク名がRand_Write_Testingであることを示します。これは、自由に設定できます。 |
4.テスト結果
ここでは、4Kデータブロックテストのランダム読み取りとランダム書き込みを使用して最大IOPSをテストし、4Mブロックテストの順次読み取りと順次書き込みを使用して最大スループットをテストします。
- 4Kブロックのランダム書き込みをテストする
[root@host-10-0-1-36 ~]# fio --bs=4k --ioengine=libaio --iodepth=128 --direct=1 --rw=randwrite --time_based --runtime=300 --refill_buffers --norandommap --randrepeat=0 --group_reporting --name=fio-write --size=1G --filename=/dev/vdb
fio-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128
fio-3.1
Starting 1 process
Jobs: 1 (f=1): [w(1)][100.0%][r=0KiB/s,w=3996KiB/s][r=0,w=999 IOPS][eta 00m:00s]
fio-write: (groupid=0, jobs=1): err= 0: pid=22050: Wed Oct 10 22:29:32 2018
write: IOPS=2819, BW=11.0MiB/s (11.5MB/s)(3309MiB/300484msec)
slat (usec): min=2, max=2399, avg= 9.54, stdev=10.19
clat (usec): min=1180, max=3604.0k, avg=45387.25, stdev=168013.09
lat (usec): min=1201, max=3604.0k, avg=45397.35, stdev=168013.57
clat percentiles (usec):
| 1.00th=[ 1713], 5.00th=[ 2212], 10.00th=[ 2835],
| 20.00th=[ 4015], 30.00th=[ 5211], 40.00th=[ 6849],
| 50.00th=[ 8979], 60.00th=[ 11994], 70.00th=[ 17695],
| 80.00th=[ 33162], 90.00th=[ 61604], 95.00th=[ 137364],
| 99.00th=[ 893387], 99.50th=[1266680], 99.90th=[2122318],
| 99.95th=[2432697], 99.99th=[2969568]
bw ( KiB/s): min= 8, max=49120, per=100.00%, avg=11603.11, stdev=10950.79, samples=584
iops : min= 2, max=12280, avg=2900.77, stdev=2737.69, samples=584
lat (msec) : 2=3.16%, 4=16.75%, 10=33.83%, 20=18.49%, 50=14.82%
lat (msec) : 100=6.56%, 250=2.86%, 500=1.49%, 750=0.70%, 1000=0.53%
lat (msec) : 2000=0.69%, >=2000=0.12%
cpu : usr=1.84%, sys=4.16%, ctx=323739, majf=0, minf=28
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.0%, >=64=0.1%
issued rwt: total=0,847133,0, short=0,0,0, dropped=0,0,0
latency : target=0, window=0, percentile=100.00%, depth=128
Run status group 0 (all jobs):
WRITE: bw=11.0MiB/s (11.5MB/s), 11.0MiB/s-11.0MiB/s (11.5MB/s-11.5MB/s), io=3309MiB (3470MB), run=300484-300484msec
Disk stats (read/write):
vdb: ios=91/847074, merge=0/0, ticks=3/38321566, in_queue=38360706, util=100.00%
我们可以看到4K的数据块,随机写的最大IOPS为:12280
- 测试4K的随机读
[root@host-10-0-1-36 ~]# fio --bs=4k --ioengine=libaio --iodepth=128 --direct=1 --rw=randread --time_based --runtime=300 --refill_buffers --norandommap --randrepeat=0 --group_reporting --name=fio-write --size=1G --filename=/dev/vdb
fio-write: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128
fio-3.1
Starting 1 process
Jobs: 1 (f=1): [r(1)][100.0%][r=87.1MiB/s,w=0KiB/s][r=22.3k,w=0 IOPS][eta 00m:00s]
fio-write: (groupid=0, jobs=1): err= 0: pid=22055: Wed Oct 10 22:51:54 2018
read: IOPS=22.3k, BW=87.0MiB/s (91.2MB/s)(25.5GiB/300004msec)
slat (usec): min=2, max=8626, avg= 7.91, stdev=11.85
clat (usec): min=36, max=71810, avg=5735.17, stdev=1405.20
lat (usec): min=45, max=71826, avg=5743.59, stdev=1405.30
clat percentiles (usec):
| 1.00th=[ 1958], 5.00th=[ 3556], 10.00th=[ 4424], 20.00th=[ 5145],
| 30.00th=[ 5407], 40.00th=[ 5604], 50.00th=[ 5735], 60.00th=[ 5866],
| 70.00th=[ 6063], 80.00th=[ 6259], 90.00th=[ 6783], 95.00th=[ 7504],
| 99.00th=[10290], 99.50th=[12256], 99.90th=[16712], 99.95th=[18482],
| 99.99th=[25035]
bw ( KiB/s): min=74872, max=93240, per=100.00%, avg=89121.48, stdev=2687.55, samples=600
iops : min=18718, max=23310, avg=22280.35, stdev=671.89, samples=600
lat (usec) : 50=0.01%, 100=0.01%, 250=0.01%, 500=0.02%, 750=0.06%
lat (usec) : 1000=0.12%
lat (msec) : 2=0.86%, 4=6.02%, 10=91.77%, 20=1.11%, 50=0.03%
lat (msec) : 100=0.01%
cpu : usr=6.56%, sys=28.57%, ctx=3473136, majf=0, minf=160
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.0%, >=64=0.1%
issued rwt: total=6683408,0,0, short=0,0,0, dropped=0,0,0
latency : target=0, window=0, percentile=100.00%, depth=128
Run status group 0 (all jobs):
READ: bw=87.0MiB/s (91.2MB/s), 87.0MiB/s-87.0MiB/s (91.2MB/s-91.2MB/s), io=25.5GiB (27.4GB), run=300004-300004msec
Disk stats (read/write):
vdb: ios=6680955/0, merge=0/0, ticks=37981396/0, in_queue=37983491, util=100.00%
我们可以看到4K的数据块,随机读的最大IOPS为:23310
- 测试4M的顺序写
[root@host-10-0-1-36 ~]# fio -direct=1 -iodepth=64 -rw=write -ioengine=libaio -bs=4096k -size=100G -numjobs=1 -runtime=300 -group_reporting -filename=/dev/vdb -name=Write_PPS_Testing
Write_PPS_Testing: (g=0): rw=write, bs=(R) 4096KiB-4096KiB, (W) 4096KiB-4096KiB, (T) 4096KiB-4096KiB, ioengine=libaio, iodepth=64
fio-3.1
Starting 1 process
Jobs: 1 (f=1): [W(1)][100.0%][r=0KiB/s,w=108MiB/s][r=0,w=27 IOPS][eta 00m:00s]
Write_PPS_Testing: (groupid=0, jobs=1): err= 0: pid=22098: Wed Oct 10 23:20:07 2018
write: IOPS=28, BW=115MiB/s (120MB/s)(33.7GiB/300466msec)
slat (usec): min=564, max=2554.1k, avg=34767.87, stdev=65067.32
clat (msec): min=400, max=12179, avg=2188.04, stdev=1037.46
lat (msec): min=473, max=12231, avg=2222.81, stdev=1047.45
clat percentiles (msec):
| 1.00th=[ 1435], 5.00th=[ 1586], 10.00th=[ 1653], 20.00th=[ 1754],
| 30.00th=[ 1838], 40.00th=[ 1921], 50.00th=[ 2005], 60.00th=[ 2089],
| 70.00th=[ 2198], 80.00th=[ 2333], 90.00th=[ 2534], 95.00th=[ 2802],
| 99.00th=[ 8490], 99.50th=[ 9731], 99.90th=[11745], 99.95th=[12013],
| 99.99th=[12147]
bw ( KiB/s): min= 8192, max=196608, per=100.00%, avg=120954.04, stdev=31456.39, samples=580
iops : min= 2, max= 48, avg=29.53, stdev= 7.68, samples=580
lat (msec) : 500=0.02%, 750=0.03%, 1000=0.13%, 2000=49.25%, >=2000=50.56%
cpu : usr=1.04%, sys=2.16%, ctx=6387, majf=0, minf=29
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.4%, >=64=99.3%
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 rwt: total=0,8627,0, short=0,0,0, dropped=0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
WRITE: bw=115MiB/s (120MB/s), 115MiB/s-115MiB/s (120MB/s-120MB/s), io=33.7GiB (36.2GB), run=300466-300466msec
Disk stats (read/write):
vdb: ios=91/77596, merge=0/0, ticks=6/37685137, in_queue=37717833, util=99.99%
我们可以看到4M的数据块,顺序写的最大吞吐量为:196M
- 测试4M的顺序读
[root@host-10-0-1-36 ~]# fio -direct=1 -iodepth=64 -rw=read -ioengine=libaio -bs=4096k -size=100G -numjobs=1 -runtime=300 -group_reporting -filename=/dev/vdb -name=Write_PPS_Testing
Write_PPS_Testing: (g=0): rw=read, bs=(R) 4096KiB-4096KiB, (W) 4096KiB-4096KiB, (T) 4096KiB-4096KiB, ioengine=libaio, iodepth=64
fio-3.1
Starting 1 process
Jobs: 1 (f=1): [R(1)][100.0%][r=312MiB/s,w=0KiB/s][r=78,w=0 IOPS][eta 00m:00s]
Write_PPS_Testing: (groupid=0, jobs=1): err= 0: pid=22103: Wed Oct 10 23:26:31 2018
read: IOPS=35, BW=142MiB/s (149MB/s)(41.6GiB/300201msec)
slat (usec): min=469, max=95190, avg=28166.40, stdev=15966.53
clat (msec): min=185, max=4070, avg=1772.98, stdev=551.21
lat (msec): min=205, max=4107, avg=1801.15, stdev=558.25
clat percentiles (msec):
| 1.00th=[ 518], 5.00th=[ 634], 10.00th=[ 751], 20.00th=[ 1536],
| 30.00th=[ 1770], 40.00th=[ 1854], 50.00th=[ 1921], 60.00th=[ 1989],
| 70.00th=[ 2039], 80.00th=[ 2140], 90.00th=[ 2299], 95.00th=[ 2433],
| 99.00th=[ 2802], 99.50th=[ 2970], 99.90th=[ 3473], 99.95th=[ 3641],
| 99.99th=[ 3775]
bw ( KiB/s): min=106496, max=466944, per=99.97%, avg=145216.28, stdev=60136.24, samples=597
iops : min= 26, max= 114, avg=35.45, stdev=14.68, samples=597
lat (msec) : 250=0.10%, 500=0.66%, 750=9.21%, 1000=7.02%, 2000=46.51%
lat (msec) : >=2000=36.51%
cpu : usr=0.05%, sys=2.61%, ctx=10959, majf=0, minf=672
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.3%, >=64=99.4%
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 rwt: total=10646,0,0, short=0,0,0, dropped=0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=142MiB/s (149MB/s), 142MiB/s-142MiB/s (149MB/s-149MB/s), io=41.6GiB (44.7GB), run=300201-300201msec
Disk stats (read/write):
vdb: ios=95740/0, merge=0/0, ticks=37360788/0, in_queue=37382226, util=100.00%
我们可以看到4M的数据块,顺序读的最大吞吐量为:466M