As HBase runs within JVM, the JVM Garbage Collection (GC) settings are very important for HBase to run smoothly, with high performance. In addition to the general guideline for configuring HBase heap settings, it's also important to have the HBase processes output their GC logs and then tune the JVM settings based on the GC logs' output.
We will describe the most important HBase JVM heap settings as well as how to enable and understand GC logging, in this recipe. We will also cover some general guidelines to tune Java GC settings for HBase.
The following are the recommended Java GC and HBase heap settings:
1. Give HBase enough heap size by editing the
hbase-env.sh
file. For example, the following snippet configures a 8000-MB heap size for HBase:$ vi $HBASE_HOME/conf/hbase-env.sh export HBASE_HEAPSIZE=8000
2. Enable GC logging by using the following command:
$ vi $HBASE_HOME/conf/hbase-env.sh...