当前位置:首页 > 大数据运维 > 正文内容

Hbase性能优化

zhangquanyu1年前 (2023-04-28)大数据运维464

Hbase优化

 

Region 相关参数:

 

hbase.hregion.max.filesize=50G

默认 10G,Region 中任意 HStore 所有文件大小总和大于该值就会进行分裂。

建议生产设置为 50G左右。

 

BlockCache 相关参数

 

hbase.bucketcache.ioengine=offheap

 

hfile.block.cache.size=0.2

 

hbase.bucketcache.size=10240

堆外存大小

 

HBase刷写参数

 

hbase.hregion.memstore.flush.size=256M

触发MemStore 的刷写阈值

 

hbase.hregion.memstore.block.multiplier=8

默认值 4,Region 中所有 MemStore  超过单个 MemStore 大小的倍数达到该参数值时, 就会阻塞写请求并强制 Flush。

 

hbase.regionserver.global.memstore.size=0.6

写缓存的总比例

 

hbase.regionserver.optionalcacheflushinterval=36000000

默认3600000 即一个小时)进行 MemStore 的刷写, 建议设置较大值

 

Compaction相关参数:

 

hbase.hstore.compaction.min=10

默认值 3,一个 Store 中 HFile 文件数量超过该阈值就会触发一次 Minor Compaction

 

hbase.hstore.compaction.max=15

一次 Minor Compaction 最多合并的 HFile 文件数量

 

hbase.regionserver.thread.compaction.small=5

hbase.regionserver.thread.compaction.large=5

默认值 1,表示 large compactions 与 small compactions 线程池的大小

 

 

hbase.hstore.blockingStoreFiles=100

默认值 10,表示一个 Store 中 HFile 文件数量达到该值就会阻塞写入,等待 Compaction 的完成。一般建议调大点,比如设置为 100,避免出现阻塞更新的情况

 

hbase.hregion.majorcompaction=0

关闭自动触发Major Compaction,在业务低峰期时手动执行

 

HLog 相关参数

 

hbase.regionserver.maxlogs=200

wal 日志文件总数超过该阈值就会强制执行 flush 操作

 

hbase.regionserver.hlog.splitlog.writer.threads=10

默认为 3重新写入 hdfs 的线程数

 

Call Queue 相关参数

 

hbase.regionserver.handler.count=200

服务器端用来处理用户请求的线程数

 

其他:

hbase.online.schema.update.enable=true

在线更新schema

 

hbase.zookeeper.useMulti= true

开启 zookeeper 的 multi-update 功能

 

开启MSLAB

 

hbase.hregion.memstore.mslab.enabled=true

 

 

HBase2.0版本建议设置:

hbase.hregion.compacting.memstore.type=BASIC


扫描二维码推送至手机访问。

版权声明:本文由张权予博客发布,如需转载请注明出处。

本文链接:https://zhangquanyu.com/?id=17

标签: 大数据Hbase
分享给朋友:
返回列表

上一篇:HDP升级版本:2.6.x升级到3.1.5

没有最新的文章了...

“Hbase性能优化” 的相关文章

HDP2.4安装

HDP2.4安装

安装Ambari# 安装ambari-server  yum install ambari-server    # 创建ambari数据库,并将ambari数据schema通过source命令导入到M...

HDP升级版本:2.6.x升级到3.1.5

HDP升级版本:2.6.x升级到3.1.5

一、前期准备 注意:hdp3.1不支持以下操作系统: RHEL/CentOS/OEL 6, SLES 11, and Debian 7 一、开始前准备 1、确保群集中的所有服务都在运行 2、运行服务检查,确保能成功执行3、清楚所有报警或了解为什么生成原因,必要...