Understanding HBase garbage collection
You can configure garbage collection to free up the memory that is no longer referenced by Java objects.
Garbage collection (memory cleanup) by the JVM can cause HBase clients to experience excessive latency.
To tune the garbage collection settings, you pass the relevant parameters to the JVM.
Example configuration values are not recommendations and should not be considered as such. This is not the complete list of configuration options related to garbage collection. See the documentation for your JVM for details on these settings.
-XX:+UseG1GC: Use the 'G1' garbage collection algorithm. You can tune G1 garbage collection to provide a consistent pause time, which benefits long-term running Java processes such as HBase, NameNode, Solr, and ZooKeeper. For more information about tuning G1, see the Oracle documentation on tuning garbage collection.
-XX:MaxGCPauseMillis=value: The garbage collection pause time. Set this to the maximum amount of latency your cluster can tolerate while allowing as much garbage collection as possible. XX:+ParallelRefProcEnabled Enable or disable parallel reference processing by using a + or - symbol before the parameter name.
-XX:-ResizePLAB: Enable or disable resizing of Promotion Local Allocation Buffers (PLABs) by using a + or - symbol before the parameter name.
-XX:ParallelGCThreads=value: The number of parallel garbage collection threads to run concurrently.
-XX:G1NewSizePercent=value: The percent of the heap to be used for garbage collection. If the value is too low, garbage collection is ineffective. If the value is too high, not enough heap is available for other uses by HBase.