首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

HBase Compaction (二)

2013-11-29 
HBase Compaction (2)? ? ? ?原文链接:http://goo.gl/jwKdj二、性能优化? ? ? ?1.关闭主合并的自动运行功能

HBase Compaction (2)

? ? ? ?原文链接:http://goo.gl/jwKdj

二、性能优化

? ? ? ?1.关闭主合并的自动运行功能(关闭定时器)

? ? ? ?把表的所有region一次性提交主合并,没有做一些细节控制。例如:一张表有240个region,这样就会产生大量的磁盘I/O和网络通信,严重影响性能。

? ? ? ?优化设计方案:

? ? ? ? ? ? ? 首先,把表的所有region按所属RegionServer进行分组;

? ? ? ? ? ? ? 然后,设定等待时间,按时对分组进行轮询(负载均衡算法)提交主合并。

? ? ? ?3.减少compaction的发生

? ? ? ? ? ? ?HBase解决Region Server Compact过程占用大量网络出口带宽的问题

? ? ? ? ? ? ?选择性地关闭small compaction或large compaction。

? ? ? ? ? ? ?两个线程池,选择性地关闭一个,留下一个,这样使得并发处理能力减半,来减轻磁盘I/O和网络通信的压力。

? ? ? ?4.减少major compaction的发生

? ? ? ? ? ? ??compaction配置参数

? ? ? ? ? ? ? ? ? ? ?Max Compaction Size ? ? ? ? ?[HBASE-3290]

? ? ? ? ? ? ? ? ? ? ?Add ability to specify a maximum storefile size for compaction. After this limit, we will not include this file in compactions. This is useful for large object stores and clusters that pre-split regions.

? ? ? ? ? ? ? ? ? ? ?hbase.hstore.compaction.max.size (.92) (bytes) Any StoreFile larger than this setting with automatically be excluded from compaction (default Long.MAX_VALUE).

? ? ? ? ? ? ? ? ? ? ?hbase.hstore.compaction.max.size=4294967296(4×1024×1024×1024) hfile达到4G就不参与合并

? ? ? ? ? ? ? ? ? ? ?hbase.hstore.compaction.max.size(defaults to Long.MAX_VALUE ):Any file larger than the maximum compaction size is always excluded.

? ? ? ? ? ? ? ? ? ? ?超过4G的文件不参与compaction会降低major compaction的概率

三、参考资料

? ? ? ?1.图形化理解 HBase 数据写操作、压缩操作过程

? ? ? ?2.HBase解决Region Server Compact过程占用大量网络出口带宽的问题

热点排行