天天看点

Hbase 学习(六) 配置文件调优

这部分的内容,网上多了去了,都大同小异的,仅作为备忘录,省得需要的时候又要到处查。

<b>1.zookeeper.session.timeout</b>

默认3分钟,zookeeper和hbase通信的超时时间,设置为1分钟或者更少。

<b>2.hbase.regionserver.handler.count</b>

默认为10,很明显不够,在读多,写少的情况下设置为用户的最大数比较安全,但是在写操作比较多的情况下,可能会发生outofmemoryerror的错误。

<b>3.perf.hfile.block.cache.size</b>

默认是0.2,内存大的可以建议增加。

<b>4.hbase.hregion.memstore.block.multiplier</b>

默认是2,建议增加,is a safety latch that blocks any further updates from clients when the memstores exceed the multiplier* flush size limit.。

<b>5.hbase.regionserver.maxlogs</b>

默认是32,建议减少,这样就会强制region server提高把数据写入硬盘的频率,随后日志就会被删除了。

<b>6.hbase.regionserver.global.memstore.upperlimit </b>/hbase.regionserver.global.memstore.lowerlimit

这两个参数的默认值分别是0.4/0.35,它们是和hbase.hstore.blockingstorefiles(默认7)相关联的,怎么调整需要看具体情况,书上没说,这点比较恶心。

继续阅读