Skip to main content
Feedback

Invoking the concurrent garbage collector

If you are running Java 8 and you use 4GB of memory or more on your runtime, recommends invoking the concurrent garbage collector.

About this task

The default garbage collector for Java 8 is the Parallel Collector. The default garbage collector for Java 11 is G1.

  1. Go to Manage > Runtime Management.

  2. Click the Custom tab.

  3. In the System Properties section, click Add a Property.

  4. In the Property field, type a garbage collector setting that is appropriate for your version of Java.

    Here are some examples of Java 8 garbage collector settings:

    -XX:+UseConcMarkSweepGC
    -XX:CMSInitiatingOccupancyFraction=50
    -XX:-UseGCOverheadLimit

    For details about garbage collector settings, see Java VM Garbage Collection Tuning and Java VM Options (Windows) or Java VM Options (Linux).

  5. For each additional garbage collector setting, repeat steps 3–4.

  6. Click Save.

    Because changes to these properties do not take effect until the runtime is restarted, you are prompted to restart. You have the option to restart now or restart later.

    Only runtime owners can restart them. Accounts that have a basic runtime in a runtime cloud cannot restart the Cloud.

On this Page