クラウドディスクのベンチマーク #1 Ultra編

この記事は Alibaba Cloud の日本サイト の環境(ドキュメントやアカウント、そのアカウントでの検証結果)に基づいて記載しています。 日本サイトと国際サイトでは各プロダクトごとに提供機能が一部異なることがあります(そのほとんどは国際サイトの方が日本サイトよりも多機能になっている)。記事の内容は適宜最新化する予定です。

ECSで利用するブロックディスク”Ultra クラウドディスク”について、性能限界を求めて色々とテストしてみます。 1台のECSで23,500 IOPS、1,172MB/s の性能を確認出来ました。

はじめに結論

今回のテスト内容は、Alibaba Cloud ECSに追加した16個のUltra クラウドディスクをLVMでストライピングし、fioでベンチマークすることです。

当初の目論見は、5,000 IOPS & 140MbpsのUltraクラウドディスクを16個でストライプし、80,000 IOPSと2,240Mbpsの達成(どこまで近づけるか)でした。

構成イメージは以下。

この画像には alt 属性が指定されておらず、ファイル名は image-44-1024x474.png です

結果は以下。

  • Aliyun LinuxのLVMでは最大8つまでしかストライピングを構成出来ず。
  • IOPSは最大23,500を計測。理論性能の40,000 IOPSには及ばず。
  • スループットは最大1,118 MiB/sを計測。理論性能の1120MBs(140Mbps×8)にほぼ近い性能を確認
  • IOPSについてはよりCPUが多いECSタイプファミリーを利用することでスループットが伸びる可能性あり(ただし、fio実行時topコマンドを見る限りCPUリソースは50%以下の使用率だったことは確認済)
  • 最大性能 25,000 IOPSのSSDクラウドディスクとUltra クラウドディスクの価格差は4倍となる。 IOPSを求める場合はUltra クラウドディスクをストライピングするよりもSSD クラウドディスクを利用することが安価でシンプル
  • スループット重視の場合、SSDクラウドディスクの最大300MB/sとなるため、Ultraクラウドディスクのストライピング構成が望ましいケースもありうる

公式ドキュメントにおける性能情報

公式ドキュメント上に性能情報は詳細に公開されています。 Ultra クラウドディスクとSSD クラウドディスクの両方についてIOPSやスループットの最大値、分散ディスクならではのパフォーマンスの算出式まで公開されています。

URLはこちら

※上記表中の汎用クラウドディスクは日本サイト契約では利用出来ない模様(コンソールの購入画面に出てこない)

最大IOPSを利用するには?

分散型のストレージということで性能は容量にスケールところがあります。 上記のパフォーマンス計算式で都度計算しても良いのですが簡単に確認可能です。

コンソールからECSの購入画面に移動します。 ストレージのところで容量を入力すると、横にその容量に応じたIOPSの目安が表示されます。 下の例では400GBで5,000IOPSです。

試しに399GBにします。IOPSは4,992 です。 Ultra クラウドディスクの性能上限の5,000 IOPSを利用するには400GBの容量が必要なことがわかりました。

この要領でSSD クラウドディスクも確認しました。結果は以下。

Ultra クラウドディスクなら400GBを超えた時点で最大性能の5,000 IOPSとなります。 SSDは774GB時に25,000 IOPSです。 システムディスクは要領上限の500GBがボトルネックとなっています。

Ultra クラウドディスクSSD クラウドディスク
システムディスク400GB
※5,000 IOPS
500GB
※16,800 IOPS
データディスク400GB
※5,000 IOPS
774GB
※25,000 IOPS

HDDしかなかった頃に5,000 IOPSを達成しようとすると、RAID構成によりますが15,000 rpmのディスクがざっくりと40-50本必要でした。 VDI(仮想デスクトップ)のシステムではやたらIOが必要です。容量は不要にもかかわらずIOPSを欲しいがために100本OverのSASディスクを構成したものです。

それが今ではたった400GBで5,000 IOPSです。 6円/GBのUltra クラウドディスクですから400GB×6円=2,400円/月のコストです。 検証目的であれば1時間あたり数十円で利用出来る良い時代になったものです。

Ultra クラウドディスクの限界に挑戦

上記で紹介した公式ドキュメントにはUltra クラウドディスクの性能上限は5,000 IOPSと明記されていますし、ちょっと下の方には丁寧にディスク性能のテスト方法まで案内されています。

URLはこちら

今回、Ultra クラウドディスクの性能上限5,000 IOPSを単純に追試する気はありません。 限界への挑戦ということで、ECSインスタンスの仕様上限までドライブを追加し、OS上でストライピングを構成し、どこまで性能が出るか確認します。 

システムの構成イメージは以下。 仕様上限の16個のデータディスクを追加しLVMでストライピングを構成します。

ECSインスタンスの購入

ECSの購入画面はこんな感じです。 画面に16本のディスクが収まりません。そして、1時間の課金は100円以下です。

購入を進めます。

しかし、「Living postPaind disks quota exceeded.」とのメッセージで購入出来ません。

Alibaba Cloudの標準で設定されているQuotaを超える操作(購入)だったようです。 チケットから上限緩和も出来そうですがまずは仕様を見てみます。

公式ドキュメントを確認します。 ブロックストレージの仕様の表の1番目に記載がありましたね。 従量課金インスタンス数の5倍までしかクラウドディスクを追加出来ないとのこと。

URLはこちら

今回はチケットによる緩和申請ではなく、このテストのためにECSインスタンスの従量課金を追加で3台購入することにします。 バーストタイプのt5の最小スペックですと1時間あたり2円弱で利用できます。

3台追加し、その3台のECSインスタンスが起動したことを確認した後に、再度実行します。 問題なく購入できました。

LVMによるストライプの設定

起動したECSインスタンスにログインし、ディスク状況を確認します。

/dev/vdaはシステムディスク、/dev/vdb~vdqまでは追加した16本のデータディスクとして問題なく認識できています。

[root@benchmark ~]# fdisk -l
Disk /dev/vda: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a56c1
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 838858751 419428352 83 Linux

Disk /dev/vdb: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdc: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdd: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vde: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdf: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdg: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdh: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdi: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdj: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdk: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdl: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdm: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdn: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdo: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdp: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vdq: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

まずは/dev/vdbのパーティションを設定します。

[root@benchmark ~]# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xd3190ec4.
Command (m for help): p
Disk /dev/vdb: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xd3190ec4
Device Boot Start End Blocks Id System
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-838860799, default 2048): 2048
Last sector, +sectors or +size{K,M,G} (2048-838860799, default 838860799):
Using default value 838860799
Partition 1 of type Linux and of size 400 GiB is set
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): L
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
f W95 Ext’d (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
1e Hidden W95 FAT1 80 Old Minix
Hex code (type L to list all codes): 8e
Changed type of partition ‘Linux’ to ‘Linux LVM’
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

念のため/dev/vdbのパーティションを確認します。

[root@benchmark ~]# fdisk -l /dev/vdb
Disk /dev/vdb: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xd3190ec4
Device Boot Start End Blocks Id System
/dev/vdb1 2048 838860799 419429376 8e Linux LVM

のこりの15個のディスクも同様にパーティションを設定します。 手動では面倒なのと間違いそうなのでシェルを作ります。

#!/bin/sh
for i in {c,d,e,f,g,h,i,j,k,l,m,n,o,p,q};
do
sfdisk -d /dev/vdb | sfdisk /dev/vd${i} –force
done

このシェルを実行すると/dev/vd[c-q]までパーティションが設定されます。

結果をfdisk -lで確認します。

[root@benchmark ~]# fdisk -l
Disk /dev/vda: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a56c1
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 838858751 419428352 83 Linux

Disk /dev/vdb: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xd3190ec4
Device Boot Start End Blocks Id System
/dev/vdb1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdc: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdc1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdd: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdd1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vde: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vde1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdf: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdf1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdg: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdg1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdh: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdh1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdi: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdi1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdj: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdj1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdk: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdk1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdl: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdl1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdm: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdm1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdn: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdn1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdo: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdo1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdp: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdp1 2048 838860799 419429376 8e Linux LVM

Disk /dev/vdq: 429.5 GB, 429496729600 bytes, 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/vdq1 2048 838860799 419429376 8e Linux LVM

LVMにおけるPhysical Volumeを作成します。

[root@benchmark ~]# pvcreate /dev/vdb1 /dev/vdc1 /dev/vdd1 /dev/vde1 /dev/vdf1 /dev/vdg1 /dev/vdh1 /dev/vdi1 /dev/vdj1 /dev/vdk1 /dev/vdl1 /dev/vdm1 /dev/vdn1 /dev/vdo1 /dev/vdp1 /dev/vdq1
Physical volume “/dev/vdb1” successfully created.
Physical volume “/dev/vdc1” successfully created.
Physical volume “/dev/vdd1” successfully created.
Physical volume “/dev/vde1” successfully created.
Physical volume “/dev/vdf1” successfully created.
Physical volume “/dev/vdg1” successfully created.
Physical volume “/dev/vdh1” successfully created.
Physical volume “/dev/vdi1” successfully created.
Physical volume “/dev/vdj1” successfully created.
Physical volume “/dev/vdk1” successfully created.
Physical volume “/dev/vdl1” successfully created.
Physical volume “/dev/vdm1” successfully created.
Physical volume “/dev/vdn1” successfully created.
Physical volume “/dev/vdo1” successfully created.
Physical volume “/dev/vdp1” successfully created.
Physical volume “/dev/vdq1” successfully created.

確認します。

[root@benchmark ~]# pvdisplay
“/dev/vdj1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdj1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID TCZAJj-njOz-fR5R-ojyK-Ueo7-dMDI-0yhhvV
“/dev/vdl1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdl1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID KDP8jl-183G-8nuZ-q8Z9-Cr2b-JwmH-FLNnp1
“/dev/vde1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vde1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID sqrh4a-0F3p-GXSa-oaRX-ILON-KCLZ-aU9YyQ
“/dev/vdn1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdn1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID QC4aXe-KrO0-2ea7-VkTX-X6Zk-97dW-avEN4k
“/dev/vdq1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdq1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID sMxW8s-oAU8-CnqS-a1Cb-Ubh2-6UrG-x3WyvG
“/dev/vdm1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdm1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID BhqimY-xJBL-3icm-igxQ-bUsq-oVSe-ytuSzk
“/dev/vdb1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdb1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID JutYem-sV7R-h7dB-oImZ-Zi5R-ApBk-1feul1
“/dev/vdk1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdk1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID ZPM5C6-iTkI-CR9c-GRfF-Da94-tmZ8-clcC7E
“/dev/vdo1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdo1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID U8RoiQ-GOhG-DRwz-2VZd-SUDv-K2by-L4dsa2
“/dev/vdp1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdp1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID Iu26S7-WQzU-Wuxf-VrpE-fTs1-spTU-mhHpJZ
“/dev/vdi1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdi1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID vKrVTl-1Rie-7C2h-3rlK-zMLg-bfmW-UlWVIs
“/dev/vdd1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdd1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID ucaOpj-8Hpt-OAww-l8kN-mUKl-J037-XzWjQ7
“/dev/vdc1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdc1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID 33WVKn-mrWQ-TnZ9-1qPp-tzxo-zfUY-KkqL0S
“/dev/vdf1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdf1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID UnTyl9-GybK-6H8O-w4Nj-ereB-U1iG-VHbLfi
“/dev/vdg1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdg1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID X1Mxs6-2jug-MtBt-TUcA-RA2l-2OTP-Gj76jb
“/dev/vdh1” is a new physical volume of “400.00 GiB”
— NEW Physical volume —
PV Name /dev/vdh1
VG Name
PV Size 400.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID h4Vwlz-bTjJ-e7oc-JKMq-Tcel-KfuX-k3y3i6

ボリュームグループを作成します。

[root@benchmark ~]# vgcreate bigriver /dev/vdb1 /dev/vdc1 /dev/vdd1 /dev/vde1 /dev/vdf1 /dev/vdg1 /dev/vdh1 /dev/vdi1 /dev/vdj1 /dev/vdk1 /dev/vdl1 /dev/vdm1 /dev/vdn1 /dev/vdo1 /dev/vdp1 /dev/vdq1
Volume group “bigriver” successfully created

確認します。

[root@benchmark ~]# vgs
VG #PV #LV #SN Attr VSize VFree
bigriver 16 0 0 wz–n- 6.25t 6.25t

論理ボリュームをストライピングで構成します。 失敗しました。最大8つのストライピングまでしか対応しないとのこと。 

[root@benchmark ~]# lvcreate –name lv-bigriver –size 6.25T -i16 bigriver
Using default stripesize 64.00 KiB.
Only up to 8 stripes in striped supported currently.
Run `lvcreate –help’ for more information.

テスト内容を見直します。でとりあえず8ドライブでストライピングします。

[root@benchmark ~]# lvcreate –name lv-bigriver –size 3.25T -i8 bigriver
Using default stripesize 64.00 KiB.
Logical volume “lv-bigriver” created.

論理ボリュームを確認します。

[root@benchmark ~]# lvdisplay
— Logical volume —
LV Path /dev/bigriver/lv-bigriver
LV Name lv-bigriver
VG Name bigriver
LV UUID 0KL0BL-wEfd-9wWq-k862-88hA-BVUE-eS0K8D
LV Write Access read/write
LV Creation host, time benchmark, 2019-03-02 14:58:07 +0800
LV Status available
# open 0
LV Size 3.25 TiB
Current LE 851968
Segments 2
Allocation inherit
Read ahead sectors auto
currently set to 2048
Block device 252:0

xfsでフォーマットします。

[root@benchmark ~]# mkfs.xfs -d su=64k,sw=8 /dev/bigriver/lv-bigriver
meta-data=/dev/bigriver/lv-bigriver isize=512 agcount=32, agsize=27262960 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=872414720, imaxpct=5
= sunit=16 swidth=128 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=425984, version=2
= sectsz=512 sunit=16 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

マウントします。

[root@benchmark ~]# mkdir /benchmark
[root@benchmark ~]# mount /dev/bigriver/lv-bigriver /benchmark/
[root@benchmark ~]# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
devtmpfs 3981 0 3981 0% /dev
tmpfs 3992 0 3992 0% /dev/shm
tmpfs 3992 1 3992 1% /run
tmpfs 3992 0 3992 0% /sys/fs/cgroup
/dev/vda1 403044 1755 380793 1% /
tmpfs 799 0 799 0% /run/user/0
/dev/mapper/bigriver-lv–bigriver 3406206 34 3406173 1% /benchmark

fioのインストール

Aliyun Linuxには標準でインストールされていませんでした。インストールします。

[root@benchmark ~]# yum install fio
~省略~

Installed:
fio.x86_64 0:3.1-1.el7
Dependency Installed:
libibverbs.x86_64 0:1.2.1-1.4.al7 libpmem.x86_64 0:1.1-4.4.al7
libpmemblk.x86_64 0:1.1-4.4.al7 librados2.x86_64 1:0.94.5-1.4.al7
librbd1.x86_64 1:0.94.5-1.4.al7 librdmacm.x86_64 0:1.1.0-2.4.al7
Complete!

fioベンチマーク

テスト#1 Random Write (4k)

[root@benchmark benchmark]# fio -direct=1 -iodepth=128 -rw=randwrite -ioengine=libaio -bs=4k -size=10G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Rand_Write_Testing
~省略~
write: IOPS=23.4k, BW=91.6MiB/s (96.0MB/s)(10.0GiB/111824msec)
~省略

テスト#2 Random Write (64k)

[root@benchmark benchmark]# fio -direct=1 -iodepth=128 -rw=randwrite -ioengine=libaio -bs=64k -size=10G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Rand_Write_Testing
~省略~
write: IOPS=8704, BW=544MiB/s (570MB/s)(10.0GiB/18823msec)
~省略~

テスト#3 Random Read (4k)

[root@benchmark benchmark]# fio -direct=1 -iodepth=128 -rw=randread -ioengine=libaio -bs=4k -size=10G -numjobs=1 -runtime=1000 -group_reporting -filename =iotest -name=Rand_Read_Testing
~省略~
read: IOPS=23.5k, BW=91.8MiB/s (96.2MB/s)(10.0GiB/111598msec)
~省略~

テスト#4 Random Read (64k)

[root@benchmark benchmark]# fio -direct=1 -iodepth=128 -rw=randread -ioengine=libaio -bs=64k -size=10G -numjobs=1 -runtime=1000 -group_reporting -filename =iotest -name=Rand_Read_Testing
~省略~
read: IOPS=16.4k, BW=1023MiB/s (1073MB/s)(10.0GiB/10006msec)
~省略~

テスト#5 Sequential Write (64k)

[root@benchmark benchmark]# fio -direct=1 -iodepth=64 -rw=write -ioengine=libaio -bs=64k -size=10G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Write_PPS_Testing
~省略~
write: IOPS=14.4k, BW=901MiB/s (944MB/s)(10.0GiB/11369msec)
~省略~

テスト#6 Sequential Read (64k)

[root@benchmark benchmark]# fio -direct=1 -iodepth=64 -rw=read -ioengine=libaio -bs=64k -size=10G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Read_PPS_Testing
Read_PPS_Testing: (g=0): rw=read, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=64
~省略~
read: IOPS=17.9k, BW=1118MiB/s (1172MB/s)(10.0GiB/9160msec)
~省略~

まとめ

Alibaba Cloud ECSに追加した16個のUltra クラウドディスクをLVMでストライピングし、fioでベンチマークしました。

  • Aliyun LinuxのLVMでは最大8つまでしかストライピングを構成出来ず。
  • IOPSは最大23,500を計測。理論性能の5,000 IOPS×8ディスク=40,000 IOPSには及ばず
  • スループットは最大1,118 MiB/sを計測。理論性能の140MBps/s×8=1120MBにほぼ近い性能を確認
  • IOPSについてはよりCPUが多いECSでスループットが伸びる可能性はあり(ただし、fio実行時topコマンドを見る限りCPUリソースは50%以下の使用率ではあった)
  • 最大性能 25,000 IOPSのSSDクラウドディスクとUltra クラウドディスクの価格差は4倍となる。 IOPSを求める場合はUltra クラウドディスクをストライピングするよりもSSD クラウドディスクを利用することが望ましい
  • スループット重視の場合、SSDクラウドディスクの最大300MB/sとなるため、Ultraクラウドディスクのストライピング構成が望ましいケースもありうる

以上