P999~250ms.
☐ Both QPS and Latency are more stable.
## ReadRawCells / ResponseCells
|☑|region server|
memstore size (MB)|storefile size (MB)|read qps|get qps|write qps|read capacity (units/sec)|write capacity
"starttimemps": 1538399143265
}
## ReadRawCells / ResponseCells
|☑|region server|
memstore size (MB)|storefile size (MB)|read qps|get qps|write qps|read capacity (units/sec)|write capacity 9|257900269|
398039155 / 30077 = 13234
| ☐ | region server | memstore size (MB) | storefile size (MB) | read qps | get qps | write qps | read 0 码力 |
38 页 |
970.76 KB
| 2 年前 3 Cache, LRU evicted
Region Server
BlockCache
• 写缓存: Memstore
Region
Region
Write Cache, sorted map of KeyValues in memory.
Memstore
Memstore
• 写操作日志: WAL
WAL
HFile
HFile
HFile
HFile
• 数据文件: KeyValues on disk
深入RegionServer内部. 有两个Cache和两种文件
## 系统组成 RegionServer 写操作
- 先写WAL做故障恢复用
• 写到Memstore中
- 足够大时flush到HFile
• Compaction (Minor/Major)

HDFS Data Node
## 系统组成 RegionServer读操作
- 先找BlockCache
• 再找Memstore, 写入还没flush
• 根据index去HFile里找
- HBase如何在hdfs这种appendonly文件系统上实现, 修改/删除操作的
Region Server
Region 0 码力 |
33 页 |
4.86 MB
| 2 年前 3 CPU内核)及访问压力(每个Region的服务量)而定
• 过多Region的症状:
– CPU线程切换频繁
– 内存使用过大,造成GC频繁,服务Timeout
– 每个Region的Memstore太小,磁盘flush频繁,HFile文件过多小文件
## Major Compaction
• HBase根据时间来计划执行Major Compaction
– hbase.hregion blockingStoreFiles,建议值30
– 更大的 $ h_{base} $ .h_{region}\.memstore.flush.size能减少Compaction的次数
• 现在缺省128MB,一般不用修改
## HBase的GC特点
• 由单个RPC带来的操作类垃圾对象是短期的
• Memstore是相对长期驻留的,按2MB为单位分配
• Blockcache是长期驻留的,按64KB为单位分配
• 没有可用的handler响应
– 考虑增加handler数目或硬件资源
- 更常见的情况是95%—99%的写入都很快,但有些写入非常慢,甚至慢上万倍,一般问题在服务器端:
– 写入Memstore慢
• HLog写入超时——考虑HDFS及硬盘异常
• GC——考虑优化内存使用(GC参数及算法调优有限)
- Flush慢
• HFile写入超时——考虑HDFS及硬盘异常
• C 0 码力 |
45 页 |
4.33 MB
| 2 年前 3 option changed
• HBase configuration
☐ 0.3 <= global memstore limit <= 0.45
☐ hfile.block.cache.size = 0.1
☐ hbase.hregion.memstore.flush.size = 256 MB
☐ hbase.bucketcache.ioengine = offheap 0 码力 |
45 页 |
1.32 MB
| 2 年前 3 retained until those key values are successfully written to the WAL log and Memstore. The ConcurrentSkipListSet in Memstore does not directly store the Cell data, but reference to cells, which are encoded 0 码力 |
18 页 |
1.14 MB
| 2 年前 3
|