HDFS namenode 内存,因为元数据信息是存在内存中的,默认是 1G,建议改为 36G, 36864
HDFS datanode内存,默认是 1G,建议改为 4GB
fs.trash.interval=10080 单位:分钟
374820962816 350GB
NameNode Server threads
400
72GB
Minimum Container Size (Memory)
yarn.scheduler.minimum-allocation-mb
1GB
Maximum Container Size (Memory)
yarn.scheduler.maximum-allocation-mb
8GB
Maximum Container Size (VCores)
8
3072->4096
6144->4096
2047->1536
1024->36864
由于 hbase 本身是很吃内存的,建议 20G(ambari已经是 20 G了,没动),默认 20 G
30->60
hbase.regionserver.handler.count:rpc请求的线程数量,默认值是 30,生产环境建议使用 60,也不是越大越好,特别是当请求内容很大的时候,比如scan/put几M的数据,会占用过多的内存,有可能导致频繁的GC,甚至出现内存溢出。
10GB->50GB
默认值为 7 天->0 即禁止自动的 major 主合并,主合并能持续数小时之久,为减少对业务的影响,建议在业务低峰期进行手动或者通过脚本或者 api 定期进行 major 合并。
hbase.hregion.memstore.flush.size:默认值128M,默认值即可。
默认值 4,如果一个 memstore 的内存大小已经超过 hbase.hregion.memstore.flush.size * hbase.hregion.memstore.block.multiplier,则会阻塞该 memstore 的写操作,为避免阻塞,建议设置为更大些,如果太大,则会有 OOM 的风险。
如果在 regionserver 日志中出现 “Blocking updates for ‘‘ on region : memstore size <多少M> is >= than blocking <多少M> size”的信息时,说明这个值该调整了。
默认值为 3,如果任何一个 store 里的 storefile 总数超过该值,会触发默认的合并操作,可以设置 5~8,在手动的定期 major compact 中进行 storefile 文件的合并,减少合并的次数,不过这会延长合并的时间,以前的对应参数为 hbase.hstore.compactionThreshold。
默认值为 10,一次最多合并多少个 storefile,避免 OOM。
默认为 10,如果任何一个 store (非.META.表里的 store)的 storefile 的文件数大于该值,则在 flush memstore 前先进行 split 或者 compact,同时把该 region 添加到 flushQueue,
延时刷新,这期间会阻塞写操作直到 compact 完成或者超过 hbase.hstore.blockingWaitTime (默认 90s)配置的时间,可以设置为 30,避免 memstore 不及时 flush。当 regionserver 运行日志中出现大量的 “Region has too many store files; delaying flush up to 90000ms”时,说明这个值需要调整了
zookeeper.znode.parent 从 /hbase-unsecure 改为 /hbase
hbase.master.info.port 从 16010 改为 60010
hbase.master.port 从 16000 改为 60000
hbase.regionserver.port 从 16020 改为 60020
hbase.regionserver.info.port 从 16030 改为 60030
默认为 90 秒
如果太长,当 regionserver 挂掉,zk 还得等待这个超时时间(已有 patch 修复),从而导致 master 不能及时对 region 进行迁移。
1024->8096
用 zookeeper 用户登录
vi /etc/zookeeper/2.6.5.0-292/0/zoo.cfg
maxClientCnxns=300
而 minSessionTimeout 和 maxSessionTimeout 是用下面的方式算出来的
tickTime=3000 毫秒
public int getMinSessionTimeout()
{ return minSessionTimeout == -1 ? tickTime 2 : minSessionTimeout; }
public int getMaxSessionTimeout()
{ return maxSessionTimeout == -1 ? tickTime 20 : maxSessionTimeout; }
默认是 512M->4096M