さくらVPS SSDプランと計測方法
さくらのVPS SSD メモリ1Gプラン(石狩データセンター)のディスクI/O性能を計測しました。CentOS6.4の64ビット構成、ファイルシステムはEXT4、SSDの容量は50GBです。計測にあたっては、bonnie++を使用しました。bonnie++はYUMでインストールできます。
sudo yum install bonnie++
bonnie++のコマンドオプションは以下を使用しました。「ファイル数 256*1024、最大ファイルサイズ 4096byte、最小ファイルサイズ 512byte、ディレクトリ数 16」でREAD、WRITE性能を計測しました。
bonnie++ -d /tmp/ -n 256:4096:512:16 -s 2048 -r 1024
さくらVPS SSDプランのディスクI/O計測結果(CentOS6.4)
以下のような結果が出ました。
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
www.testvps.info 2G 764 99 850146 89 455966 59 3864 99 752452 44 11807 240
Latency 12294us 21917us 34822us 3400us 1704us 22524us
Version 1.96 ------Sequential Create------ --------Random Create--------
www.testvps.info -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files:max:min /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
256:4096:512/16 40048 88 3084 10 55117 87 40142 87 3750 14 21887 45
Latency 11365us 40984us 43019us 50010us 218ms 354ms
計測結果は、想像していたよりもかなり速いです。シーケンシャルは通常の市販のREAD / WrITE性能よりパフォーマンスが高い部分もあります。VPSということで、SSDとはいえディスクI/Oにもオーバーヘッドによるボトルネックは存在するかなと思っていたのですが、杞憂でした。
自宅デスクトップマシンのディスクI/O計測結果(openSUSE 12.3)
参考に、自宅デスクトップマシンで同じコマンドを実行した時の結果を出します。こちらはCrucial製Crucial m4 CT512M4SSD2の512GB SSDをSATA3接続で使っています。OSはopenSUSE 12.3、ファイルシステムはEXT4です。
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
rome.site 2G 1424 99 211867 8 199127 6 +++++ +++ +++++ +++ +++++ +++
Latency 8486us 182ms 143us 2276us 17us 128us
Version 1.96 ------Sequential Create------ --------Random Create--------
rome.site -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files:max:min /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
256:4096:512/16 34478 30 265589 83 91737 71 26866 23 51885 20 22702 24
Latency 127ms 121ms 170ms 157ms 188ms 1800ms
やはり実SSDで512GBになると、さくらVPSよりも速い項目が多いですが、ランダム生成の削除処理に関してはかなりさくらVPSのSSDオプションの方が速いようです。
自宅サーバーのディスクI/O検証結果(openSUSE 12.3)
こちらも参考までに自宅サーバーのディスクI/O結果を計測しました。環境はデスクトップとほぼ同様です(Xは動いていないですが)。
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
geek.sc 2G 2689 97 233683 8 221399 6 +++++ +++ +++++ +++ +++++ +++
Latency 5560us 27us 77us 2935us 25us 315us
Version 1.96 ------Sequential Create------ --------Random Create--------
geek.sc -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files:max:min /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
256:4096:512/16 14095 25 481507 96 714 1 14659 26 395009 97 611 1
Latency 2348ms 260us 142s 179ms 258us 60568ms
こちらもかなり速いのですが、やはりランダム生成の削除処理に猛烈に時間が掛かっています。何かこの辺ボトルネックがありそうです。調べてみます。
HDDのディスクI/O
さらに参考に、デスクトップに搭載しているWesternDegitalの2TBのHDDのパフォーマンスも計測しました。
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
rome.site 2G 1323 94 84753 4 98136 3 +++++ +++ +++++ +++ 2405 12
Latency 7632us 3076ms 30us 2444us 20us 236us
Version 1.96 ------Sequential Create------ --------Random Create--------
rome.site -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files:max:min /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
256:4096:512/16 15981 14 166818 54 54870 44 16296 14 3273 1 1786 1
Latency 326ms 379ms 849ms 436ms 4916ms 6253ms
やはりSSDに比べるとシーケンシャルがREAD / WRITEともにかなり遅いですね。
結論
さくらVPSのSSDはかなり速い。これでメモリがもっと上のプランがもう少し安くなると、一気に実用化出来るのですが…。