More Related Content
Similar to [AWSマイスターシリーズ] Instance Store & Elastic Block Store
Similar to [AWSマイスターシリーズ] Instance Store & Elastic Block Store (20)
More from Amazon Web Services Japan
More from Amazon Web Services Japan (20)
[AWSマイスターシリーズ] Instance Store & Elastic Block Store
- 1. re:G
ene
rate
AWSマイスターシリーズ
Instance Store(Ephemeral Disk)
& Elastic Block Store
2014.1.29
アマゾン データサービス ジャパン株式会社
プリンシパル ソリューションアーキテクト
荒⽊木 靖宏
ソリューションアーキテクト
平⼭山 毅
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 2. Agenda
!
!
!
!
ストレージサービス概要
Instance Store (Ephemeral Disk)
Elastic Block Store
使い分けの実践編
2
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 3. Ⅰ)ストレージ
サービス概要
3
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 4. ところで・・・
! AWS上でストレージはいくつある?
1. Simple Queue Service
2. Instance Store
3. Elastic Block Store(EBS)
4. AWS Storage Gateway
5. Amazon Simple Storage Service(S3)
6. Amazon Glacier
7. Amazon ElastiCache
8. Amazon SimpleDB
9. Amazon DynamoDB
10. Amazon Relational Database Service(RDS)
11. Amazon Redshift
12. Amazon Kinesis
4
4
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 6. ブロックストレージのサービス
AWS上でストレージはいくつある?
1. Simple Queue Service
2. Instance Storage
3. Elastic Block Store(EBS)
4. AWS Storage Gateway
5. Amazon Simple Storage Service(S3)
6. Amazon Glacier
7. Amazon ElastiCache
8. Amazon SimpleDB
9. Amazon DynamoDB
10. Amazon Relational Database Service(RDS)
11. Amazon Redshift
12. Amazon Kinesis
EC2で利利⽤用可能な基本的な
ブロックストレージ
6
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 8. AMIから⾒見見たストレージ分類
AMI (Amazon Machine Image
EC2のコピーをとりテンプレート化
することで、再利利⽤用可能
Instance Store-‐‑‒
Backed AMI
EBS-‐‑‒
Backed AMI
・ 通常はこちらを⽤用いる
(2009年年後半に追加)
・ EC2に停⽌止/終了了のオプ
ション有
・ 停⽌止しても、ファイル
8 システムは永続する
•
•
•
EC2開始当初からある
EC2に停⽌止のオプションはない
EC2を終了了するとデータは消える
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 9. Root DeviceがInstance Store
であるかの確認⽅方法
! EC2の場合
「Describe」タブの
「Root Device Type」を確認
⇒「Instance Store」と表⽰示
! AMIの場合
AMI選択⼀一覧画⾯面の
「Root Device Type」を確認
⇒「instance store」と表⽰示
若若しくは、画⾯面右上の「Show/Hide」
で「Root Device」を表⽰示させる
9
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 10. Ⅱ)Instance Store
(Ephemeral Disk)
10
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 11. Instance Storeとは
EC2へマウント
揮発性
/dev/xvdf
EC2
/dev/xvdg
! 特徴
• EC2の物理理筐体のローカルディスク
• EC2インスタンスタイプにより、サイズと
個数、HDD/SSD、が予め決まっている。
! 利利点
• 無料料!
• 任意のファイルシステムが利利⽤用可能
• ローカルディスクのため、ネットワークの
影響を受けにくい
! 注意
• インスタンスを停⽌止(Stop)すると、データ
が消去される
※[重要]再起動(Reboot)では消えない。
• スナップショット機能はない
• 別のEC2に付替えができない
11
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 12. Instance Store のアーキテクチャーと
Ephemeral Disk
! Instance Store は各EC2インスタンスと同じ物理理ホストに存在
! ディスク名をEphemeral Disk(Instance Store Volume)と呼びます
! 物理理ホストに割当されているが、利利⽤用できるのは特定の1つのEC2インスタン
スのみ。(同じ物理理ホストの別EC2からの共有は不不可。)
EC2イ
ンスタ
ンス
EC2インス
タンス
…
OS
OS
OS
ハイパーバイザー
Instance
Store
Ephe
meral
12
Ephe
meral
…
ハイパーバイザー
Instance
Store
Ephe
meral
Ephe
meral
物理理インタ
フェース
EC2イ
ンスタ
ンス
Ephe
meral
Instance
Store
Ephe
meral
Ephe
meral
アベイラビ
リティゾーン
リー
ジョン
EBSはEC2の
物理理ホストは
別に存在
EBS
Ephe
meral
物理理インタ
フェース
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 13. EC2インスタンスタイプによる
選択可能な Instance Store
! EC2のタイプによって、選択できるInstance Storeは以下の通り。
Instance Type
m1.small
m1.medium
m1.large
m1.xlarge
m2.xlarge
m2.2xlarge
m2.4xlarge
m3.medium
m3.large
m3.xlarge
m3.2xlarge
t1.micro
c1.medium
c1.xlarge
Instance Store Volumes
1 x 160 GB†
1 x 410 GB
2 x 420 GB (840 GB)
4 x 420 GB (1680 GB)
1 x 420 GB
1 x 850 GB
2 x 840 GB (1680 GB)
1 x 4 GB SSD
1 x 32 GB SSD
2 x 40 GB SSD (80 GB)
2 x 80 GB SSD (160 GB)
None
(use Amazon EBS volumes)
1 x 350 GB†
4 x 420 GB (1680 GB)
Instance Type
※2014年年1⽉月29⽇日時点
Instance Store Volumes
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
cc2.8xlarge
cg1.4xlarge
cr1.8xlarge
hi1.4xlarge
hs1.8xlarge
i2.xlarge
2 x 16 GB SSD (32 GB)
2 x 40 GB SSD (80 GB)
2 x 80 GB SSD (160 GB)
2 x 160 GB SSD (320 GB)
2 x 320 GB SSD (640 GB)
4 x 840 GB (3360 GB)
2 x 840 GB (1680 GB)
2 x 120 GB SSD (240 GB)
2 x 1024 GB SSD (2048 GB)
24 x 2048 GB (49 TB)
1 x 800 GB SSD
i2.2xlarge
2 x 800 GB SSD (1600 GB)
i2.4xlarge
i2.8xlarge
4 x 800 GB SSD (3200 GB)
8 x 800 GB SSD (6400 GB)
13
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 15. Instance Storeを共有ディスク
構成で利利⽤用する場合の制約
! 複数のEC2インスタンスから同時に1つのInstance Storeをアタッチできない
(逆に、1つのEC2インスタンスから複数のEBSのアタッチは可能)
! 共有ディスク型のクラスタソフトや Oracle RACといったソリューションをそ
のまま利利⽤用はできない
EC2:N → EBS:1
EC2:1 → EBS:N
Region
Availability Zone - a
15
Ephe
meral
Region
Availability Zone - a
Ephe
meral
Nの上限数
は、EC2の
インスタンス
タイプに依存
Ephe
meral
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 16. Instance Storeは
別のEC2に付け替えもできない
Instance Store
Elastic Block Store
Availability Zone - a
Availability Zone - a
EC2
EBS
Root
Ephe
Meral
Data
EC2
EBS
Root
EC2
EC2
EBS
Root
EBS
Root
Detach
EBS
Data
Attach
16
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 17. Instance Store の 選択⽅方法
! AMIから起動する際に、Step 4の Add StorageでTypeで
Instance Storeを選択する。選択数はインスタンスタイプに依存。
! CLIの場合は、-‐‑‒b オプションで”デバイス名=ephemeral N”を記載
$ ec2-run-instances ami_id –b “/dev/xvda=ephemeral0”
-b “/dev/xvdb=ephemeral1” and –b “/dev/xvdc=ephemeral2”
17
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 18. EC2に接続するEphemeral Disk 数の変更更
! EC2インスタンスを起動後は、Instance Storeの変更更はできないた
め、再度度AMIから起動時に選択する必要があります
(Change Instance Typeでも変更更できません)
AMI
m1.largeで
Ephemeral Disk
を1つで起動
環境を残し
たい場合
m1.largeで
Ephemeral Disk
を2つで起動
18
m1.largeは2つまで
Ephemeral Diskが
付けられるが、EC2
に直接は付けられない
EC2
EBS
Root
Ephe
Meral
Ephe
Meral
EC2
EBS Ephe Ephe
Root Meral Meral
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 19. Instance Store サイズの変更更
! Instance Storeのサイズは、予めEC2のインスタンスタイプによって決め
られており、サイズ変更更ができない。
! 容量量が⾜足りない場合は、複数のEphemeral DiskをOSからストライブする
ことで拡張する⽅方法となります。
! 例例えば、m1.largeでは、
420GのEpheral Disk
が2つまでと、決められている。
↓
2つのディスクをストライプ
して840Gとして、OSから
1ドライブで利利⽤用する。
EC2
m1.large
OS
Ephe
Meral
420G
OSでストライプし、
840Gに⾒見見せる
Ephe
Meral
420G
19
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 20. Instance Store のデバイス名
! Instance Store のデバイス名は以下のパスにOSから認識識されます。
Device Name
Instance
※2014年年1⽉月29⽇日時点
/dev/sda1, /dev/ root (/)でフォーマット&マウントされる
xvda1, /dev/xvde1 (Windowsの場合は、C:)
/dev/sda2,
xvdb
m1.smallとc1.mediumの場合、
/mmtまたは/media/ephemeral1で
フォーマット&マウントされる
/dev/sda3, /dev/ m1.smallとc1.mediumの場合、
xvda3, /dev/xvde3 OSのスワップ領領域として利利⽤用可能。
ただし、Linuxのみ。
/dev/sdb, xvdb
M1.smallとc1.medium以外の場合、
/mnt または /media/ephemeral1
でフォーマット&マウントされる
20
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 21. スワップ領領域としての活⽤用
! AWSは、物理理環境を意識識しないため、メモリのオーバーコミットが
できないため、メモリ超過はスワップ領領域で回避することになる。
! メモリ容量量が⼩小さい t1.microとc1.mediumのLinuxでは、仮想メモ
リとして機能するための900MBのデバイスが別途に割当されており、
SwapOnすることで利利⽤用可能。
(Amazon Linuxではデフォルトで有効 )
スワップ領領域デバイス
スワップ領領域が
認識識されている
21
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 22. Ephemeral Diskの
Block Device Mappingの表⽰示
! 起動中のEC2は、Block Device MappingでEphemeral Diskのマッ
ピングを確認することができない。
! AMIについては、 Ephemeral Diskのマッピングが確認可能。
Root
状態
起動中EC2
AMI
Instance
Store
Elastic
Block
Store
22
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 23. 起動中EC2のEphemeral Diskの
Block Device Mappingの確認⽅方法
! メタデータ情報に格納されているため、以下コマンドをEC2インス
タンス上から実⾏行行し、参照することで確認する。
Linux
$ GET http://169.254.169.254/latest/meta-data/block-device-mapping/
Windows
> WGET http://169.254.169.254/latest/meta-data/block-device-mapping/
例例)
Ephemeral Diskのマッピ
ングが認識識されている
23
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 24. Instance StoreのAMI化
! 「Create Image」でAMI作成時のボリュームでInstance Storeを
選択することで、 AMIのデバイスにInstance Storeがマッピング
される。(ただし、EBSと違い、データは保持されません)
24
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 25. Ephemeral Disk の Cloudwatch 監視
! EC2に紐紐づいているため、EC2インスタンスのDisk Metricを確認します。
(EBSの場合は、EBSのDisk Metricを確認します。)
! 注)複数のEphemeral Diskを利利⽤用の場合は、合計値が表⽰示されます。
(EBSの場合は、VolumeごとにMetricが分かれます。)
25
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 26. Hi Storage Instance での Instance Store
HS1 インスタンス (hs1.8xlarge)
・⼤大容量量ストレージ向けHPCインスタンスタイプ
・⼤大容量量のHDD(Instance Store)を内蔵
35 ECU
仮想16core
117GiB RAM
2TB x 24
Local HDD
※2014年年1⽉月29⽇日時点
合計48TBのデータ格納が可能。
※ビックデータ系のデータ格納にも有効
■Instance Store 全体の最⼤大スループット
2MBという⼤大きなブロックサイズの場合、
シーケンシャルなRead とWriteの合計で、
2.6 GB / 秒が最⼤大スループット
Cluster Compute
26
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 27. HI1 Instance での Instance Store
HI1 インスタンス (hi1.4xlarge)
・⾼高速ファイルI/Oを実現するHPCインスタンスタイプ
・⾼高速なSSD(Instance Store)を内蔵
35 ECU
仮想16core
60.5 GB RAM
1TB x 2
Local SSD
Cluster Compute
※2014年年1⽉月29⽇日時点
■Instance Store 全体の最⼤大スループット
Read 2 GB /秒
Write 1.1 GB /秒
■IOPS(2 SSD をストライピング前提)
Ⅰ) PV(準仮想化)Linuxの場合
■Block Size : 4KB , Randam
Read 120,000 IOPS
Write 10,000 – 85,000 IOPS
Ⅱ)HVM(完全仮想化)Linux,Windowsの場合
■Block Size : 4KB , Randam
Read 90,000 IOPS
27
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be Write 9,000 – 75,000 IOPS of Amazon.com, Inc.
copied, modified or distributed in whole or in part without the express consent
- 28. I2 Instance での Instance Store
I2 インスタンス
・⾼高I/Oを実現するインスタンスタイプ
・⾼高速なSSD(Instance Store)を内蔵
・以下の条件を満たす場合、最⼤大IOPSが以下のように明⽰示されている
・Linux Kernel 3.8以上
・ブロックサイズを4KBの倍数
※2014年年1⽉月29⽇日時点
Size
EC
Us
vCP
Us
Memo
ry
(GiB)
Instance
Storage (GiB)
EBSOptimiz
ed
Read
IOPS
First
Write
IOPS
Network
Performance
i2.xlarge
14
4
30.5
1 x 800 (SSD)
Yes
35,000
35,000
Moderate
i2.2xlarge
27
8
61
2 x 800 (SSD)
Yes
75,000
75,000
High
i2.4xlarge
53
16
122
4 x 800 (SSD)
Yes
175,000
155,000
High
i2.8xlarge
104
32
244
8 x 800 (SSD)
-
365,000
315,000
10 Gigabit
28
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 29. C3 Instance での Instance Store
C3 インスタンス
・⾼高CPUを実現するインスタンスタイプ
・⾼高速なSSD(Instance Store)を選択可能
※2014年年1⽉月29⽇日時点
Size
ECUs
vCPUs
Memory
(GiB)
Instance
Storage(GiB)
EBSOptimized
Network
Performance
c3.large
7
2
3.75
2 x 16 (SSD)
-
Moderate
c3.xlarge
14
4
7.5
2 x 40 (SSD)
Yes
Moderate
c3.2xlarge
28
8
15
2 x 80 (SSD)
Yes
High
c3.4xlarge
55
16
30
2 x 160 (SSD)
Yes
High
c3.8xlarge
108
32
60
2 x 320 (SSD)
-
10 Gigabit
29
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 30. M3 Instance でのInstance Store
M3 インスタンス
・新型CPUを搭載したインスタンスタイプ
・従来はEBSのみ接続であったが、
⾼高速なSSD(Instance Store)を選択可能に!
※2014年年1⽉月29⽇日時点
Size
ECUs
vCPUs
Memory
(GiB)
EBSOptimized
Instance Storage (GiB)
Network
Performanc
e
m3.medium
3
1
3.75
1 x 4 (SSD)
-
Moderate
m3.large
6.5
2
7
1 x 32 (SSD)
-
Moderate
m3.xlarge
13
4
15
2 x 40 (SSD)
Yes
Moderate
m3.2xlarge
26
8
30
2 x 80 (SSD)
Yes
High
30
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 31. Ⅲ)Elastic Block Store
Update中⼼心
31
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 32. Amazon Elastic Block Storeとは
Region
Availability Zone - a
Availability Zone - b
EC2
EC2
EBS
EBS
EBS
EBS
EBS
Snapshot
Amazon Simple
Storage Service
(S3)
EBS
EBSとは、EC2に仮想外付けされる
ブロックレベルのストレージサービス
※各コンピュートサービスのデータ基盤
! サイズは1GB単位で〜~1TBまで
! サイズ/期間/IOで課⾦金金される
! 各EC2インスタンスで、複数EBSを使える
詳細
! データは永続的に保存される
! アベイラビリティゾーン(AZ) に存在
! 他のEC2インスタンスに付け替え可能
! バックアップから、EBSを作成可能
(他のAZに作成できる)
32
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 33. EBSの基本アーキテクチャ
! EBSを作成すると、ボリュームが内部的に冗⻑⾧長化されている。
! 1つのEBSをアタッチすると、EC2インスタンスから1つのデバイスとして⾒見見
えるようになるが、OS側でファイルシステムで利利⽤用できるように設定が必要。
! EBSはネットワーク接続型だが、ネットワークを意識識しなくても良良い。
OSからはEBSが1つ
のSCSIデバイスとし
て認識識される
…
EC2イン
スタンス
アベイラビリ
ティゾーン
OS
セキュリティグルー
プは意識識せず。
全ての通信ポートを
閉じてもEBSにア
タッチが可能
33
リージョン
Snapshot
ハイパーバイザー
EBS
ファイア
ウォール
内部的に冗⻑⾧長化
物理理インタ
フェース
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 35. Snapshot Copyとは?
! 作成したSnapshotをコピーする機能
※Region内コピー、Region間コピー、の両⽅方可能(初のRegion間機能)
! 対象はEBS、MarketPlace、VM import経由のAMI、StorageGateway
のスナップショットを含む
※RDSやRedshiftのスナップショット、AMIのコピーも可能に! (2014年年1⽉月29⽇日時点)
「Create Image from EBS snapshot」を使えばLinuxのAMI化後の起動は可能
Region : B
Region : A
Availability
Zone - a
Availability
Zone - b
Internet
EBS
Snapshot
Copy
35
Snapshot
Availability
Zone - a
Availability
Zone - b
EBS
Create EBS
from Snapshot
Create AMI
AMI
from Snapshot
© 2012 Amazon.com, Inc. and Snapshot All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
its affiliates. Copy
- 36. EBS
Provisioned IOPSとは?
! IOPS数が指定できるEBS
! EBS-‐‑‒Optimizedインスタンスを前提としている
! Volume作成時にStandardかPIOPSを指定する
! IOPS値の指定は100〜~4000で1刻みが可能
(最⼤大値が4000まで可能に!従来は2000まで)
! Root VolumeのEBSもPIOPSを使⽤用可能
! OSからは通常のEBSと同じように⾒見見える
! EC2の作成時に、合わせて作成可能
! 合計20TB, 10,000IOPSの制限がある
§ 申請にて制限解除可能
Volume Typeに
Provisoned
IOPSを指定
IOPSとは?
Input Output per Second の略略で、
「1秒あたりのディスクI/O数」を意味し、
DISK性能に指標値の1つ
(算出式)
1
回転待ち時間+シーク時間+転送時間
IOPSの値を指定
36
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 37. EC2
EBS-‐‑‒Optimized Instanceとは?
! EBS⽤用にネットワーク帯域を最適化
! 確保される帯域は、500Mbps〜~2000Mbps
(最⼤大帯域が2000Mbpsまで可能に(HPCは除く)!従来は1000Mbpsまで)
! Standard EBS使⽤用時も効果がある
! “EBS-‐‑‒Optimized Instance” と “Provisioned IOPS”を組み合わせることで、I/
O値の最適化が可能
! ⼤大幅に対応したインスタンスが増加
EBS-‐‑‒Optimized-‐‑‒Instance
通常
EBS向け帯域と競合
EC2
normal
ストレージエリア
ネットワーク
通常
ネットワーク
PIOPS
EBS
PIOPS
EBS
EC2
Net
work
EBS向け帯域を専⽤用に確保
ストレージエリア
ネットワーク
PIOPS
EBS
EC2
EBS-‐‑‒
Optimized
PIOPS
EBS
EC2
通常
ネットワーク
Net
work
37
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 39. EBS Optimized可能な
インスタンスと最⼤大スループット
! EBS Optimized が可能なEC2インスタンスが⼤大幅に増⼤大
! EBS Optimized した場合の最⼤大スループットで2000Mbpsも可能に
※2014年年1⽉月29⽇日時点
Instance Type
c1.xlarge
1,000
8,000
c3.xlarge
500
4,000
c3.2xlarge
1,000
8,000
c3.4xlarge
2,000
16,000
g2.2xlarge
1,000
8,000
i2.xlarge
500
4,000
i2.2xlarge
1,000
8,000
i2.4xlarge
2,000
16,000
m1.large
500
4,000
m1.xlarge
1,000
8,000
m2.2xlarge
500
4,000
m2.4xlarge
39
Dedicated EBS
Max 16K IOPS
Throughput (Mbps)*
1,000
8,000
m3.xlarge
500
4,000
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
m3.2xlarge
1,000
8,000
- 40. Elastic Block Store 価格
(値下げ発表)
! 2014年年2⽉月からEBS Standard Volumeの値下げを実施。
! 東京リージョンに関しては以下の価格帯
※東京リージョン2014年年2⽉月時点
EBSスタンダードボ
リューム
旧料料⾦金金
新料料⾦金金
変更更
1か⽉月にプロビジョニン
グされたストレージ1GB
あたり
$0.12
$0.085
-‐‑‒29.1%
/100 万 I/O リクエスト
$0.12
$0.085
-‐‑‒29.1%
例例1)3ヶ⽉月間を100G利利⽤用
100G
0.85$ 0.85$ 0.85$
8.5×3=25.5$
例例2)1か⽉月で1時間のみ2倍に拡張
100G
200G
8.5+8.5×1/30/24=8.512$
40
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 41. Provisioned IOPSと
EBS Snapshotの価格
2) IOPS
3)S3 Snapshotデータ量量
通常EBS⽉月間の総累累積I/O。PIOPSはIOPS期間累累計
実データの総量量になる
例例3)通常のEBS
I/O数はCloudwatchやIostatで
例例5)初回に20G、⽉月末に更更新差分2G
取得しても良良いが「利利⽤用レポー
・⽉月間で10億I/O → $12
ト」のCSVが実測I/O値
・15⽇日で10億I/O → $12
(※この値を元に課⾦金金される)
24G
22G
20G
例例4)PIOPS
・⽉月間100IOPS のPIOPS利利⽤用 → 100×0.12=$12
2.2$ 2.4$
2$
・15⽇日200IOPS のPIOPS利利⽤用 → 200×0.12×15/30=$12
41
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 42. Ⅳ)使い分け実践編
42
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 44. EBSの性能向上と⼀一定化オプション
! Provisioned IOPS
EC2
• 1ボリューム最⼤大4000IOPSまで指定可能なオプション
• 16KB以下のブロックサイズの場合、指定IOPSの10%以
内に収まる性能を、年年間99.9%の時間で提供
! EBS-‐‑‒Optimized Instance
• EC2とEBS間のネットワークを最適化するオプション
• Provisioned IOPSと⼀一緒に利利⽤用すると効果が⾼高い
EC2
Optimized
P-IOPS
44
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 45. Instance Storageを使うべきなのは
S3
! 計算時の⼀一時ファイルや、画像処理理の⼀一時データ、キャッシュ
ファイル
! デプロイするアプリケーションコードの置き場所として
! 冗⻑⾧長化を⾃自分で作りこめる場合
! ⼤大容量量のデータを1インスタンスに格納する場合
! SSDのIO速度度が必要な場合
! ログの⼀一時保存場所として。流流量量の速いログを⼀一旦Instance
Storageに吐き出し、定期的にS3にアップロードする。
45
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 46. Ephemeral Disk の 暗号化/冗⻑⾧長化
! 様々な暗号化製品の利利⽤用が可能
•
•
•
•
Windows Bitlocker (Microsoft)
Secure Cloud(TrendMicro)
SafeNet ProtectV (SafeNet)
Crypt Setup(OSS)
! 冗⻑⾧長化機能や分散FSも利利⽤用可能
•
•
•
•
DRBD(OSS)
ClusterPro (NEC)
GlusterFS (OSS)
Redhat Storage Server (Redhat)
EC2
disk
レプリカ
EC2
disk
46
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 47. シミュレーションの実施
! ⾃自分の利利⽤用シナリオをシミュレーションして何を使うかを決める
(特に性能要件が明確な場合)
! シミュレーションを⼿手伝うツール
・OS(Linux,Windows):Fio
・Oracle Databese: Oracle ORION
・Microsoft SQLserver: SQLIO
! 計測とトライアンドエラーができるクラウドのメリットを活⽤用
47
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 48. EC2とEBSの信頼性をどう考えるか?
Instance Store
AZ障害、
EC2停⽌止障害でデータが消える
Availability Zone - a
EC2
EBS
Root
Backup
Data
Ephe
Meral
Data
Elastic Block Store
AZ障害、
EBS障害でデータが消える
Availability Zone - a
EC2
EBS
Root
EBS
Data
Snap
Shot
48
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 49. Ephemeral Disk活⽤用例例①
バッチ処理理
! Ephemeral Disk をソート処理理が中⼼心なバッチ処理理で活⽤用する。
! バッチ処理理時のみ起動し、終了了後は削除。障害時は再実⾏行行。
処理理前
データ
バッチ
プログラム
AMI
処理理後
データ
EC2
バッチ処理理開始
↓
EC2起動
49
EBS
Root
Ephe
Meral
Data
バッチ処理理終了了
↓
EC2終了了
障害発⽣生時
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 50. バックアップ実装案
! EC2インスタンスの信頼性にデータ保障が依存するため、EC2イン
スタンスと同様に冗⻑⾧長化して、リプリケーションを実施。
! 更更にS3へのバックアップも推奨。
Availability Zone - a
EC2
EBS
Root
50
Availability Zone - b
CLIのS3 Sync等を活
⽤用してファイル同期
EC2
Ephe
Meral
Data
Ephe
Meral
Data
EBS
Root
OSやミドルウェアの機能
でレプリケーションを実施
S3
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 51. Storage Gatewayと組合せ構成例例
! Storage Gatewayを活⽤用することで、1つのEC2上のOSから
1) Ephemeral , 2)EBS PIOPS , 3) EBS Standard , 4) S3
を⽤用途に応じて、OSから使い分けする事ができる。
Storage
Gateway
EC2
OS
EBS
Root
EBS
Root
EBS
EBS
Cache Upload
Ephe EBS EBS
Meral Data Data
(SSD) PIOPS Stan
Data
dard
51
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 52. まとめ
! Instance Store (Ephemeral Disk)はt1.micro以外のイ
ンスタンスで利利⽤用でき、最新インスタンスではSSDを利利
⽤用できるタイプが増えています。
! Root VolumeはEBSとし、⼀一時データ格納⽤用やバッチ処
理理⽤用途として、コストの係らない Instance Store
(Ephemeral Disk)を活⽤用するのがお勧めです。
! Instance Store (Ephemeral Disk)上データの耐久性は、
ファイルコピーやS3同期で向上させることが可能です。
52
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 53. Appendix-‐‑‒1
! 参考資料料
• Ephemeral Disk
http://docs.aws.amazon.com/ja_̲jp/AWSEC2/latest/
UserGuide/
InstanceStorage.html#StorageOnInstanceTypes
• Elastic Block Store
http://docs.aws.amazon.com/ja_̲jp/AWSEC2/latest/
UserGuide/AmazonEBS.html
53
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 54. Appendix-‐‑‒2
! 参考資料料
• EBS Optimized Instance (英語)
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/
EBSOptimized.html
• HI1 Instance (英語)
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/
storage_̲instances.html
• HS1 Instance (英語)
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/
high_̲storage_̲instances.html
• I2 Instance(英語)
http://aws.amazon.com/jp/glacier/pricing/
54
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.