Weitere ähnliche Inhalte
Ähnlich wie 100億超メッセージ/日のサービスを 支えるHBase運用におけるチャレンジ (20)
Mehr von LINE Corporation (20)
100億超メッセージ/日のサービスを 支えるHBase運用におけるチャレンジ
- 5. ストレージのHA構成
Redis + HBase × 2 のHA構成
• LINE独自のsharded Redis clusters
• HBase 0.90.6-cdh3u5 clusters
• writeだけでなくreadも多重化
storage API
Redis
cluster
HBase
cluster
HBase
cluster
messaging servers
- 6. データの配置
ストレージの構成 データの性質 データの種類
Redis + HBase
×2
• 頻繁にアクセスされる
データ
• リアルタイムアクセス
されるデータ
• user information
• message
• event
HBase ×2 • リアルタイム要求が
低めのデータ
• social graph
• message box
HBase ×1 • HA要求が高くない
データ
• stats
event : イベントを逐次処理するためのキュー
- 7. Multi-tenancy or Small Clusters?
現状は “small clusters” 構成
• multi-tenancy
巨大なclusterに複数のサービスを配置
• small clusters
サービスごとに1つのclusterを運用
multi-tenancyに比べて”small”
- 9. 主なHBase cluster
message event stats
HBase version 0.90.6-cdh3u5 0.90.6-cdh3u5 0.94.27
RegionServers 250 170 500
Used Capacity 133 TB 134 TB 11 PB
Peak Time Requests 約2,000,000 / sec 約2,000,000 /sec -
RegionServerのspec(導入時期による違いあり)
• CPU : 6 cores × 2 / 2.40 GHz
• Memory : 192 GB (RegionServerのheapに31GB)
• Storage : 3.0 TB ioDrive2
※message, eventはHAのため上記specのclusterが×2
- 11. spike発生時のRegionServer GC log
• new領域のpromotionに失敗
• full GCが発生して長時間のstop the world
※GCはCMSを使用
[GC 3439234.481: [ParNew (promotion failed): 235968K->214934K(235968K),
0.0474320 secs]3439234.528: [CMS: 11335704K->6744545K(16410692K), 7.5043760
secs] 11553160K->6744545K(16646660K), [CMS Perm : 25993K->25890K(43476K)],
7.5576600 secs] [Times: user=8.04 sys=0.00, real=7.55 secs]
- 12. full GC付近のRegionServer log
• BlockCache evictionが多発
00:50:15,918 LruBlockCache: Block cache LRU eviction started; Attempting to
free 731.93 MB of total=4.91 GB
00:50:15,935 LruBlockCache: Block cache LRU eviction completed; freed=859.86
MB, total=4.07 GB, single=1.12 GB, multi=3.74 GB, memory=0 KB
### ここでfull GC ###
00:50:28,546 LruBlockCache: Block cache LRU eviction started; Attempting to
free 700.12 MB of total=4.88 GB
00:50:28,573 LruBlockCache: Block cache LRU eviction completed; freed=769.88
MB, total=4.13 GB, single=326.15 MB, multi=4.51 GB, memory=0 KB
00:50:28,887 LruBlockCache: Block cache LRU eviction started; Attempting to
free 634.66 MB of total=4.81 GB
00:50:28,892 LruBlockCache: Block cache LRU eviction completed; freed=720.2
MB, total=4.11 GB, single=334.97 MB, multi=4.44 GB, memory=0 KB
- 20. GCとの戦いは続く
• その他にもlong GC問題は発生
• 対策例
heap利用の最適化
MemStore領域とBlockCache領域のバランシング
Java VM optionの最適化
Readを減らすschema/application設計
• BucketCache (HBase 0.96〜)が使えれば・・・