84
d de benchmarking benchmarking ベンチマクで見るioDrive ベンチマ クで見るioDrive @zembutsu #appliplatform @zembutsu #appliplatform at IBM@SHIBUYA MARKCITY Dec 9, 2011

ioDrive de benchmarking 2011 1209_zem_distribution

Embed Size (px)

DESCRIPTION

~ベンチマークで見るioDrive~ ベンチマーク情報のアップデート版。ioDriveの概要説明、File Input/Output (Read/Write)、MySQL OLTP(DBT-2,sysBench)、SSDとの比較。

Citation preview

Page 1: ioDrive de benchmarking 2011 1209_zem_distribution

dde

benchmarkingbenchmarking~ベンチマークで見るioDrive~~ベンチマ クで見るioDrive~

@zembutsu #appliplatform@zembutsu #appliplatformat IBM@SHIBUYA MARKCITY Dec 9, 2011

Page 2: ioDrive de benchmarking 2011 1209_zem_distribution

本日の内容本日の内容• ioDriveを他のデバイスと比べてみたよ。で ベンチマ クって何?で、ベンチマークって何?

データをとるまでの、あれやこれら。そして その結果そして、その結果。

Page 3: ioDrive de benchmarking 2011 1209_zem_distribution

AgendaAgenda• 1. ioDrive!2 b h ki ?• 2. benchmarking?

• 3 How? 計測手法と結果• 3. How? 計測手法と結果• 4. まとめ。

結論 何 計測• 結論:何を計測するかではなく、何を比較するかが重要何を比較するかが重要

Page 4: ioDrive de benchmarking 2011 1209_zem_distribution

About meAbout me• @zembutsu 前佛雅人

– 活動:クラウド界隈に出没クラウドは人生(キリッ

活動:クラウド界隈に出没• Open Cloud Campus, JEUG(Eucalyptus ユーザ会), JAWS-UG等• Perl 使い、日本酒大好き• 株式会社リンクディベロッパーサポート部• 株式会社リンクディベロッパーサポート部

– at+link専用サーバサービス(ホスティング)の技術

– 最近の興味– 最近の興味• データマイニング、統計・解析、MongoDB• LAST EXILE FAM、北米版の日本アニメ鑑賞

– http://www.slideshare.net/zembutsu• G-CLOUD Magazine G-CLOUD Magazine 2011 Summer

2010年8月6日発売 2011年6月29日発売1章~3章AWS入門記事 5章RightScale

Page 5: ioDrive de benchmarking 2011 1209_zem_distribution

About meAbout me• http://www.facebook.com/zembutsu

– 1993年Mosaicで nasa.govにアクセス→感激!!1993年Mosaic で nasa.gov にアクセス 感激!!• パソコン通信に触れる

– 1996年996年• 自宅でパソコン通信ホスト開局

– 1997年• ICQ道場 日本語化パッチ作成・配付

– 2000年• 卒業富山工業高等専門学校電気工学科→機械電気システム工学専攻

– 研究テーマ“携帯電話を利用したインスタント・メッセージングシステムについて”• 就職、ホスティング・ISP サポート従事

– 2007年~• JEUG ( Japan Eucalyptus Users Group ) 設立

広報宣伝 サ ビス開発• 広報宣伝、サービス開発• ディベロッパーサポート部でアプリプラットフォーム開発設計運用研究

Page 6: ioDrive de benchmarking 2011 1209_zem_distribution
Page 7: ioDrive de benchmarking 2011 1209_zem_distribution

0 010x01

Page 8: ioDrive de benchmarking 2011 1209_zem_distribution

“ioDrive Duo” 320GB SLCThanks to IBM Japan, Ltd.

Page 9: ioDrive de benchmarking 2011 1209_zem_distribution

PCI Express (PCIe) 2.0 SlotpThroughtput : 1-lane 250MB/s

x4 … 1GB/s

Page 10: ioDrive de benchmarking 2011 1209_zem_distribution

PCI ExpressPCI ExpressATTACHED!ATTACHED!

Page 11: ioDrive de benchmarking 2011 1209_zem_distribution

Flash SSDFlash SSD

Fl h SSD ( Fl h S lid S D i )Flash SSD ( Flash Solid State Drive )半導体メモリであるフラッシュメモリを使用したソリッドステートドライブ あ 補助記憶装 種 あブ(SSD)であり、補助記憶装置の一種である。http://ja.wikipedia.org/wiki/Flash_SSD

Page 12: ioDrive de benchmarking 2011 1209_zem_distribution

Seral ATA Interface 3 0Seral ATA Interface 3.0Throughput 600MB/s

Page 13: ioDrive de benchmarking 2011 1209_zem_distribution

ioDrive (Fusion io)ioDrive (Fusion-io)

ioDrive 160GB SLCioDrive 160GB SLChttp://www.fusionio.com/gallery/iodrive-product-shots/

Page 14: ioDrive de benchmarking 2011 1209_zem_distribution

ioDrive (Fusion io)ioDrive (Fusion-io)

750MB/s bandwidth135 000 OPS Latency 26μs135,000 OPS, Latency 26μs

http://www.fusionio.com/platforms/iodrive/

Page 15: ioDrive de benchmarking 2011 1209_zem_distribution

ioDrive (Fusion io)とは?ioDrive (Fusion-io)とは?• NAND型高速半導体ストレージ( ne SSD )

– 米Fusion-io社の製品http://www.fusionio.com/p– 高速なI/O性能と低レイテンシ

• 高い信頼性– 独自特許技術による高信頼性の実現– 平均故障間隔200万時間

• 確かな実績– 米SNS大手のfacebookをはじめとする多くの事例– 国内でもサイバーエージェント社等々

ソーシャル系サービスでの事例増

Page 16: ioDrive de benchmarking 2011 1209_zem_distribution

ioDrive導入のきっかけioDrive導入のきっかけ• ソーシャルゲーム向けサイトの運用経験

– 2年前にお客様とインフラ構築(レベニューシェア)– VirtualIronの仮想化システムと物理サーバ

F i IOとの出会い• FusionIOとの出会い– 当時はHP社製のブレードサーバ BL460c

HP StorageWorks IOアクセラレータ– HP StorageWorks IO アクセラレータ高速半導体ストレージ

ソ シャルアプリ向け環境のリクエスト

HP StorageWorksIO アクセラレータ

高速半導体ストレージ

• ソーシャルアプリ向け環境のリクエスト

PCI E 版i D i の発売• PCI-Express版ioDriveの発売– 1U サーバ搭載可能になり、汎用サービス化へ

Page 17: ioDrive de benchmarking 2011 1209_zem_distribution

でも お高いんでしょう?でも、お高いんでしょう?

Page 18: ioDrive de benchmarking 2011 1209_zem_distribution

でも お高いんでしょう?でも、お高いんでしょう?(;´Д`)(; Д )

POINT:パッと見、容量の割に高いように感じるが、投資に対する性能比(費用対効果)が高い(`・ω・´)投資に対する性能比(費用対効果)が高い( ・ω・ )

Page 19: ioDrive de benchmarking 2011 1209_zem_distribution

ioDrive採用のポイントioDrive採用のポイント• 普通に速い

元々はNFSサ バ用途 合成画像配信– 元々はNFS サーバ用途。合成画像配信。– 導入後は複数台のNFSサーバを統合・集約導入後は複数台の サ を統合 集約

• 高い信頼性導入後 ハードウェア無事故で稼働– 導入後、ハードウェア無事故で稼働

• 高い費用対効果

Page 20: ioDrive de benchmarking 2011 1209_zem_distribution

ioDrive採用のポイントioDrive採用のポイント• 普通に速い

元々はNFSサ バ用途 合成画像配信一口で速いと言っても、

どう速いんだろう– 元々はNFS サーバ用途。合成画像配信。– 導入後は複数台のNFSサーバを統合・集約

どう速いんだろう(´・ω・`)導入後は複数台の サ を統合 集約( ω )

• 高い信頼性導入後 ハードウェア無事故で稼働– 導入後、ハードウェア無事故で稼働

• 高い費用対効果

Page 21: ioDrive de benchmarking 2011 1209_zem_distribution

そうだ ベンチマークをとろう!そうだ、ベンチマークをとろう!

Page 22: ioDrive de benchmarking 2011 1209_zem_distribution

0 020x02

Page 23: ioDrive de benchmarking 2011 1209_zem_distribution

そもそも ベンチマークって?そもそも、ベンチマークって?• Benchmark …?

Page 24: ioDrive de benchmarking 2011 1209_zem_distribution

BenchmarkingBenchmarking• Process benchmarking• Financial benchmarkingFinancial benchmarking• Benchmarking from an investor perspective• Performance benchmarkingPerformance benchmarking• Product benchmarking• Strategic benchmarking なんだか• Strategic benchmarking• Functional benchmarking

Best in class benchmarkingなんだか

• Best-in-class benchmarking• Operational benchmarking

E b h kiいっぱい

• Energy benchmarking(;´Д`)

Ref. http://en.wikipedia.org/wiki/Benchmarking#Types(; Д )

Page 25: ioDrive de benchmarking 2011 1209_zem_distribution

“Benchmark”の意味Benchmark の意味• 【名-1】(他のものと比較するときの)基準、標準

– The new eco-car is a benchmark in fuel efficiency. その新型エコカーが 燃費に関する一つの目安だその新型エコカーが、燃費に関する一つの目安だ。

• 【名-2】《コ》ベンチマーク◆【略】BM◆コンピュータやプ グ ど【名 】《 》 ◆【略】 ◆プログラムの性能や信頼性などを測定するときの基準となるものまたはその評価テストを指す。– The benchmark of any console's performance is graphics– The benchmark of any console s performance is graphics.

どんなゲーム機でもその性能の評価基準はグラフィックスにある。

【名 3】(測量の)基準点 水準点◆【略】BM• 【名-3】(測量の)基準点、水準点◆【略】BM

• 【他動】(自社製品の改良のために他社の製品を)基準に• 【他動】(自社製品の改良のために他社の製品を)基準に従って評価する

手許の英辞朗先生に伺いました^^

Page 26: ioDrive de benchmarking 2011 1209_zem_distribution

“Benchmark”の意味Benchmark の意味• 【名-1】(他のものと比較するときの)基準、標準

– The new eco-car is a benchmark in fuel efficiency. その新型エコカーが 燃費に関する一つの目安だその新型エコカーが、燃費に関する一つの目安だ。

• 【名-2】《コ》ベンチマーク◆【略】BM◆コンピュータやプ グ ど【名 】《 》 ◆【略】 ◆プログラムの性能や信頼性などを測定するときの基準となるものまたはその評価テストを指す。– The benchmark of any console's performance is graphics– The benchmark of any console s performance is graphics.

どんなゲーム機でもその性能の評価基準はグラフィックスにある。

【名 3】(測量の)基準点 水準点◆【略】BM• 【名-3】(測量の)基準点、水準点◆【略】BM

• 【他動】(自社製品の改良のために他社の製品を)基準に• 【他動】(自社製品の改良のために他社の製品を)基準に従って評価する

手許の英辞朗先生に伺いました^^

Page 27: ioDrive de benchmarking 2011 1209_zem_distribution

Types of benchmarksTypes of benchmarks• 1. Real program• 2 Microbenchmark• 2. Microbenchmark• 3. Kernel• 4. Component Benchmark / micro-benchmarkbenchmark

• 5. Synthetic Benchmark6 I/O b h k• 6. I/O benchmarks

• 7. Database benchmarks7. Database benchmarks• 8. Parallel benchmarks

※ http://en.wikipedia.org/wiki/Benchmark_%28computing%29#Types_of_benchmarks より引用

Page 28: ioDrive de benchmarking 2011 1209_zem_distribution

Types of benchmarksTypes of benchmarks• 1. Real program• 2 Microbenchmark• 2. Microbenchmark• 3. Kernel• 4. Component Benchmark / micro-benchmarkbenchmark

• 5. Synthetic Benchmark6 I/O b h k

この2つにベンチマーク

• 6. I/O benchmarks• 7. Database benchmarks

ンチマ ク対象を絞る

7. Database benchmarks• 8. Parallel benchmarks

※ http://en.wikipedia.org/wiki/Benchmark_%28computing%29#Types_of_benchmarks より引用

Page 29: ioDrive de benchmarking 2011 1209_zem_distribution

ベンチマークとはベンチマークとは、• コンピュータの分野における、

である じゃ、肝心の ioDriveのベンチマークを見ていきましょうである。 じゃ、肝心の ioDriveのベンチマ クを見ていきましょうヽ(・∀・)ノ

Page 30: ioDrive de benchmarking 2011 1209_zem_distribution

0x03

Page 31: ioDrive de benchmarking 2011 1209_zem_distribution

計測手法の検討計測手法の検討• どうやって比較したらいいの?

正直悩みました 目的を– 正直悩みました。 目的を絞る!!

• ioDriveが速いと感じる点を数値化– 各種ベンチマークソフトを使ったハードウェアの性能比較ハ ドウェアの性能比較

– Muninを使ったリソースモニタリング&比較

傾向把握

Page 32: ioDrive de benchmarking 2011 1209_zem_distribution

最終的に測ったデータ最終的に測ったデータ• 1. I/O Performance (IO性能)

hd– hdparm– dd

シーケンシャルRead

シ ケンシャルW it– dbench

シーケンシャルWrite

ランダムランダムR d &W i

• 2 Database PerformanceランダムRead & Write

• 2. Database Performance– DBT-2

M SQLのOLTPM SQLのOLTP– Sysbench MySQLのOLTP( On-Line Transaction

Processing )Processing )

Page 33: ioDrive de benchmarking 2011 1209_zem_distribution

おことわりおことわり

今から思えば、もっと時間を取って検証をすべきだった箇所が多々あると思 て ます あくまで デバイスの箇所が多々あると思っています。あくまで、デバイスの特性比較のための、参考程度に考えて頂ければ幸いです。

Page 34: ioDrive de benchmarking 2011 1209_zem_distribution

1 “hdparm” de Sequential Read1. hdparm de Sequential Read

• hdparm– ハードディスクのパラメータを設定・取得するコマンド

• $ hdparm ‒t /dev/xxx-t …『ベンチマーク及び比較目的で、デバイス読み込みを測定する』

※ man hdparmより

後で気がついたけれど、都度キャッシュをクリアして計測した方が、より正確な測定につながったかもしれない。

# echo 3 > /proc/sys/vm/drop_caches# echo 0 > /proc/sys/vm/drop_caches

0: 0: デフォルトに1: ページキャッシュ開放2: Slabキャッシュ開放p y p

※R f 減り続けるメモリ残量!果たしてその原因は!?(3/3) @IT

3: ページキャッシュとSlabキャッシュ開放

※Ref. 減り続けるメモリ残量!果たしてその原因は!?(3/3)-@IThttp://www.atmarkit.co.jp/flinux/rensai/tantei01/bangai01c.html

Page 35: ioDrive de benchmarking 2011 1209_zem_distribution

1 “hdparm” de Sequential Read1. hdparm de Sequential Read

• hdparm– ハードディスクのパラメータを設定・取得するコマンド

• $ hdparm ‒t /dev/xxxvoid flush_buffer_cache (int fd){

-t …『ベンチマーク及び比較目的で、デバイス読み込みを測定する』※ man hdparmより

{fsync (fd); /* flush buffers */if (ioctl(fd, BLKFLSBUF, NULL)) /* do it again, big time */

perror("BLKFLSBUF failed");後で気がついたけれど、都度キャッシュをクリアして計測した方が、より正確な測定につながったかもしれない。

perror( BLKFLSBUF failed );#ifdef HDIO_DRIVE_CMD

if (ioctl(fd, HDIO_DRIVE_CMD, NULL) && errno != EINVAL) /* await completion */perror("HDIO DRIVE CMD(null) (wait for flush complete) failed");

# echo 3 > /proc/sys/vm/drop_caches# echo 0 > /proc/sys/vm/drop_caches

p ( _ _ ( ) ( p ) );#endif}

hdparm.cには、キャッシュp y p

※R f 減り続けるメモリ残量!果たしてその原因は!?(3/3) @IT

※hdparm.c よりhdparm.cには、キャッシをクリアする記述があるけど、

効かないようだった。

※Ref. 減り続けるメモリ残量!果たしてその原因は!?(3/3)-@IThttp://www.atmarkit.co.jp/flinux/rensai/tantei01/bangai01c.html

Page 36: ioDrive de benchmarking 2011 1209_zem_distribution

scriptscript• check_read.sh

#!/bi / h#!/bin/sh

set -x

-x … デバッグ・変数展開-e … 異常動作時停止

set -e

COUNT=1COUNT 1while [ $COUNT -le 30 ]; do

echo "COUNT : ${COUNT}"/sbin/hdparm -t /dev/fioa 指定デバイスに対して/sbin/hdparm -t /dev/fioaCOUNT=`expr $COUNT + 1`sleep 10

d

指定デバイスに対して、30回hdparmを実行

done

Page 37: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutputhdparmの

スループットCOUNT : 1

/dev/fioa:Timing buffered disk reads: 3116 MB in 3.00 seconds = 1037.79 MB/sec

COUNT : 2

/dev/fioa:Timing buffered disk reads: 2068 MB in 3.00 seconds = 689.21 MB/sec

COUNT : 3

/d /fi/dev/fioa:Timing buffered disk reads: 2072 MB in 3.00 seconds = 690.27 MB/sec

比較は、各デバイス毎に30回分の算術平均(mean)を求めた。

Page 38: ioDrive de benchmarking 2011 1209_zem_distribution

Result 1 Sequental ReadResult.1 ‒ Sequental Read

ioDrive (320GB MLC)

ioDrive (320GB SLC)

653.10

849.26

WarpDrive (SLP-300)

ioDrive (160GB SLC)

478.51

505.69

SSD (Intel SSD 510 120GB)

SSD (Intel X25-E Extreme)

186.73

199.65

SAS RAID1(15 000rpm)

SSD (IBM 64GB)

( )

184.56

115.73

SAS (15,000rpm)

SAS RAID1(15,000rpm)

76 69

157.61

184.56

IDE (5,400rpm)

SATA (7,200rpm)

53.69

76.69

0 100 200 300 400 500 600 700 800 900

Throughtput [MB/sec]

Page 39: ioDrive de benchmarking 2011 1209_zem_distribution

Result 1 Sequental ReadResult.1 ‒ Sequental Read

ioDrive (320GB MLC)

ioDrive (320GB SLC)

653.10

849.26

WarpDrive (SLP-300)

ioDrive (160GB SLC)

478.51

505.69

ioDrive速い!!

SSD (Intel SSD 510 120GB)

SSD (Intel X25-E Extreme)

186.73

199.65 ioDrive速い!!

SAS RAID1(15 000rpm)

SSD (IBM 64GB)

( )

184.56

115.73

SSDはSAS RAID並のSAS (15,000rpm)

SAS RAID1(15,000rpm)

76 69

157.61

184.56 SSDはSAS RAID並のRead性能

IDE (5,400rpm)

SATA (7,200rpm)

53.69

76.69

0 100 200 300 400 500 600 700 800 900

Throughtput [MB/sec]

Page 40: ioDrive de benchmarking 2011 1209_zem_distribution

2 “dd” de Sequential Write2. dd de Sequential Write• dd

ファイルを変換してコピ するコマンド– ファイルを変換してコピーするコマンド

$ dd if /dev/zero of /tmp bs ${size}• $ dd if=/dev/zero of=./tmp bs=${size} – ${size} = ファイルサイズ4k, 16k, 64k, 256k, 1024k … 65536k

• 出力された結果の平均をグラフ化• 出力された結果の平均をグラフ化– 上下10%を除外(バラツキが大きいので)

Page 41: ioDrive de benchmarking 2011 1209_zem_distribution

scriptscript• check_write.sh

#!/bin/sh#!/bin/sh

set -xset -eset e

export LANG=C

for size in 4k 16k 64k 256k 1024k 4096k 16384k 65536k; doecho "size=$size ---------------------------------------------------"echo "date " `date`for i in `seq 1 1 30` ;do sleep 5;echo $'¥n¥n' $i;date; ¥time dd if=/dev/zero of=./tmp/dd_write$i.tmp bs=$size count=1; ¥date;rm -f ./tmp/hdparm_write$i.tmp;donerm -f ./tmp/hdparm*

done

Page 42: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutput(snip)+ dateM N 14 16 15 25 JST 2011Mon Nov 14 16:15:25 JST 2011+ dd if=/dev/zero of=./tmp/dd_write1.tmp bs=4k count=11+0 records in1+0 records out4096 bytes (4.1 kB) copied, 1.2e-05 seconds, 341 MB/s

real 0m0.001suser 0m0.001ssys 0m0 000s

ここの数値を参考に

sys 0m0.000s+ dateMon Nov 14 16:15:25 JST 2011(snip)(snip)

Page 43: ioDrive de benchmarking 2011 1209_zem_distribution

Result 2 Sequential WriteResult.2 - Sequential Writefilesize

device 4k 16k 64k 256k 1024k 4096k 16384k 65536k

ioDrive (320GB SLC) 39.73 134.07 478.14 1,164.44 1,829.55 2,036.72 1,996.88 1,891.35

ioDrive (320GB MLC) 121.88 258.54 366.25 416.71 437.58 538.29 576.17 631.50

ioDrive (160GB SLC) 228 65 570 00 961 96 1 158 58 1 252 73 1 270 21 1 224 55 1 174 50ioDrive (160GB SLC) 228.65 570.00 961.96 1,158.58 1,252.73 1,270.21 1,224.55 1,174.50

warpDrive 224.56 542.71 888.78 1,031.79 1,081.25 1,090.85 1,000.66 951.09

SSD (Intel 510) 112.52 268.15 449.89 775.49 985.75 1,069.63 985.45 935.76

SSD (IBM64GB) 212.82 533.06 871.95 1,041.67 1,078.29 1,127.04 1,051.64 1,012.24

SAS RAID1 237.53 586.81 967.55 1,193.57 1,282.75 1,273.39 1,218.66 1,188.12

SAS (15,000rpm) 233.88 583.58 978.09 1,168.06 1,253.07 1,228.97 1,175.97 1,156.42

SATA (7,200rpm) 171.10 384.74 605.14 694.87 706.46 674.86 622.64 610.03

IDE (5 400rpm) 70 76 170 65 267 78 313 45 325 91 324 31 319 48 320 55IDE (5,400rpm) 70.76 170.65 267.78 313.45 325.91 324.31 319.48 320.55

Page 44: ioDrive de benchmarking 2011 1209_zem_distribution

Result 2 Sequential WriteResult.2 - Sequential Write2 000 i D i (320GB SLC)2,000 ioDrive (320GB SLC)

ioDrive (320GB MLC)ioDrive (160GB SLC)warpDrive

1,500

sec]

warpDriveSSD (Intel 510)SSD (IBM64GB)SAS RAID1

1,000

put [

MB/

s SAS (15,000rpm)SATA (7,200rpm)IDE (5,400rpm)

roug

ht p

500 Thr

0

4k 16k 64k 256k 1024k 4096k 16384k 65536k4k 16k 64k 256k 1024k 4096k 16384k 65536kFilesize

Page 45: ioDrive de benchmarking 2011 1209_zem_distribution

Result 2 Sequential WriteResult.2 - Sequential Write2 000 i D i (320GB SLC)

320GB SLC2,000 ioDrive (320GB SLC)

ioDrive (320GB MLC)ioDrive (160GB SLC)warpDrive 書き込みはSASと

高スループット

1,500

sec]

warpDriveSSD (Intel 510)SSD (IBM64GB)SAS RAID1

同等

1,000

put [

MB/

s SAS (15,000rpm)SATA (7,200rpm)IDE (5,400rpm)

roug

ht p

500 Thr

0

4k 16k 64k 256k 1024k 4096k 16384k 65536k4k 16k 64k 256k 1024k 4096k 16384k 65536kFilesize

Page 46: ioDrive de benchmarking 2011 1209_zem_distribution

3 “DBENCH” de Random R/W3. DBENCH de Random R/W• DBENCH

– I/O負荷生成ツールI/O 負荷生成ツ ル

• http://dbench.samba.org/http://dbench.samba.org/– DBENCHは、I/O 負荷をファイルシステムだけでなく、ネット

ワーク上のCIFSやNFSサーバに対しても生成することができる対 成すツールです。

$ db h D /fi /t / 32 ti li t 10• $ dbench ‒D /fioa/tmp/ 32 ‒timelimt=10– 同時接続クライアント数を変化させ、

10秒間のスル プ トを測定10秒間のスループットを測定

Page 47: ioDrive de benchmarking 2011 1209_zem_distribution

installinstall$ wget http://samba.org/ftp/tridge/dbench/dbench-4.0.tar.gz$ tar xvfz dbench-4.0.tar.gz$ cd dbench-4 0$ cd dbench-4.0$ ./autogen.sh$ ./configure$make$ make# make install ここが

はまる

Page 48: ioDrive de benchmarking 2011 1209_zem_distribution

scriptscript#!/bin/sh

set -x-D でディレクトリの指定set -x

set -e

dbench D /fioa/tmp/ 1 timelimit 10

dbench -D /fioa/tmp/ 1 --timelimit=10dbench -D /fioa/tmp/ 2 --timelimit=10dbench -D /fioa/tmp/ 4 --timelimit=10db h f ldbench -D /fioa/tmp/ 8 --timelimit=10dbench -D /fioa/tmp/ 16 --timelimit=10dbench -D /fioa/tmp/ 32 --timelimit=10pdbench -D /fioa/tmp/ 64 --timelimit=10dbench -D /fioa/tmp/ 128 --timelimit=10

同時実行プロセス数を変化

Page 49: ioDrive de benchmarking 2011 1209_zem_distribution

scriptscriptテストはSambaのエミュレーション

#!/bin/sh

set -x/usr/local/share/client.txt

set -xset -e

dbench D /fioa/tmp/ 1 timelimit 10

Deltree "¥clients¥client1" NT_STATUS_OKMkdir "¥clients" NT_STATUS_OKNTCreateX "¥clients¥client1" 0x1 0x2 16385 NT_STATUS_OKClose 16385 NT_STATUS_OK

dbench -D /fioa/tmp/ 1 --timelimit=10dbench -D /fioa/tmp/ 2 --timelimit=10dbench -D /fioa/tmp/ 4 --timelimit=10db h f l

NTCreateX "¥clients¥client1¥mixfile" 0x40 0x1 9935 NT_STATUS_OBJECT_NAME_NOT_FOUNDQUERY_PATH_INFORMATION "¥clients¥client1¥~dmtmp" 1004 NT_STATUS_OBJECT_NAME_NOT_FOUNDFIND_FIRST "¥clients¥client1¥FILLER.*" 260 1366 0 NT_STATUS_NO_SUCH_FILENTCreateX "¥clients¥client1¥~dmtmp" 0x1 0x2 9937 NT_STATUS_OKldbench -D /fioa/tmp/ 8 --timelimit=10

dbench -D /fioa/tmp/ 16 --timelimit=10dbench -D /fioa/tmp/ 32 --timelimit=10

Close 9937 NT_STATUS_OKNTCreateX "¥clients¥client1¥filler.000" 0x40 0x2 9938 NT_STATUS_OKQUERY_FS_INFORMATION 1 NT_STATUS_OKWriteX 9938 65534 1 1 NT_STATUS_OKQUERY FILE INFORMATION 9938 258 NT STATUS OK

pdbench -D /fioa/tmp/ 64 --timelimit=10dbench -D /fioa/tmp/ 128 --timelimit=10

QUERY_FILE_INFORMATION 9938 258 NT_STATUS_OKWriteX 9938 0 65536 65536 NT_STATUS_OKWriteX 9938 65536 65536 65536 NT_STATUS_OKWriteX 9938 131072 65536 65536 NT_STATUS_OKWriteX 9938 196608 65536 65536 NT STATUS OKWriteX 9938 196608 65536 65536 NT_STATUS_OKWriteX 9938 262144 65536 65536 NT_STATUS_OKWriteX 9938 327680 65536 65536 NT_STATUS_OKWriteX 9938 393216 65536 65536 NT_STATUS_OK

Page 50: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutputdbench version 4.00 - Copyright Andrew Tridgell 1999-2004py g g

Running for 10 seconds with load '/usr/local/share/client.txt' and minimum warmup2 secs1 of 1 processes prepared for launch 0 secreleasing clients

1 41998 243.68 MB/sec warmup 1 sec latency 67.858 ms1 171196 349.36 MB/sec execute 1 sec latency 17.176 ms1 236895 351.72 MB/sec execute 2 sec latency 2.856 ms1 302090 351.81 MB/sec execute 3 sec latency 2.880 ms1 366016 349 86 MB/ t 4 l t 16 5101 366016 349.86 MB/sec execute 4 sec latency 16.510 ms1 430873 349.69 MB/sec execute 5 sec latency 3.062 ms1 492012 349.07 MB/sec execute 6 sec latency 40.073 ms1 557047 349 23 MB/sec e ec te 7 sec latenc 4 118 ms1 557047 349.23 MB/sec execute 7 sec latency 4.118 ms1 620701 348.45 MB/sec execute 8 sec latency 16.586 ms1 650635 327.66 MB/sec execute 9 sec latency 15.284 ms1 cleanup 10 sec1 cleanup 10 sec0 cleanup 10 sec

Operation Count AvgLat MaxLatOperation Count AvgLat MaxLat----------------------------------------NTCreateX 104342 0.007 0.108

Page 51: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutputOperation Count AvgLat MaxLatp g----------------------------------------NTCreateX 104342 0.007 0.108Close 76639 0.001 0.014Rename 4417 0.018 0.423Unlink 21076 0.014 0.129Deltree 2 2.151 4.244Mkdir 1 0.002 0.002Qpathinfo 94576 0.005 0.030Qfileinfo 16549 0.001 0.010Qf i f 17332 0 129 16 581Qfsinfo 17332 0.129 16.581Sfileinfo 8504 0.004 0.017Find 36527 0.017 0.041WriteX 51879 0 018 0 141WriteX 51879 0.018 0.141ReadX 163469 0.002 0.020LockX 340 0.001 0.007UnlockX 340 0 001 0 009

クライアント数の変化をグラフ化

UnlockX 340 0.001 0.009Flush 7308 0.428 40.069

Throughput 327 658 MB/sec 1 clients 1 procs max latency=40 073 msThroughput 327.658 MB/sec 1 clients 1 procs max_latency=40.073 ms

Page 52: ioDrive de benchmarking 2011 1209_zem_distribution

Result 3 Randam Read/WriteResult.3 Randam Read/Write connectionsconnections

device name 1 16 32 64 128

ioDrive (320GB SLC) 463.29 2,534.71 2,541.42 1,877.46 1,716.98

ioDrive(SLC) 391.26 759.96 884.16 741.51 545.95

ioDrive(MLC) 327 66 692 15 817 68 718 92 487 22ioDrive(MLC) 327.66 692.15 817.68 718.92 487.22

SSD (intel X-25) 392.48 1,217.04 1,154.19 146.07 88.07

SAS (RAID1) 451.29 724.41 184.81 0.01 0.00

SSD (intel 510) 163.55 222.78 159.97 2.04 0.02

SSD (IBM HS) 411.99 579.79 92.01 38.11 99.69SSD (IBM HS) 411.99 579.79 92.01 38.11 99.69

Page 53: ioDrive de benchmarking 2011 1209_zem_distribution

Result 3 Randam Read/WriteResult.3 Randam Read/Write 3,000 ioDrive (320GB SLC)

2,500

ioDrive (320GB SLC)

ioDrive(SLC)

ioDrive(MLC)

2,000

,

sec]

SSD (intel X-25)

SAS (RAID1)

SSD (intel 510)

1,500

,

ut [M

B/s SSD (intel 510)

SSD (IBM HS)

1,000

1,500

roug

htp

500

1,000

Thr

0

500

0 1 16 32 64 128

connections

Page 54: ioDrive de benchmarking 2011 1209_zem_distribution

Result 3 Randam Read/WriteResult.3 Randam Read/Write 3,000 ioDrive (320GB SLC) ioDriveは ランダム

2,500

ioDrive (320GB SLC)

ioDrive(SLC)

ioDrive(MLC)

ioDriveは、ランダムRead Write にも強い。

特に、並列処理。

2,000

,

sec]

SSD (intel X-25)

SAS (RAID1)

SSD (intel 510)

1,500

,

ut [M

B/s SSD (intel 510)

SSD (IBM HS)

1,000

1,500

roug

htp

SATA接続のSSDは、並列処理に弱い

500

1,000

Thr 並列処理に弱い

0

500

0 1 16 32 64 128

connections

Page 55: ioDrive de benchmarking 2011 1209_zem_distribution

4 “DBT 2” deMySQL OLTP4. DBT-2 de MySQL OLTP

• DBT-2 (Database Test 2)OLTP ( O li T ti P i ) テスト用– OLTP ( Online Transaction Processing ) テスト用

• http://sourceforge.net/apps/mediawiki/osdldbt/D t b T t 2 (DBT 2)は トランザクシ ンのパフ マDatabase Test 2 (DBT-2) は、トランザクションのパフォーマンステストを行う。顧客情報の更新や在庫管理のシミュレーション TPC-Cベンチマークと同じような動きション。TPC-C ベンチマークと同じような動き。

• $ /run workload sh ¥• $ ./run_workload.sh ¥-c 64 -w 50 -d 180 -s 10 -n -u root

– 同時接続クライアント数(-c)を変化させ、180秒間のスループットを測定

Page 56: ioDrive de benchmarking 2011 1209_zem_distribution

installinstallPerlモジュールのインストール

cpan -i Statistics::Descriptivep pcpan -i Test::Parsercpan -i Test::Reporter

DBT-2 のセットアップ

wget http://sourceforge.net/projects/osdldbt/files/dbt2/0.40/dbt2-d l d0.40.tar.gz/download

tar xvfz dbt2-0.40.tar.gzcd dbt2-0.40

l laclocalautoheaderautoconfautomake add missing copyautomake --add-missing --copy./configure --with-mysqlmakemake installmake install

※さらに scripts/run workload.sh, scripts/mysql/start db.sh, scripts/mysql/stop db.sh の変更が必須

Page 57: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutput************************************************************************* DBT-2 test for mysql started* ** Results can be found in output/7 directory************************************************************************************************************************************************* ** Test consists of 3 stages: ** * * 1. Start of client to create pool of databases connections ** 2. Start of driver to emulate terminals and transactions generation ** 3. Processing of results ** ** *************************************************************************

DATABASE SYSTEM: localhostDATABASE NAME: dbt2DATABASE USER: rootDATABASE CONNECTIONS: 128TERMINAL THREADS: 500TERMINAL THREADS: 500TERMINALS PER WAREHOUSE: 10SCALE FACTOR(WAREHOUSES): 50DURATION OF TEST (in sec): 1801 client stared every 10 millisecond(s)

Stage 1. Starting up client...

Page 58: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutputStage 2 Starting up driverStage 2. Starting up driver...10 threads started per millisecondestimated rampup time: Sleeping 5 secondsestimated rampup time has elapsed

i d d i Sl i 180 destimated steady state time: Sleeping 180 seconds

Stage 3. Processing of results...Killing client...Killing client...MySQL stopped successfully (by kill).Test completed.Results are in: /usr/local/src/dbt-2/dbt2-0.40/scripts/../scripts/output/7

Response Time (s)Transaction % Average : 90th % Total Rollbacks %

------------ ----- --------------------- ----------- --------------- -----Delivery 4.07 0.934 : 1.047 5116 0 0.00

New Order 45.13 0.816 : 0.933 56724 546 0.97Order Status 3.94 0.550 : 0.583 4949 0 0.00

Payment 42 93 0 615 : 0 744 53962 0 0 00Payment 42.93 0.615 : 0.744 53962 0 0.00Stock Level 3.94 0.543 : 0.574 4947 0 0.00

------------ ----- --------------------- ----------- --------------- -----

18752.36 new-order transactions per minute (NOTPM)3.0 minute duration0 total unknown errors

Page 59: ioDrive de benchmarking 2011 1209_zem_distribution

Result 4 DBT 2 OLTPResult.4 DBT-2 OLTP250 000

MySQL トランザクション数250,000

ioDrive (SLC)

ioDrive (MLC)

200,000 intel SSD

SAS

SATA150,000

クシ

ョン

SATA

IDEioDriveは

スループットが高い100,000

トラ

ンザ

ク スル プットが高い(もしかしたらキャッシュかも…)

50,000

0 1 2 4 8 16 32 64 128 2561 2 4 8 16 32 64 128 256

同時接続数

Page 60: ioDrive de benchmarking 2011 1209_zem_distribution

Result 4 DBT 2 OLTPResult.4 DBT-2 OLTP【DBT-2】MySQL 平均応答時間

16

y Q 答時

12

14

8

10

ンス

[秒]

i D i (SLC)

6

8

レス

ポン ioDrive (SLC)

ioDrive (MLC)

intel SSD

2

4

レ SAS

0

2

1 2 4 8 16 32 64 128 2561 2 4 8 16 32 64 128 256

同時接続数

Page 61: ioDrive de benchmarking 2011 1209_zem_distribution

Result 4 DBT 2 OLTPResult.4 DBT-2 OLTP【DBT-2】MySQL 平均応答時間

16

y Q 答時

12

14

8

10

ンス

[秒]

i D i (SLC)ioDriveは

6

8

レス

ポン ioDrive (SLC)

ioDrive (MLC)

intel SSD

レスポンスが速い

2

4

レ SAS

0

2

1 2 4 8 16 32 64 128 2561 2 4 8 16 32 64 128 256

同時接続数

Page 62: ioDrive de benchmarking 2011 1209_zem_distribution

5 “Sysbench” deMySQL OLTP5. Sysbench de MySQL OLTP

• Sysbench汎用パフォーマンス測定ツール– 汎用パフォーマンス測定ツール

• http://sysbench.sourceforge.net/p y g– Sysbenchはパフォーマンス測定用のツール。ファイル I/O 、スケ

ジューラ性能、memory allocation、POSIX threads implementation, OLTP benchmarkを測定可能implementation, OLTP benchmark を測定可能

• $ /usr/local/bin/sysbench --test=oltp --oltp-table size=1000000 num threads=32 maxtable-size=1000000 --num-threads=32 --max-requests=0 --max-time=180 --oltp-test-mode=complex --mysql-user=root runmode=complex mysql user=root run– 同時接続クライアント数を変化させ、

180秒間のスループットを測定

Page 63: ioDrive de benchmarking 2011 1209_zem_distribution

installinstallSysbenchセットアップ

tar xvfz sysbench-0.4.12.tar.gzy gcd sysbench-0.4.12touch AUTHORS NEWSautoreconf -ifv./configuremakemake install

データの事前用意

/ t / d/i it d/ ld t t/etc/rc.d/init.d/mysqld startmysqladmin -u root create sbtest/usr/local/bin/sysbench --test=oltp --oltp-table-size=1000000 ¥

mysql user root prepare--mysql-user=root prepare

Page 64: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutputsysbench 0.4.12: multi-threaded system evaluation benchmark

No DB drivers specified, using mysqlRunning the test with following options:Running the test with following options:Number of threads: 16

Doing OLTP test.Running mixed OLTP testgUsing Special distribution (12 iterations, 1 pct of values are returned in 75 pct cases)Using "BEGIN" for starting transactionsUsing auto_inc on the id columnThreads started!Time limit exceeded, exiting...(last message repeated 15 times)Done.

OLTP t t t ti tiOLTP test statistics:queries performed:

read: 5265806write: 1880645other: 752258other: 752258total: 7898709

transactions: 376129 (2089.47 per sec.)deadlocks: 0 (0.00 per sec.)read/write requests: 7146451 (39699 99 per sec )read/write requests: 7146451 (39699.99 per sec.)other operations: 752258 (4178.95 per sec.)

Test execution summary:

Page 65: ioDrive de benchmarking 2011 1209_zem_distribution

outputoutputime limit exceeded, exiting...(last message repeated 15 times)DDone.

OLTP test statistics:queries performed:

read: 5265806read: 5265806write: 1880645other: 752258total: 7898709

transactions: 376129 (2089 47 per sec )transactions: 376129 (2089.47 per sec.)deadlocks: 0 (0.00 per sec.)read/write requests: 7146451 (39699.99 per sec.)other operations: 752258 (4178.95 per sec.)

Test execution summary:total time: 180.0114stotal number of events: 376129total time taken by event execution: 2877.6783per-request statistics:

min: 2.03msavg: 7.65ms

max: 105.17msapprox. 95 percentile: 24.42ms

Threads fairness:events (avg/stddev): 23508.0625/192.99

ti ti ( / tdd ) 179 8549/0 00execution time (avg/stddev): 179.8549/0.00

Page 66: ioDrive de benchmarking 2011 1209_zem_distribution

Result 5 Sysbench OLTPResult.5 Sysbench OLTP【SysBench】MySQL クエリ数

12,000,000

y y Q

ioDrive (SLC)

10,000,000 ioDrive (MLC)

intel SSD

SAS

6 000 000

8,000,000

リ数

SATA

IDE

4,000,000

6,000,000

クエ

2,000,000

4,000,000

0

2 4 8 16 32 64

同時接続数

Page 67: ioDrive de benchmarking 2011 1209_zem_distribution

Result 5 Sysbench OLTPResult.5 Sysbench OLTP【SysBench】MySQL クエリ数

12,000,000

y y Q

ioDrive (SLC)

10,000,000 ioDrive (MLC)

intel SSD

SAS

6 000 000

8,000,000

リ数

SATA

IDE

ioDriveは別のツール

4,000,000

6,000,000

クエ

リ ioDriveは別のツールでもOLTPが高い

2,000,000

4,000,000

0

2 4 8 16 32 64

同時接続数

Page 68: ioDrive de benchmarking 2011 1209_zem_distribution

0 XX0xXX

Page 69: ioDrive de benchmarking 2011 1209_zem_distribution
Page 70: ioDrive de benchmarking 2011 1209_zem_distribution

実際どうなんでしょう実際どうなんでしょう。• ちょっと負荷かけてみました。

• 条件ioDriveに負荷かけるの

難しいです(;´Д`)• 条件

– メモリ64GB の環境でOLTP テスト– 同一マシン上にSSD と ioDrive搭載

• Muninでグラフ化

Page 71: ioDrive de benchmarking 2011 1209_zem_distribution

MySQL thread thoroughtputMySQL thread, thoroughtput

Page 72: ioDrive de benchmarking 2011 1209_zem_distribution

MySQL thread thoroughtputMySQL thread, thoroughtput

ioDrive SSD

ioDrive SSD

Page 73: ioDrive de benchmarking 2011 1209_zem_distribution

MySQL thread thoroughtputMySQL thread, thoroughtput

ioDriveと sysbenchioDriveとSSDにsysbenchでOLTP測定。同一マシン上・同

まで 上昇させ、グラフ化条件で比較。Threadを1~110まで1ずつ上昇させ、グラフ化

Page 74: ioDrive de benchmarking 2011 1209_zem_distribution

MySQL thread thoroughtputMySQL thread, thoroughtput

SSDはスループ トが劣化ioDrive プットが劣化

Page 75: ioDrive de benchmarking 2011 1209_zem_distribution

MySQL QueryMySQL QueryioDrive

SSD

M SQLM SQLのク リ別の処理状況をMySQLのクエリ別の処理状況をグラフ化したもの(Munin MySQL Plug-in)

Page 76: ioDrive de benchmarking 2011 1209_zem_distribution

IOstatIOstatioDrive

SSD

Page 77: ioDrive de benchmarking 2011 1209_zem_distribution

IOPSIOPS

ioDriveioDrive

SSD

Page 78: ioDrive de benchmarking 2011 1209_zem_distribution

Disk latencyDisk latencyDi kDi kDisk

latency

M SQLM SQLMySQLThroughtput

Page 79: ioDrive de benchmarking 2011 1209_zem_distribution

Disk latency SSDSSDはlatencyDisk latency yが発生し、

MySQL性能が落ちる

Disk latency

落ちる

ioDriveThroughtput

SSDThroughtput

Page 80: ioDrive de benchmarking 2011 1209_zem_distribution

結論(私的に)結論(私的に)• 性能… ioDriveは価格相応。十分。

• エンタープライズ向け製品としては• エンタ プライズ向け製品としては、あまり価格は変わらないのでは。

SSDは 故障発生リスクを許容できるか?• SSD は、故障発生リスクを許容できるか?• ioDriveは、安心して使える。ioDriveは、安心して使える。

Page 81: ioDrive de benchmarking 2011 1209_zem_distribution

結論(私的に)結論(私的に)• 性能… ioDriveは価格相応。十分。

• エンタープライズ向け製品としてはi D i• エンタ プライズ向け製品としては、あまり価格は変わらないのでは。ioDriveSSDは 故障発生リスクを許容できるか?これまでやってきた事が

速くできるこれまで出来なかった事

が出来るようになる• SSD は、故障発生リスクを許容できるか?• ioDriveは、安心して使える。

速くできる が出来るようになる

ioDriveは、安心して使える。

Page 82: ioDrive de benchmarking 2011 1209_zem_distribution

0 FF0xFF

Page 83: ioDrive de benchmarking 2011 1209_zem_distribution

まとめまとめ• ベンチマークは比較である

– 絶対値に意味は無い絶対値に意味は無い

• ioDriveは性能が良い(他のデバイスと比べて)• ioDriveは性能が良い(他のデバイスと比べて)– ioDriveに負荷をかけるのが大変

とはいえ、ベンチマークはあくまでデバイスの比較でしかありません 実際に アプリケーションを載でしかありません。実際に、アプリケーションを載せて、テストしてみないと分からない所はあると思います 是非 アプリプラットフォームでioDriveをいます。是非、アプリプラットフォ ムでioDriveを試してみてくださいヽ(・∀・)ノ

http://www.at-link.ad.jp/appli_platform/

Page 84: ioDrive de benchmarking 2011 1209_zem_distribution

Thank you for listening!Thank you for listening!

• 最後までおつきあいいただき、ありがとうございました!!ありがとうございました!!

• Contacts– at+link専用サーバ・サービスアプリプラットフォーム

http://www.at-link.ad.jp/appli_platform/株式会社リンク ディベロッパ サポ ト部– 株式会社リンク ディベロッパーサポート部前佛雅人 (Masahito Zembutsu)

• Twitter: @zembutsuE il b t @li k j• E-mail: [email protected]

• Tel: 03-5785-0555