Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Ceph
アーキテクチャ概説
Gluster Community Day, 20 May 2014
Haruka Iwao
もくじ
Ceph とは何か
Ceph のアーキテクチャ
Ceph と OpenStack
まとめ
Ceph とは何か
Ceph
“Ceph” は頭足類を意味する
“cephalopod” の略で、よく
タコにつけられるあだ名であ
る。
http://techcrunch.com/2014/04/30/red-hat-buys-ceph-
provider-inktank-for-175m-in-cash-to-beef-up-its-cloud-storage-
offerings/
頭足類?
Ceph アーキテクチャ概説
Ceph は...
{ }
オブジェクトストレージと
ファイルシステムです
オープンソースで
大規模にスケールする
ソフトウェアによる
Cephの歴史
2003 UCSCで開発開始
2006 オープンソース化
主要な論文が発表
2012 Inktank 創業
“Argonaut” がリリース
UCSC: カリフォルニア大学サンタクルーズ校
2014年5月
Red HatがIntankを買収
Cephのリリース
3ヶ月おきのメジャーリリース
Argonaut
Bobtail
Cuttlefish
Dumpling
Emperor
Firefly
Giant (7月リリース予定)
Cephのアーキテクチャ
Cephの概略図
Cephのレイヤー
RADOS = /dev/sda
Ceph FS = ext4
/dev/sda
ext4
RADOS(レイドス)
信頼性のある(Reliable)
データ消失を避けるため複製を作成
自律的な(Autonomic)
お互いに通信し、障害を検知
レプリケーションが透過的に行われる
分散(Distributed)
オブジェクトストア(Object Store)
RADOS (2)
Cephの中核
すべてのデータはRADOSに保
存される
Ceph FS が用いるメタデータを
含む
mon と osd の2つから成る
CRUSHアルゴリズムが特徴
OSD
Object storage daemon
1ディスクにつき1OSD
xfs/btrfs をバックエンドに使用
Btrfs のサポートは実験的
整合性担保と性能向上のため、
Write-aheadなジャーナルを利用
OSDの台数は3〜数万
OSD (2)
DISK
FS
DISK DISK
OSD
DISK DISK
OSD OSD OSD OSD
FS FS FSFS
btrfs
xfs
ext4
MON
Monitoring daemon
クラスタマップとクラスタの
状態を管理
3, 5など奇数で少ない台数
オブジェクトの配置
RADOS は “CRUSH” アルゴリズ
ムを用いてオブジェクトを配置
オブジェクトの場所は100%計算の
みで求められる
メタデータサーバーが不要
SPoFなし
非常に良いスケーラビリティ
CRUSHについて
1. Placement group(PG) を割り当て
PG = Hash(オブジェクト名) % PG数
2. OSD = CRUSH(PG, クラスタマップ, ルール)
1
2
クラスタマップ
 階層的なOSDのマップ
障害単位(ラックやスイッチ)をまたいで複製
トラフィックの集中を防止
オブジェクト配置の求め方
0100111010100111011
オブジェクト名: abc, プール: test
Hash(“abc”) % 256 = 0x23
“test” = 3
Placement Group: 3.23
PG から OSDへの割り当て
Placement Group: 3.23
CRUSH(PG 3.23, クラスタマップ, ルール)
→ osd.1, osd.5, osd.9
1
5
9
同期レプリケーション
強い一貫性を保つため、レプリ
ケーションは同期
OSDがfailしたら
OSDが“down”状態になる
5分後, “out”状態に変わる
クラスタマップが更新される
CRUSH(PG 3.23, クラスタマップ1, ルール)
→ osd.1, osd.5, osd.9
CRUSH(PG 3.23, クラスタマップ2, ルール)
→ osd.1, osd.3, osd.9
CRUSHまとめ
オブジェクト名 + クラスタ
マップ → オブジェクトの場所
決定的なアルゴリズム
メタデータを完全に排除
計算はクライアント側で可能
クラスタマップはネットワー
クの階層を反映
RADOSGW
RADOS
A reliable, autonomous, distributed object store comprised of self-healing, self-managing,
intelligent storage nodes
LIBRADOS
A library allowing
apps to directly
access RADOS,
with support for
C, C++, Java,
Python, Ruby,
and PHP
RBD
A reliable and fully-
distributed block
device, with a Linux
kernel client and a
QEMU/KVM driver
CEPH FS
A POSIX-compliant
distributed file
system, with a Linux
kernel client and
support for FUSE
RADOSGW
A bucket-based REST
gateway, compatible
with S3 and Swift
RADOSGW
S3 / Swift 互換なRADOS用の
ゲートウェイ
RBD
RADOS
A reliable, autonomous, distributed object store comprised of self-healing, self-managing,
intelligent storage nodes
LIBRADOS
A library allowing
apps to directly
access RADOS,
with support for
C, C++, Java,
Python, Ruby,
and PHP
RBD
A reliable and fully-
distributed block
device, with a Linux
kernel client and a
QEMU/KVM driver
CEPH FS
A POSIX-compliant
distributed file
system, with a Linux
kernel client and
support for FUSE
RADOSGW
A bucket-based REST
gateway, compatible
with S3 and Swift
RBD
RADOS Block Devices
ブロックデバイス
RBDの利用の仕方
直接マウントできる
rbd map foo --pool rbd
mkfs -t ext4 /dev/rbd/rbd/foo
OpenStack 統合
CinderとGlanceから利用可能
後ほど詳しく説明
Ceph FS
RADOS
A reliable, autonomous, distributed object store comprised of self-healing, self-managing,
intelligent storage nodes
LIBRADOS
A library allowing
apps to directly
access RADOS,
with support for
C, C++, Java,
Python, Ruby,
and PHP
RBD
A reliable and fully-
distributed block
device, with a Linux
kernel client and a
QEMU/KVM driver
CEPH FS
A POSIX-compliant
distributed file
system, with a Linux
kernel client and
support for FUSE
RADOSGW
A bucket-based REST
gateway, compatible
with S3 and Swift
Ceph FS
POSIX互換のファイルシステム
RADOS上に構築
Linuxのネイティブドライバ
(cephfs)またはFUSEでマウント
メタデータサーバー(mds)がファ
イルシステムツリーを管理
Ceph FSの信頼性
MDSはファイルシステムに対
する変更をジャーナルとして
RADOSに記録
MDSが停止した場合はジャーナ
ルから状態を復元
HAまたは負荷分散のために、
複数のMDSを利用可能
Ceph FS と OSD
MDS
OSDOSDOSD
POSIX メタデータ
(ツリー, 時間, 所有者など)
MDS
メタデータの変更を記録
データの読み書き
メタデータはメモリ上で管理
Ceph アーキテクチャ概説
Ceph アーキテクチャ概説
Ceph アーキテクチャ概説
Ceph アーキテクチャ概説
DYNAMIC SUBTREE PARTITIONING
Ceph FS はまだ実験的
その他の機能
ローリングアップグレード
Erasure Coding
階層化キャッシュ
KVSによるOSDバックエンド
独立したバックエンドネット
ワーク
ローリングアップグレード
サービスを止めずにバージョ
ンアップが可能
デーモンを一つずつstop/start
mon → osd → mds →
radowgw の順で実施
Erasure coding
レプリケーションの代わりに、
Erasure coding(消失訂正符号)
を用いてデータを保護
アクセス頻度の少ないデータ
に適している
Erasure Coding レプリケーション
容量オーバーヘッド
(2台の故障に耐える)
およそ40% 200%
CPU負荷 高い 低い
レイテンシ 高い 低い
階層化キャッシュ
キャッシュtier
例) SSD
ベースtier
例) HDD,
erasure coding
librados
クライアントには透過的
読み書き
キャッシュミス時の
読み込み
キャッシュミス時のfetch
ベースtierへフラッシュ
KVSによるOSDバックエンド
OSDのバックエンドに
LevelDBを使用(xfsの代替)
特に小さなオブジェクトのパ
フォーマンスが向上
不揮発メモリKVSやRocksDB
などのサポートも計画
独立したバックエンドネットワーク
レプリケーションのための
バックエンドネットワーク
クライアント
サービス用フロント
エンドネットワーク
OSD
1. 書き込み
2. レプリケーション
OpenStack 統合
OpenStack と Ceph
RADOSGW と Keystone
Keystoneサーバ
RADOSGW
RESTfulオブジェクトストア
トークン問い合わせ
トークンを用いて
アクセス
アクセス権付与
Glanceでの利用
RBD
Glance サーバ
/etc/glance/glance-api.conf
default_store=rbd
rbd_store_user=glance
rbd_store_pool=images
保存, ダウンロード
3行の設定で
利用可能
イメー
ジ
Cinder/Nova 統合
RBD
Cinder サーバー
qemu
VM
librbd
nova-compute
ボリュームからブート
管理
ボリューム
イメー
ジ
Copy-on-writeによるクローン
を で用いるメリット
イメージとボリュームに単一
のストレージを提供
Copy-on-writeによるクロー
ンとスナップショットの利用
qemu, KVMのネイティブサ
ポートによる高い性能
Ceph アーキテクチャ概説
まとめ
Ceph とは
高いスケーラビリティを持つ
ストレージ
オブジェクト、ブロック、
POSIXファイルシステムすべて
に単一のアーキテクチャ
OpenStackとの統合はすでに
実績がある
Ceph と GlusterFS の比較
Ceph GlusterFS
データ配置 オブジェクト単位 ファイル単位
ファイルの場所 決定的なアルゴリ
ズムによる
(CRUSH)
分散ハッシュテー
ブル, xattrに保存
レプリケーション サーバーサイド クライアントサイ
ド
主な使い道 オブジェクト/ブ
ロックストア
POSIX互換のファイ
ルシステム
課題 POSIXファイルシス
テムに改善が必要
オブジェクト/ブ
ロックストアに改
善が必要
参考資料
Ceph Documents
https://ceph.com/docs/master/
Well documented.
Sébastien Han
http://www.sebastien-han.fr/blog/
An awesome blog.
CRUSH: Controlled, Scalable, Decentralized Placement of Replicated Data
http://ceph.com/papers/weil-crush-sc06.pdf
CRUSH algorithm paper
Ceph: A Scalable, High-Performance Distributed File System
http://www.ssrc.ucsc.edu/Papers/weil-osdi06.pdf
Ceph paper
Ceph の覚え書きのインデックス
http://www.nminoru.jp/~nminoru/unix/ceph/
One more thing
Calamariがオープンソース化
“Calamari, the monitoring
and diagnostics tool that
Inktank has developed as
part of the Inktank Ceph
Enterprise product, will soon
be open sourced.”
http://ceph.com/community/red-hat-to-acquire-inktank/#sthash.1rB0kfRS.dpuf
Calamariの画面
Thank you!

More Related Content

Ceph アーキテクチャ概説

Editor's Notes

  1. Cephalapod is a kind of animals. It is something like octopus. Well, let’s talk about the software.
  2. Ceph is… Sounds familiar? It is really similar to GlusterFS, and has many features in common. The goal of Ceph is to provide cheap, fast and reliable storage as free software.
  3. The development of Ceph was started in 2003 by Sage Weil. He open-sourced the source code in 2006. Also some important papers were published in 2006. He later founded a company called Inktank to continue development of Ceph and provide commercial support. In 2012, the first stable release “Argonaut” was released.
  4. In April 2014, something big has happened. Red Hat acquired Inktank and Ceph.
  5. Major releases of Ceph happen every three months. The code names goes in alphabet order, and the latest release is Firefly. The next release will be Giant release that is coming in July.
  6. Next I am going to talk about the architecture of Ceph. Ceph has very simple but robust architecture.
  7. This figure represents each block in Ceph. RADOS, RADOSGW, RBD, CEPH FS are all important keyword when talking about Ceph. I will explain them one by one later. The important thing is Ceph has a layered architecture, and RADOS is the base of all systems.
  8. This is similar to ordinary file system. RADOS is analogous to block storage, something like /dev/sda, and Ceph FS for example is the ext4 file system. By using this architecture, Ceph is simple and easy to expand.