Member since
02-19-2015
3
Posts
0
Kudos Received
0
Solutions
12-02-2016
01:51 AM
Thanks. The export/import idea is very interesting. We will further investigate this. Regarding the max compaction size, do you think this could be the reason that explain why our scheduled Major compactions are not taking place (i.e. it is just ignoring the files larger than 500Mb so it thinks there is nothing to compact)?
... View more
12-01-2016
01:30 AM
Thank you for your reply. It is much appreciated. @ben.hemphill wrote: Why do they stay there/ don't trigger a major compaction? I think we'd need to know file sizes/timestamps to speculate further. Minor compactions are still happening so given our advanced configuration the store files are mostly slightly larger than 500Mb. Our region size is configured as 15 Gb so there is one large store file of a few Gb. Some of the store files have a timestamp several months old (clearly showing that Major compactions were not happening). According to the documentation "hbase.hstore.compaction.max.size" should only affect minor compactions. Do you have any experience to confirm this fact? @ben.hemphill wrote: 1) How can we understand why certain regions are not being properly performing Major compactions (is there any indication on the logs, etc)? The best thing I've found so far is doing checks on the number of files in HDFS. we run compactions nightly during off peak, looking for regions with over X amount of hfiles and trigger a major compact for those regions. weekly we run the same full major compact. This helps keep on top of the trouble regions. Is this a manual process or do you use some time of automation (configuration in HBase?)? ben.hemphill wrote: 3) We have a few regions which are more problematic since they contain more than 1000 store files (which account for a few TBs of data in a single region). Is it safe to manually perform Major compaction of such regions and if so do we need to have a large enough buffer in terms of storage to ensure the compaction is successful. Depending on the filesizes you can go oom from this. To maximize chances of success, put the region on a regionserver all by it self and give it enough heap to store the resulting store file in memory. you will then likely trigger a few splits after compaction based on your max region size configuration. From our experience it seems the region split only happens after the Major compaction. Regarding the going oom, do you know if it tries to keep the full temporary store file (created during the compaction) in memory or just the store file being merged at each moment? Given the sum of the store files in the most problematic regions (> TB) and given our region size configuration (15GB), the outcome of the major compaction would be something like 100 new regions. Is this something that a Major compaction can handle? We are currently considering performing pre-split of the problematic regions before doing the compaction but we have no experience with such procedure. Any recommendation?
... View more
11-23-2016
06:19 AM
We are using CDH version 5.3.3 and some regions seem not to be performing major compaction as expected. Most of our writes are being done by bulk import and minor compactions run as expected. Since we have frequent write operations, and in order to avoid running minor compactions frequently we have added the following attributes to the advanced configuration snippet (following the support provided by Cloudera): <property> <name>hbase.server.compactchecker.interval.multiplier</name> <value>80</value> <description>The number that determines how often we scan to see if compaction is necessary. Normally, compactions are done after some events (such as memstore flush), but if region didn't receive a lot of writes for some time, or due to different compaction policies, it may be necessary to check it periodically. The interval between checks is hbase.server.compactchecker.interval.multiplier multiplied by hbase.server.thread.wakefrequency.</description> </property> <property> <name>hbase.regionserver.thread.compaction.large</name> <value>4</value> </property> <property> <name>hbase.regionserver.thread.compaction.small</name> <value>6</value> </property> <property> <name>hbase.hstore.compaction.max.size</name> <value>536870912</value> </property> Major compactions are scheduled to run every 7 days. We currently have regions with a few dozen Store Files but we have a few problematic cases where we have more than 1000 files. We would like to understand why this is happening and how can we prevent it. These are 4 main topics: 1) How can we understand why certain regions are not being properly performing Major compactions (is there any indication on the logs, etc)? 2) Which type of attributes should we monitor to ensure good HBase health (since currently the situation does not seem very healthy however HBase is not reporting anything in Cloudera Manager)? 3) We have a few regions which are more problematic since they contain more than 1000 store files (which account for a few TBs of data in a single region). Is it safe to manually perform Major compaction of such regions and if so do we need to have a large enough buffer in terms of storage to ensure the compaction is successful. 4) We assume data insertion can continue to happen while these large Major compaction activities are ongoing. Is this correct? Thanks for any feedback or support
... View more
Labels:
- Labels:
-
Apache HBase