`

hbase-logroll optimizations

 
阅读更多

 

  as u know,the hbas's data logs (akka wal) will roll after certain intervals to speedup restore data lost occasionally.and of course,both log rolling and flush memstore will block up all wirtes but reads.so if decreasing the log rolling will optimize the cluster perf.

 

1.case

  during the high load period of a day,some ugly logs are occured as below:

2015-09-07 09:10:35,380 WARN [IPC Server handler 1 on 60020] WritableRpcEngine.java:436 (responseTooSlow): {"processingtimems":22896,"call":"multi(org.apache.hadoop.hbase.client.Mul
tiAction@72e76446), rpc version=1, client version=29, methodsFingerPrint=-56040613","client":"192.168.0.117:55979","starttimems":1441588212481,"queuetimems":0,"class":"HRegionServer
","responsesize":0,"method":"multi"}
2015-09-07 09:11:45,033 DEBUG [regionserver60020.logRoller] LogRoller.java:86 Hlog roll period 3600000ms elapsed
2015-09-07 09:11:45,033 INFO [regionserver60020.logRoller] FSUtils.java:429 FileSystem doesn't support getDefaultReplication
2015-09-07 09:11:45,034 INFO [regionserver60020.logRoller] FSUtils.java:395 FileSystem doesn't support getDefaultBlockSize
2015-09-07 09:11:45,037 DEBUG [regionserver60020.logRoller] SequenceFileLogWriter.java:195 using new createWriter -- HADOOP-6840
2015-09-07 09:11:45,037 DEBUG [regionserver60020.logRoller] SequenceFileLogWriter.java:208 Path=hdfs://hd02:54310/hbase-94s/.logs/node-59,60020,1441098691966/node-59%2C60020%2C14410
98691966.1441588305033, syncFs=true, hflush=false, compression=false
2015-09-07 09:11:45,053 INFO [regionserver60020.logRoller] HLog.java:654 Roll /hbase-94s/.logs/node-59,60020,1441098691966/node-59%2C60020%2C1441098691966.1441584704954, entries=123
01, filesize=25620076.  for /hbase-94s/.logs/node-59,60020,1441098691966/node-59%2C60020%2C1441098691966.1441588305033
2015-09-07 09:11:46,104 DEBUG [LRU Statistics #0] LruBlockCache.java:681 Stats: total=1.37 GB, free=2.32 GB, max=3.69 GB, blocks=10745, accesses=22326231, hits=19423914, hitRatio=87
.00%, , cachingAccesses=19369432, cachingHits=19352868, cachingHitsRatio=99.91%, , evictions=0, evicted=5776, evictedPerRun=Infinity
2015-09-07 09:12:05,535 WARN [IPC Server handler 0 on 60020] WritableRpcEngine.java:436 (responseTooSlow): {"processingtimems":17071,"call":"multi(org.apache.hadoop.hbase.client.Mul
tiAction@1ef7f77), rpc version=1, client version=29, methodsFingerPrint=-56040613","client":"192.168.0.142:44554","starttimems":1441588308460,"queuetimems":0,"class":"HRegionServer"
,"responsesize":0,"method":"multi"}
2015-09-07 09:12:42,259 INFO [regionserver60020-SendThread(node-01:2181)] ClientCnxn.java:1085 Unable to read additional data from server sessionid 0x14dd790d3735f22, likely server 
has closed socket, closing socket connection and attempting reconnect

 

 

2.optimizations

1) compress the logs by compress option to reduce io

hbase.regionserver.wal.enablecompression=true

 

   the principle of it pls check out LRUDiction.java

   before:

2015-09-17 03:32:52,361 INFO [regionserver60020.logRoller] HLog.java:654 Roll /hbase/.logs/node-app-13,60020,1441852998783/node-app-13%2C60020%2C1441852998783.1442429970301, entries
=54994, filesize=127512793.  for /hbase/.logs/node-app-13,60020,1441852998783/node-app-13%2C60020%2C1441852998783.1442431972113

   now:

2015-09-22 08:22:04,008 INFO [regionserver60020.logRoller] HLog.java:654 Roll /hbase/.logs/node-app-13,60020,1442683680803/node-app-13%2C60020%2C1442683680803.1442877723854, entries
=34246, filesize=45448938.  for /hbase/.logs/node-app-13,60020,1442683680803/node-app-13%2C60020%2C1442683680803.1442881323960

   so the compress ratio per entry is:

   (45448938/34246 ) / (127512793 / 54994) ~ 0.6

   that is 40 percent of raw spaces are saved,it's very considerable to derive that.

   in additional,these logs are needless to decompress generally,beside that some rs downs occasionally.

 

2) memory data compress

 TBD

 

3) increase the hlog block size

to delay compression

hbase.regionserver.hlog.blocksize=<should-more-then-dfs's one>

   now i give  a double dfs block size to that:268435456

  hbase will not occupy some more memory though i set it more then default(dfs size)

 

4) increase the log roll interval

   either this case or 3) will occur by which comes first,so i will set it to 10 hours:36000000

 

 

 

0
1
分享到:
评论

相关推荐

    hbase-meta-repair-hbase-2.0.2.jar

    HBase 元数据修复工具包。 ①修改 jar 包中的application.properties,重点是 zookeeper.address、zookeeper.nodeParent、hdfs....③开始修复 `java -jar -Drepair.tableName=表名 hbase-meta-repair-hbase-2.0.2.jar`

    hbase-sdk是基于hbase-client和hbase-thrift的原生API封装的一款轻量级的HBase ORM框架

    hbase-sdk是基于hbase-client和hbase-thrift的原生API封装的一款轻量级的HBase ORM框架。 针对HBase各版本API(1.x~2.x)间的差异,在其上剥离出了一层统一的抽象。并提供了以类SQL的方式来读写HBase表中的数据。对...

    phoenix-core-4.7.0-HBase-1.1-API文档-中文版.zip

    赠送jar包:phoenix-core-4.7.0-HBase-1.1.jar; 赠送原API文档:phoenix-core-4.7.0-HBase-1.1-javadoc.jar; 赠送源代码:phoenix-core-4.7.0-HBase-1.1-sources.jar; 赠送Maven依赖信息文件:phoenix-core-4.7.0...

    hbase-1.2.1-bin.tar.gz.zip

    标题“hbase-1.2.1-bin.tar.gz.zip”表明这是HBase 1.2.1版本的二进制发行版,以tar.gz格式压缩,并且进一步用zip压缩。这种双重压缩方式可能用于减小文件大小,方便在网络上传输。用户需要先对zip文件进行解压,...

    HBase(hbase-2.4.9-bin.tar.gz)

    HBase(hbase-2.4.9-bin.tar.gz)是一个分布式的、面向列的开源数据库,该技术来源于 Fay Chang 所撰写的Google论文“Bigtable:一个结构化数据的分布式存储系统”。就像Bigtable利用了Google文件系统(File System...

    hbase-client-2.1.0-cdh6.3.0.jar

    hbase-client-2.1.0-cdh6.3.0.jar

    phoenix-5.0.0-HBase-2.0-client

    "phoenix-5.0.0-HBase-2.0-client" 是一个针对Apache HBase数据库的Phoenix客户端库,主要用于通过SQL查询语句与HBase进行交互。这个版本的Phoenix客户端是为HBase 2.0版本设计和优化的,确保了与该版本HBase的兼容...

    phoenix-client-hbase-2.2-5.1.2.jar

    phoenix-client-hbase-2.2-5.1.2.jar

    phoenix-hbase-2.4-5.1.2

    《Phoenix与HBase的深度解析:基于phoenix-hbase-2.4-5.1.2版本》 在大数据处理领域,Apache HBase和Phoenix是两个至关重要的组件。HBase作为一个分布式、列式存储的NoSQL数据库,为海量数据提供了高效、实时的访问...

    hbase的hbase-1.2.0-cdh5.14.2.tar.gz资源包

    `hbase-1.2.0-cdh5.14.2.tar.gz` 是针对Cloudera Distribution Including Apache Hadoop (CDH) 5.14.2的一个特定版本的HBase打包文件。CDH是一个流行的Hadoop发行版,包含了多个大数据组件,如HDFS、MapReduce、YARN...

    phoenix-hbase-2.2-5.1.2-bin.tar.gz

    本文将深入探讨这两个技术及其结合体`phoenix-hbase-2.2-5.1.2-bin.tar.gz`的详细内容。 首先,HBase(Hadoop Database)是Apache软件基金会的一个开源项目,它构建于Hadoop之上,是一款面向列的分布式数据库。...

    hbase-1.3.1-bin.tar.gz.7z

    进入 `conf` 目录,复制 `hbase-site.xml.example` 文件为 `hbase-site.xml`,并编辑该文件,添加如下配置: ```xml &lt;name&gt;hbase.rootdir &lt;value&gt;hdfs://namenode_host:port/hbase &lt;name&gt;hbase.cluster....

    hive-hbase-handler-1.2.1.jar

    被编译的hive-hbase-handler-1.2.1.jar,用于在Hive中创建关联HBase表的jar,解决创建Hive关联HBase时报FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop....

    phoenix-hbase-1.4-4.16.1-bin

    《Phoenix与HBase的深度解析:基于phoenix-hbase-1.4-4.16.1-bin的探讨》 Phoenix是一种开源的SQL层,它为Apache HBase提供了高性能的关系型数据库查询能力。在大数据领域,HBase因其分布式、列式存储的特性,常被...

    hbase-2.4.17-bin 安装包

    这个“hbase-2.4.17-bin”安装包提供了HBase的最新稳定版本2.4.17,适用于大数据处理和分析场景。下面将详细介绍HBase的核心概念、安装步骤以及配置和管理。 一、HBase核心概念 1. 表(Table):HBase中的表是由行...

    pinpoint的hbase初始化脚本hbase-create.hbase

    搭建pinpoint需要的hbase初始化脚本hbase-create.hbase

    phoenix-4.14.1-HBase-1.2-client.jar

    phoenix-4.14.1-HBase-1.2-client.jar

    hbase-2.4.11-bin.tar.gz

    标题中的“hbase-2.4.11-bin.tar.gz”是指HBase的2.4.11稳定版本的二进制压缩包,用户可以通过下载这个文件来进行安装和部署。 HBase的核心设计理念是将数据按照行和列进行组织,这种模式使得数据查询和操作更加...

    hbase-hadoop-compat-1.1.3-API文档-中文版.zip

    赠送jar包:hbase-hadoop-compat-1.1.3.jar; 赠送原API文档:hbase-hadoop-compat-1.1.3-javadoc.jar; 赠送源代码:hbase-hadoop-compat-1.1.3-sources.jar; 赠送Maven依赖信息文件:hbase-hadoop-compat-1.1.3....

    hbase-prefix-tree-1.1.3-API文档-中文版.zip

    赠送jar包:hbase-prefix-tree-1.1.3.jar; 赠送原API文档:hbase-prefix-tree-1.1.3-javadoc.jar; 赠送源代码:hbase-prefix-tree-1.1.3-sources.jar; 赠送Maven依赖信息文件:hbase-prefix-tree-1.1.3.pom; ...

Global site tag (gtag.js) - Google Analytics