Tuning JVM Garbage Collection
- Log in to the Cloudera Manager Admin Console
- Go to .
- Look for entries labeled Memory Overcommit Validation Threshold and note the hostname of the affected host.
- Go to and click on the affected host.
- Click the Resources tab.
- Scroll down to the Memory section.
A list of roles instances and their memory allocations are displayed. The Description column displays the configuration property name where the memory allocation can be set.
- To adjust the memory allocation, search for the configuration property and adjust the value to reduce the overcommitment of memory. You may need to move some roles to other hosts if there is not sufficient memory for the roles running on the host.
- After making any changes, Cloudera Manager will indicate that the service has a stale configuration and prompt you to restart the service.
You may also need to adjust the Java options used to start Java processes. You can add Java startup options using Cloudera Manager configuration properties that are available for all service roles. Cloudera has provided default arguments for some of the services where they are needed. You can add to these, or completely override all of the provided Java options. For more information on configuring G1GC. see The OpenJDK documentation.
If default options are provided, the role configuration specifies a single value, {JAVA_GC_ARGS}. This value is a placeholder for the default Java Garbage Collection options provided with Cloudera Manager and CDH.
- Log in to the Cloudera Manager Admin Console.
- Go to the service where you want to modify the options.
- Select the Configuration tab.
- Enter "Java" in the search box.
- Locate the Java Configuration Options property named for the role you want to modify. For example, in the HDFS service, you will see parameters like Java Configuration Options for DataNode and Java Configuration Options for JournalNode.
- To add to the Java options, enter additional options before or after the {JAVA_GC_ARGS} placeholder, separated by spaces. For example:
{JAVA_GC_ARGS} -XX:MaxPermSize=512M
- To replace the default Java options, delete the {JAVA_GC_ARGS} placeholder and replace it with one or more Java options, separated by spaces.
- The service will now have a stale configuration and must be restarted. See Restarting a Service.
Service and Role | Default Java 8 Options | Default Java 11 Options |
---|---|---|
|
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSParallelRemarkEnabled |
-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled |
|
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSParallelRemarkEnabled |
None, G1GC is enabled by default. |
|
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSParallelRemarkEnabled |
None, G1GC is enabled by default. |
|
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSParallelRemarkEnabled
-verbose:gc -XX:+PrintGCDetails
-XX:+PrintGCDateStamps |
-verbose:gc -Xlog:gc |
|
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSParallelRemarkEnabled |
None, G1GC is enabled by default. |
|
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSParallelRemarkEnabled |
None, G1GC is enabled by default. |
|
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSParallelRemarkEnabled
-Dlibrary.leveldbjni.path={{CMF_CONF_DIR}} |
-Dlibrary.leveldbjni.path={{CMF_CONF_DIR}} |
<< Tuning YARN | ©2016 Cloudera, Inc. All rights reserved | Resource Management >> |
Terms and Conditions Privacy Policy |