blob: 9185aaf2944847dea2c67794a88c06861defb715 [file] [log] [blame]
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="Eclipse OpenJ9 documentation">
<link rel="canonical" href="https://www.eclipse.org/openj9/docs/gc/">
<meta name="lang:clipboard.copy" content="">
<meta name="lang:clipboard.copied" content="">
<meta name="lang:search.language" content="">
<meta name="lang:search.pipeline.stopwords" content="">
<meta name="lang:search.pipeline.trimmer" content="">
<meta name="lang:search.result.none" content="">
<meta name="lang:search.result.one" content="">
<meta name="lang:search.result.other" content="">
<meta name="lang:search.tokenizer" content="">
<link rel="shortcut icon" href="../cr/oj9logo_img9.ico">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.0.4">
<title>Garbage collection - </title>
<link rel="stylesheet" href="../assets/stylesheets/application.1b62728e.css">
<link rel="stylesheet" href="../assets/stylesheets/application-palette.a8b3c06d.css">
<meta name="theme-color" content="#00bcd4">
<script src="../assets/javascripts/modernizr.268332fc.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="../assets/fonts/material-icons.css">
<link rel="stylesheet" href="../stylesheets/oj9.css">
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f (https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore%28j,f) );
})(window,document,'script','dataLayer','GTM-5WLCZXC');</script>
<!-- End Google Tag Manager -->
</head>
<body dir="" data-md-color-primary="cyan" data-md-color-accent="cyan">
<svg class="md-svg">
<defs>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="../#garbage-collection" tabindex="1" class="md-skip">
</a>
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="https://www.eclipse.org/openj9/docs" title=" " class="md-header-nav__button md-logo">
<img src="../cr/openj9_6b.png">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/eclipse/openj9/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
eclipse/openj9
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="https://www.eclipse.org/openj9/docs" title=" " class="md-nav__button md-logo">
<img src="../cr/openj9_6b.png" width="48" height="48">
</a>
</label>
<div class="md-nav__source">
<a href="https://github.com/eclipse/openj9/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
eclipse/openj9
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." title="About the docs" class="md-nav__link">
About the docs
</a>
</li>
<li class="md-nav__item">
<a href="../adoptopenjdk/" title="AdoptOpenJDK builds" class="md-nav__link">
AdoptOpenJDK builds
</a>
</li>
<li class="md-nav__item">
<a href="../introduction/" title="Getting started" class="md-nav__link">
Getting started
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_newuser/" title="New to OpenJ9?" class="md-nav__link">
New to OpenJ9?
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
<label class="md-nav__link" for="nav-5">
Release notes
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-5">
Release notes
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../openj9_releases/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item">
<a href="../version0.23/" title="Version 0.23.0" class="md-nav__link">
Version 0.23.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.22/" title="Version 0.22.0" class="md-nav__link">
Version 0.22.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.21/" title="Version 0.21.0" class="md-nav__link">
Version 0.21.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.20/" title="Version 0.20.0" class="md-nav__link">
Version 0.20.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.19/" title="Version 0.19.0" class="md-nav__link">
Version 0.19.0
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-5-7" type="checkbox" id="nav-5-7">
<label class="md-nav__link" for="nav-5-7">
Earlier releases
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-5-7">
Earlier releases
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../version0.18/" title="Version 0.18.1" class="md-nav__link">
Version 0.18.1
</a>
</li>
<li class="md-nav__item">
<a href="../version0.17/" title="Version 0.17.0" class="md-nav__link">
Version 0.17.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.16/" title="Version 0.16.0" class="md-nav__link">
Version 0.16.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.15/" title="Version 0.15.1" class="md-nav__link">
Version 0.15.1
</a>
</li>
<li class="md-nav__item">
<a href="../version0.14/" title="Version 0.14.0" class="md-nav__link">
Version 0.14.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.13/" title="Version 0.13.0" class="md-nav__link">
Version 0.13.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.12/" title="Version 0.12.0" class="md-nav__link">
Version 0.12.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.11/" title="Version 0.11.0" class="md-nav__link">
Version 0.11.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.10/" title="Version 0.10.0" class="md-nav__link">
Version 0.10.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.9/" title="Version 0.9.0" class="md-nav__link">
Version 0.9.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.8/" title="Version 0.8.0" class="md-nav__link">
Version 0.8.0
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6" checked>
<label class="md-nav__link" for="nav-6">
Memory management
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-6">
Memory management
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../allocator/" title="Memory allocation" class="md-nav__link">
Memory allocation
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
Garbage collection
</label>
<a href="./" title="Garbage collection" class="md-nav__link md-nav__link--active">
Garbage collection
</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">On this page ...</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#the-garbage-collector" class="md-nav__link">
The garbage collector
</a>
</li>
<li class="md-nav__item">
<a href="#garbage-collection-policies" class="md-nav__link">
Garbage collection policies
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#policy-selection-and-tuning" class="md-nav__link">
Policy selection and tuning
</a>
</li>
<li class="md-nav__item">
<a href="#gencon-policy-default" class="md-nav__link">
gencon policy (default)
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#concurrent-scavenge" class="md-nav__link">
Concurrent Scavenge
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#balanced-policy" class="md-nav__link">
balanced policy
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#arraylets-dealing-with-large-arrays" class="md-nav__link">
Arraylets: dealing with large arrays
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#metronome-policy" class="md-nav__link">
metronome policy
</a>
</li>
<li class="md-nav__item">
<a href="#optavgpause-policy" class="md-nav__link">
optavgpause policy
</a>
</li>
<li class="md-nav__item">
<a href="#optthruput-policy" class="md-nav__link">
optthruput policy
</a>
</li>
<li class="md-nav__item">
<a href="#nogc-policy" class="md-nav__link">
nogc policy
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#troubleshooting" class="md-nav__link">
Troubleshooting
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../jit/" title="JIT Compiler" class="md-nav__link">
JIT Compiler
</a>
</li>
<li class="md-nav__item">
<a href="../jitserver/" title="JITServer (tech. preview)" class="md-nav__link">
JITServer (tech. preview)
</a>
</li>
<li class="md-nav__item">
<a href="../aot/" title="AOT Compiler" class="md-nav__link">
AOT Compiler
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10">
<label class="md-nav__link" for="nav-10">
Class data sharing
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-10">
Class data sharing
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../shrc/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item">
<a href="../shrc_diag_util/" title="Diagnostic cache utilities" class="md-nav__link">
Diagnostic cache utilities
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../attachapi/" title="Java Attach API" class="md-nav__link">
Java Attach API
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12" type="checkbox" id="nav-12">
<label class="md-nav__link" for="nav-12">
Diagnostics
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-12">
Diagnostics
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../diag_overview/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12-2" type="checkbox" id="nav-12-2">
<label class="md-nav__link" for="nav-12-2">
Dumps
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-12-2">
Dumps
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../dump_javadump/" title="Java dump" class="md-nav__link">
Java dump
</a>
</li>
<li class="md-nav__item">
<a href="../dump_heapdump/" title="Heap dump" class="md-nav__link">
Heap dump
</a>
</li>
<li class="md-nav__item">
<a href="../dump_systemdump/" title="System dump" class="md-nav__link">
System dump
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12-3" type="checkbox" id="nav-12-3">
<label class="md-nav__link" for="nav-12-3">
Tools
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-12-3">
Tools
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../tool_jextract/" title="Dump extractor" class="md-nav__link">
Dump extractor
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jdmpview/" title="Dump viewer" class="md-nav__link">
Dump viewer
</a>
</li>
<li class="md-nav__item">
<a href="../tool_traceformat/" title="Trace formatter" class="md-nav__link">
Trace formatter
</a>
</li>
<li class="md-nav__item">
<a href="../tool_builder/" title="Option builder" class="md-nav__link">
Option builder
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jcmd/" title="Java command (jcmd) tool" class="md-nav__link">
Java command (jcmd) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jmap/" title="Java memory map (jmap) tool" class="md-nav__link">
Java memory map (jmap) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jps/" title="Java process status (jps)" class="md-nav__link">
Java process status (jps)
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jstack/" title="Java stack (jstack) tool" class="md-nav__link">
Java stack (jstack) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jstat/" title="Java statistics monitoring (jstat) tool" class="md-nav__link">
Java statistics monitoring (jstat) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_migration/" title="Switching to OpenJ9" class="md-nav__link">
Switching to OpenJ9
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12-4" type="checkbox" id="nav-12-4">
<label class="md-nav__link" for="nav-12-4">
Interfaces
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-12-4">
Interfaces
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../interface_jvmti/" title="JVMTI" class="md-nav__link">
JVMTI
</a>
</li>
<li class="md-nav__item">
<a href="../interface_dtfj/" title="DTFJ" class="md-nav__link">
DTFJ
</a>
</li>
<li class="md-nav__item">
<a href="../interface_lang_management/" title="Language Management" class="md-nav__link">
Language Management
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-13" type="checkbox" id="nav-13">
<label class="md-nav__link" for="nav-13">
Command-line options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-13">
Command-line options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../cmdline_specifying/" title="Specifying options" class="md-nav__link">
Specifying options
</a>
</li>
<li class="md-nav__item">
<a href="../cmdline_general/" title="Standard options" class="md-nav__link">
Standard options
</a>
</li>
<li class="md-nav__item">
<a href="../cmdline_migration/" title="Switching to OpenJ9" class="md-nav__link">
Switching to OpenJ9
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-13-4" type="checkbox" id="nav-13-4">
<label class="md-nav__link" for="nav-13-4">
System property options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-13-4">
System property options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../d_jvm_commands/" title="Using System properties" class="md-nav__link">
Using System properties
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenableclasscaching/" title="-Dcom.ibm.enableClassCaching" class="md-nav__link">
-Dcom.ibm.enableClassCaching
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenablelegacydumpsecurity/" title="-Dcom.ibm.enableLegacyDumpSecurity" class="md-nav__link">
-Dcom.ibm.enableLegacyDumpSecurity
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenablelegacylogsecurity/" title="-Dcom.ibm.enableLegacyLogSecurity" class="md-nav__link">
-Dcom.ibm.enableLegacyLogSecurity
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenablelegacytracesecurity/" title="-Dcom.ibm.enableLegacyTraceSecurity" class="md-nav__link">
-Dcom.ibm.enableLegacyTraceSecurity
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmgpudisable/" title="-Dcom.ibm.gpu.disable" class="md-nav__link">
-Dcom.ibm.gpu.disable
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmgpuenable/" title="-Dcom.ibm.gpu.enable" class="md-nav__link">
-Dcom.ibm.gpu.enable
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmgpuverbose/" title="-Dcom.ibm.gpu.verbose" class="md-nav__link">
-Dcom.ibm.gpu.verbose
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmlangmanagementosmxbeaniscputime100ns/" title="-Dcom.ibm.lang.management.OperatingSystemMXBean.isCpuTime100ns" class="md-nav__link">
-Dcom.ibm.lang.management.OperatingSystemMXBean.isCpuTime100ns
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmlangmanagementverbose/" title="-Dcom.ibm.lang.management.verbose" class="md-nav__link">
-Dcom.ibm.lang.management.verbose
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachcommand_timeout/" title="-Dcom.ibm.tools.attach.command_timeout" class="md-nav__link">
-Dcom.ibm.tools.attach.command_timeout
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachdirectory/" title="-Dcom.ibm.tools.attach.directory" class="md-nav__link">
-Dcom.ibm.tools.attach.directory
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachdisplayname/" title="-Dcom.ibm.tools.attach.displayName" class="md-nav__link">
-Dcom.ibm.tools.attach.displayName
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachenable/" title="-Dcom.ibm.tools.attach.enable" class="md-nav__link">
-Dcom.ibm.tools.attach.enable
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachid/" title="-Dcom.ibm.tools.attach.id" class="md-nav__link">
-Dcom.ibm.tools.attach.id
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachlogging/" title="-Dcom.ibm.tools.attach.logging" class="md-nav__link">
-Dcom.ibm.tools.attach.logging
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachlogname/" title="-Dcom.ibm.tools.attach.log.name" class="md-nav__link">
-Dcom.ibm.tools.attach.log.name
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachshutdown_timeout/" title="-Dcom.ibm.tools.attach.shutdown_timeout" class="md-nav__link">
-Dcom.ibm.tools.attach.shutdown_timeout
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachtimeout/" title="-Dcom.ibm.tools.attach.timeout" class="md-nav__link">
-Dcom.ibm.tools.attach.timeout
</a>
</li>
<li class="md-nav__item">
<a href="../dfileencoding/" title="-Dfile.encoding" class="md-nav__link">
-Dfile.encoding
</a>
</li>
<li class="md-nav__item">
<a href="../djavacompiler/" title="-Djava.compiler" class="md-nav__link">
-Djava.compiler
</a>
</li>
<li class="md-nav__item">
<a href="../djavalangstringsubstringnocopy/" title="-Djava.lang.string.substring.nocopy" class="md-nav__link">
-Djava.lang.string.substring.nocopy
</a>
</li>
<li class="md-nav__item">
<a href="../djavalangstringbuffergrowaggressively/" title="-Djava.lang.stringBuffer.growAggressively" class="md-nav__link">
-Djava.lang.stringBuffer.growAggressively
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativecbc/" title="-Djdk.nativeCBC" class="md-nav__link">
-Djdk.nativeCBC
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativechacha20/" title="-Djdk.nativeChaCha20" class="md-nav__link">
-Djdk.nativeChaCha20
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativecrypto/" title="-Djdk.nativeCrypto" class="md-nav__link">
-Djdk.nativeCrypto
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativedigest/" title="-Djdk.nativeDigest" class="md-nav__link">
-Djdk.nativeDigest
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativegcm/" title="-Djdk.nativeGCM" class="md-nav__link">
-Djdk.nativeGCM
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativersa/" title="-Djdk.nativeRSA" class="md-nav__link">
-Djdk.nativeRSA
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-13-5" type="checkbox" id="nav-13-5">
<label class="md-nav__link" for="nav-13-5">
JVM -X options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-13-5">
JVM -X options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../x_jvm_commands/" title="Using -X options" class="md-nav__link">
Using -X options
</a>
</li>
<li class="md-nav__item">
<a href="../x/" title="-X" class="md-nav__link">
-X
</a>
</li>
<li class="md-nav__item">
<a href="../xaggressive/" title="-Xaggressive" class="md-nav__link">
-Xaggressive
</a>
</li>
<li class="md-nav__item">
<a href="../xalwaysclassgc/" title="-Xalwaysclassgc" class="md-nav__link">
-Xalwaysclassgc
</a>
</li>
<li class="md-nav__item">
<a href="../xaot/" title="-Xaot" class="md-nav__link">
-Xaot
</a>
</li>
<li class="md-nav__item">
<a href="../xargencoding/" title="-Xargencoding" class="md-nav__link">
-Xargencoding
</a>
</li>
<li class="md-nav__item">
<a href="../xbootclasspath/" title="-Xbootclasspath" class="md-nav__link">
-Xbootclasspath
</a>
</li>
<li class="md-nav__item">
<a href="../xceehdlr/" title="-XCEEHDLR" class="md-nav__link">
-XCEEHDLR
</a>
</li>
<li class="md-nav__item">
<a href="../xcheck/" title="-Xcheck" class="md-nav__link">
-Xcheck
</a>
</li>
<li class="md-nav__item">
<a href="../xclassgc/" title="-Xclassgc" class="md-nav__link">
-Xclassgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcodecache/" title="-Xcodecache" class="md-nav__link">
-Xcodecache
</a>
</li>
<li class="md-nav__item">
<a href="../xcodecachetotal/" title="-Xcodecachetotal" class="md-nav__link">
-Xcodecachetotal
</a>
</li>
<li class="md-nav__item">
<a href="../xcomp/" title="-Xcomp" class="md-nav__link">
-Xcomp
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactexplicitgc/" title="-Xcompactexplicitgc" class="md-nav__link">
-Xcompactexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactgc/" title="-Xcompactgc" class="md-nav__link">
-Xcompactgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompilationthreads/" title="-XcompilationThreads" class="md-nav__link">
-XcompilationThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xcompressedrefs/" title="-Xcompressedrefs" class="md-nav__link">
-Xcompressedrefs
</a>
</li>
<li class="md-nav__item">
<a href="../xconcurrentbackground/" title="-Xconcurrentbackground" class="md-nav__link">
-Xconcurrentbackground
</a>
</li>
<li class="md-nav__item">
<a href="../xconcurrentlevel/" title="-Xconcurrentlevel" class="md-nav__link">
-Xconcurrentlevel
</a>
</li>
<li class="md-nav__item">
<a href="../xconcurrentslack/" title="-Xconcurrentslack" class="md-nav__link">
-Xconcurrentslack
</a>
</li>
<li class="md-nav__item">
<a href="../xconmeter/" title="-Xconmeter" class="md-nav__link">
-Xconmeter
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexcessivegc/" title="-Xdisableexcessivegc" class="md-nav__link">
-Xdisableexcessivegc
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexplicitgc/" title="-Xdisableexplicitgc" class="md-nav__link">
-Xdisableexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xdisablejavadump/" title="-Xdisablejavadump" class="md-nav__link">
-Xdisablejavadump
</a>
</li>
<li class="md-nav__item">
<a href="../xenablestringconstantgc/" title="-Xdisablestringconstantgc" class="md-nav__link">
-Xdisablestringconstantgc
</a>
</li>
<li class="md-nav__item">
<a href="../xdump/" title="-Xdump" class="md-nav__link">
-Xdump
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexcessivegc/" title="-Xenableexcessivegc" class="md-nav__link">
-Xenableexcessivegc
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexplicitgc/" title="-Xenableexplicitgc" class="md-nav__link">
-Xenableexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xenablestringconstantgc/" title="-Xenablestringconstantgc" class="md-nav__link">
-Xenablestringconstantgc
</a>
</li>
<li class="md-nav__item">
<a href="../xfastresolve/" title="-Xfastresolve" class="md-nav__link">
-Xfastresolve
</a>
</li>
<li class="md-nav__item">
<a href="../xfuture/" title="-Xfuture" class="md-nav__link">
-Xfuture
</a>
</li>
<li class="md-nav__item">
<a href="../xgc/" title="-Xgc" class="md-nav__link">
-Xgc
</a>
</li>
<li class="md-nav__item">
<a href="../xgcsplitheap/" title="-Xgc:splitheap" class="md-nav__link">
-Xgc:splitheap
</a>
</li>
<li class="md-nav__item">
<a href="../xgcpolicy/" title="-Xgcpolicy" class="md-nav__link">
-Xgcpolicy
</a>
</li>
<li class="md-nav__item">
<a href="../xgcthreads/" title="-Xgcthreads" class="md-nav__link">
-Xgcthreads
</a>
</li>
<li class="md-nav__item">
<a href="../xgcworkpackets/" title="-Xgcworkpackets" class="md-nav__link">
-Xgcworkpackets
</a>
</li>
<li class="md-nav__item">
<a href="../xint/" title="-Xint" class="md-nav__link">
-Xint
</a>
</li>
<li class="md-nav__item">
<a href="../xss/" title="-Xiss" class="md-nav__link">
-Xiss
</a>
</li>
<li class="md-nav__item">
<a href="../xjit/" title="-Xjit" class="md-nav__link">
-Xjit
</a>
</li>
<li class="md-nav__item">
<a href="../xjni/" title="-Xjni" class="md-nav__link">
-Xjni
</a>
</li>
<li class="md-nav__item">
<a href="../xlinenumbers/" title="-Xlinenumbers" class="md-nav__link">
-Xlinenumbers
</a>
</li>
<li class="md-nav__item">
<a href="../xloa/" title="-Xloa" class="md-nav__link">
-Xloa
</a>
</li>
<li class="md-nav__item">
<a href="../xloaminimum/" title="-Xloainitial" class="md-nav__link">
-Xloainitial
</a>
</li>
<li class="md-nav__item">
<a href="../xloaminimum/" title="-Xloamaximum" class="md-nav__link">
-Xloamaximum
</a>
</li>
<li class="md-nav__item">
<a href="../xloaminimum/" title="-Xloaminimum" class="md-nav__link">
-Xloaminimum
</a>
</li>
<li class="md-nav__item">
<a href="../xlockreservation/" title="-XlockReservation" class="md-nav__link">
-XlockReservation
</a>
</li>
<li class="md-nav__item">
<a href="../xlockword/" title="-Xlockword" class="md-nav__link">
-Xlockword
</a>
</li>
<li class="md-nav__item">
<a href="../xlog/" title="-Xlog" class="md-nav__link">
-Xlog
</a>
</li>
<li class="md-nav__item">
<a href="../xlp/" title="-Xlp" class="md-nav__link">
-Xlp
</a>
</li>
<li class="md-nav__item">
<a href="../xlpcodecache/" title="-Xlp:codecache" class="md-nav__link">
-Xlp:codecache
</a>
</li>
<li class="md-nav__item">
<a href="../xlpobjectheap/" title="-Xlp:objectheap" class="md-nav__link">
-Xlp:objectheap
</a>
</li>
<li class="md-nav__item">
<a href="../xmine/" title="-Xmaxe" class="md-nav__link">
-Xmaxe
</a>
</li>
<li class="md-nav__item">
<a href="../xminf/" title="-Xmaxf" class="md-nav__link">
-Xmaxf
</a>
</li>
<li class="md-nav__item">
<a href="../xmint/" title="-Xmaxt" class="md-nav__link">
-Xmaxt
</a>
</li>
<li class="md-nav__item">
<a href="../xmca/" title="-Xmca" class="md-nav__link">
-Xmca
</a>
</li>
<li class="md-nav__item">
<a href="../xmca/" title="-Xmco" class="md-nav__link">
-Xmco
</a>
</li>
<li class="md-nav__item">
<a href="../xmcrs/" title="-Xmcrs" class="md-nav__link">
-Xmcrs
</a>
</li>
<li class="md-nav__item">
<a href="../xmine/" title="-Xmine" class="md-nav__link">
-Xmine
</a>
</li>
<li class="md-nav__item">
<a href="../xminf/" title="-Xminf" class="md-nav__link">
-Xminf
</a>
</li>
<li class="md-nav__item">
<a href="../xmint/" title="-Xmint" class="md-nav__link">
-Xmint
</a>
</li>
<li class="md-nav__item">
<a href="../xmn/" title="-Xmn" class="md-nav__link">
-Xmn
</a>
</li>
<li class="md-nav__item">
<a href="../xmn/" title="-Xmns" class="md-nav__link">
-Xmns
</a>
</li>
<li class="md-nav__item">
<a href="../xmn/" title="-Xmnx" class="md-nav__link">
-Xmnx
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmo" class="md-nav__link">
-Xmo
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmoi" class="md-nav__link">
-Xmoi
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmos" class="md-nav__link">
-Xmos
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmox" class="md-nav__link">
-Xmox
</a>
</li>
<li class="md-nav__item">
<a href="../xmr/" title="-Xmr" class="md-nav__link">
-Xmr
</a>
</li>
<li class="md-nav__item">
<a href="../xmr/" title="-Xmrx" class="md-nav__link">
-Xmrx
</a>
</li>
<li class="md-nav__item">
<a href="../xms/" title="-Xms" class="md-nav__link">
-Xms
</a>
</li>
<li class="md-nav__item">
<a href="../xmso/" title="-Xmso" class="md-nav__link">
-Xmso
</a>
</li>
<li class="md-nav__item">
<a href="../xms/" title="-Xmx" class="md-nav__link">
-Xmx
</a>
</li>
<li class="md-nav__item">
<a href="../xaot/" title="-Xnoaot" class="md-nav__link">
-Xnoaot
</a>
</li>
<li class="md-nav__item">
<a href="../xclassgc/" title="-Xnoclassgc" class="md-nav__link">
-Xnoclassgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactexplicitgc/" title="-Xnocompactexplicitgc" class="md-nav__link">
-Xnocompactexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactgc/" title="-Xnocompactgc" class="md-nav__link">
-Xnocompactgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompressedrefs/" title="-Xnocompressedrefs" class="md-nav__link">
-Xnocompressedrefs
</a>
</li>
<li class="md-nav__item">
<a href="../xjit/" title="-Xnojit" class="md-nav__link">
-Xnojit
</a>
</li>
<li class="md-nav__item">
<a href="../xlinenumbers/" title="-Xnolinenumbers" class="md-nav__link">
-Xnolinenumbers
</a>
</li>
<li class="md-nav__item">
<a href="../xloa/" title="-Xnoloa" class="md-nav__link">
-Xnoloa
</a>
</li>
<li class="md-nav__item">
<a href="../xsigcatch/" title="-Xnosigcatch" class="md-nav__link">
-Xnosigcatch
</a>
</li>
<li class="md-nav__item">
<a href="../xsigchain/" title="-Xnosigchain" class="md-nav__link">
-Xnosigchain
</a>
</li>
<li class="md-nav__item">
<a href="../xnumanone/" title="-Xnuma:none" class="md-nav__link">
-Xnuma:none
</a>
</li>
<li class="md-nav__item">
<a href="../xoptionsfile/" title="-Xoptionsfile" class="md-nav__link">
-Xoptionsfile
</a>
</li>
<li class="md-nav__item">
<a href="../xquickstart/" title="-Xquickstart" class="md-nav__link">
-Xquickstart
</a>
</li>
<li class="md-nav__item">
<a href="../xrs/" title="-Xrs" class="md-nav__link">
-Xrs
</a>
</li>
<li class="md-nav__item">
<a href="../xsamplingexpirationtime/" title="-XsamplingExpirationTime" class="md-nav__link">
-XsamplingExpirationTime
</a>
</li>
<li class="md-nav__item">
<a href="../xscdmx/" title="-Xscdmx" class="md-nav__link">
-Xscdmx
</a>
</li>
<li class="md-nav__item">
<a href="../xscminaot/" title="-Xscmaxaot" class="md-nav__link">
-Xscmaxaot
</a>
</li>
<li class="md-nav__item">
<a href="../xscminjitdata/" title="-Xscmaxjitdata" class="md-nav__link">
-Xscmaxjitdata
</a>
</li>
<li class="md-nav__item">
<a href="../xscminaot/" title="-Xscminaot" class="md-nav__link">
-Xscminaot
</a>
</li>
<li class="md-nav__item">
<a href="../xscminjitdata/" title="-Xscminjitdata" class="md-nav__link">
-Xscminjitdata
</a>
</li>
<li class="md-nav__item">
<a href="../xscmx/" title="-Xscmx" class="md-nav__link">
-Xscmx
</a>
</li>
<li class="md-nav__item">
<a href="../xshareclasses/" title="-Xshareclasses" class="md-nav__link">
-Xshareclasses
</a>
</li>
<li class="md-nav__item">
<a href="../xsigcatch/" title="-Xsigcatch" class="md-nav__link">
-Xsigcatch
</a>
</li>
<li class="md-nav__item">
<a href="../xsigchain/" title="-Xsigchain" class="md-nav__link">
-Xsigchain
</a>
</li>
<li class="md-nav__item">
<a href="../xsignal/" title="-Xsignal" class="md-nav__link">
-Xsignal
</a>
</li>
<li class="md-nav__item">
<a href="../xsoftmx/" title="-Xsoftmx" class="md-nav__link">
-Xsoftmx
</a>
</li>
<li class="md-nav__item">
<a href="../xsoftrefthreshold/" title="-Xsoftrefthreshold" class="md-nav__link">
-Xsoftrefthreshold
</a>
</li>
<li class="md-nav__item">
<a href="../xss/" title="-Xss" class="md-nav__link">
-Xss
</a>
</li>
<li class="md-nav__item">
<a href="../xss/" title="-Xssi" class="md-nav__link">
-Xssi
</a>
</li>
<li class="md-nav__item">
<a href="../xtgc/" title="-Xtgc" class="md-nav__link">
-Xtgc
</a>
</li>
<li class="md-nav__item">
<a href="../xthr/" title="-Xthr" class="md-nav__link">
-Xthr
</a>
</li>
<li class="md-nav__item">
<a href="../xtlhprefetch/" title="-XtlhPrefetch" class="md-nav__link">
-XtlhPrefetch
</a>
</li>
<li class="md-nav__item">
<a href="../xtrace/" title="-Xtrace" class="md-nav__link">
-Xtrace
</a>
</li>
<li class="md-nav__item">
<a href="../xtunevirtualized/" title="-Xtune:virtualized" class="md-nav__link">
-Xtune:virtualized
</a>
</li>
<li class="md-nav__item">
<a href="../xverbosegclog/" title="-Xverbosegclog" class="md-nav__link">
-Xverbosegclog
</a>
</li>
<li class="md-nav__item">
<a href="../xverify/" title="-Xverify" class="md-nav__link">
-Xverify
</a>
</li>
<li class="md-nav__item">
<a href="../xzero/" title="-Xzero" class="md-nav__link">
-Xzero
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-13-6" type="checkbox" id="nav-13-6">
<label class="md-nav__link" for="nav-13-6">
JVM -XX options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-13-6">
JVM -XX options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../xx_jvm_commands/" title="Using -XX options" class="md-nav__link">
Using -XX options
</a>
</li>
<li class="md-nav__item">
<a href="../xxactiveprocessorcount/" title="-XXActiveProcessorCount" class="md-nav__link">
-XXActiveProcessorCount
</a>
</li>
<li class="md-nav__item">
<a href="../xxallowvmshutdown/" title="-XXallowvmshutdown" class="md-nav__link">
-XXallowvmshutdown
</a>
</li>
<li class="md-nav__item">
<a href="../xxalwayspretouch/" title="-XX:[+|-]AlwaysPreTouch" class="md-nav__link">
-XX:[+|-]AlwaysPreTouch
</a>
</li>
<li class="md-nav__item">
<a href="../xxclassrelationshipverifier/" title="-XX:[+|-]ClassRelationshipVerifier" class="md-nav__link">
-XX:[+|-]ClassRelationshipVerifier
</a>
</li>
<li class="md-nav__item">
<a href="../xxconcgcthreads/" title="-XX:ConcGCThreads" class="md-nav__link">
-XX:ConcGCThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xxcodecachetotal/" title="-XX:codecachetotal" class="md-nav__link">
-XX:codecachetotal
</a>
</li>
<li class="md-nav__item">
<a href="../xxcompactstrings/" title="-XX:[+|-]CompactStrings" class="md-nav__link">
-XX:[+|-]CompactStrings
</a>
</li>
<li class="md-nav__item">
<a href="../xxdisableexplicitgc/" title="-XX:[+|-]DisableExplicitGC" class="md-nav__link">
-XX:[+|-]DisableExplicitGC
</a>
</li>
<li class="md-nav__item">
<a href="../xxdisclaimjitscratch/" title="-XX:[+|-]DisclaimJitScratch" class="md-nav__link">
-XX:[+|-]DisclaimJitScratch
</a>
</li>
<li class="md-nav__item">
<a href="../xxenablecpumonitor/" title="-XX:[+|-]EnableCPUMonitor" class="md-nav__link">
-XX:[+|-]EnableCPUMonitor
</a>
</li>
<li class="md-nav__item">
<a href="../xxexitonoutofmemoryerror/" title="-XX:[+|-]ExitOnOutOfMemoryError" class="md-nav__link">
-XX:[+|-]ExitOnOutOfMemoryError
</a>
</li>
<li class="md-nav__item">
<a href="../xxgloballockreservation/" title="-XX:[+|-]GlobalLockReservation" class="md-nav__link">
-XX:[+|-]GlobalLockReservation
</a>
</li>
<li class="md-nav__item">
<a href="../xxhandlesigxfsz/" title="-XX:[+|-]HandleSIGXFSZ" class="md-nav__link">
-XX:[+|-]HandleSIGXFSZ
</a>
</li>
<li class="md-nav__item">
<a href="../xxhandlesigabrt/" title="-XX:[+|-]HandleSIGABRT" class="md-nav__link">
-XX:[+|-]HandleSIGABRT
</a>
</li>
<li class="md-nav__item">
<a href="../xxheapdumponoutofmemory/" title="-XX:[+|-]HeapDumpOnOutOfMemory" class="md-nav__link">
-XX:[+|-]HeapDumpOnOutOfMemory
</a>
</li>
<li class="md-nav__item">
<a href="../xxheapdumppath/" title="-XX:HeapDumpPath" class="md-nav__link">
-XX:HeapDumpPath
</a>
</li>
<li class="md-nav__item">
<a href="../xxheapmanagementmxbeancompatibility/" title="-XX:[+|-]HeapManagementMXBeanCompatibility" class="md-nav__link">
-XX:[+|-]HeapManagementMXBeanCompatibility
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuningcompactonidle/" title="-XX:[+|-]IdleTuningCompactOnIdle" class="md-nav__link">
-XX:[+|-]IdleTuningCompactOnIdle
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuninggconidle/" title="-XX:[+|-]IdleTuningGcOnIdle" class="md-nav__link">
-XX:[+|-]IdleTuningGcOnIdle
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuningminfreeheaponidle/" title="-XX:IdleTuningMinFreeHeapOnIdle" class="md-nav__link">
-XX:IdleTuningMinFreeHeapOnIdle
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuningminidlewaittime/" title="-XX:IdleTuningMinIdleWaitTime" class="md-nav__link">
-XX:IdleTuningMinIdleWaitTime
</a>
</li>
<li class="md-nav__item">
<a href="../xxignoreunrecognizedvmoptions/" title="-XX:[+|-]IgnoreUnrecognizedVMOptions" class="md-nav__link">
-XX:[+|-]IgnoreUnrecognizedVMOptions
</a>
</li>
<li class="md-nav__item">
<a href="../xxignoreunrecognizedxxcolonoptions/" title="-XX:[+|-]IgnoreUnrecognizedXXColonOptions" class="md-nav__link">
-XX:[+|-]IgnoreUnrecognizedXXColonOptions
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialrampercentage/" title="-XX:InitialRAMPercentage" class="md-nav__link">
-XX:InitialRAMPercentage
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialheapsize/" title="-XX:InitialHeapSize" class="md-nav__link">
-XX:InitialHeapSize
</a>
</li>
<li class="md-nav__item">
<a href="../xxinterleavememory/" title="-XX:[+|-]InterleaveMemory" class="md-nav__link">
-XX:[+|-]InterleaveMemory
</a>
</li>
<li class="md-nav__item">
<a href="../xxjitinlinewatches/" title="-XX:[+|-]JITInlineWatches" class="md-nav__link">
-XX:[+|-]JITInlineWatches
</a>
</li>
<li class="md-nav__item">
<a href="../xxlazysymbolresolution/" title="-XX:[+|-]LazySymbolResolution" class="md-nav__link">
-XX:[+|-]LazySymbolResolution
</a>
</li>
<li class="md-nav__item">
<a href="../xxmaxdirectmemorysize/" title="-XX:MaxDirectMemorySize" class="md-nav__link">
-XX:MaxDirectMemorySize
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialheapsize/" title="-XX:MaxHeapSize" class="md-nav__link">
-XX:MaxHeapSize
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialrampercentage/" title="-XX:MaxRAMPercentage" class="md-nav__link">
-XX:MaxRAMPercentage
</a>
</li>
<li class="md-nav__item">
<a href="../xxonoutofmemoryerror/" title="-XX:OnOutOfMemoryError" class="md-nav__link">
-XX:OnOutOfMemoryError
</a>
</li>
<li class="md-nav__item">
<a href="../xxoriginaljdk8heapsizecompatibilitymode/" title="-XX:[+|-]OriginalJDK8HeapSizeCompatibilityMode" class="md-nav__link">
-XX:[+|-]OriginalJDK8HeapSizeCompatibilityMode
</a>
</li>
<li class="md-nav__item">
<a href="../xxnosuballoc32bitmem/" title="-XXnosuballoc32bitmem" class="md-nav__link">
-XXnosuballoc32bitmem
</a>
</li>
<li class="md-nav__item">
<a href="../xxpagealigndirectmemory/" title="-XX:[+|-]PageAlignDirectMemory" class="md-nav__link">
-XX:[+|-]PageAlignDirectMemory
</a>
</li>
<li class="md-nav__item">
<a href="../xxparallelcmsthreads/" title="-XX:ParallelCMSThreads" class="md-nav__link">
-XX:ParallelCMSThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xxparallelgcthreads/" title="-XX:ParallelGCThreads" class="md-nav__link">
-XX:ParallelGCThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xxportablesharedcache/" title="-XX:[+|-]PortableSharedCache" class="md-nav__link">
-XX:[+|-]PortableSharedCache
</a>
</li>
<li class="md-nav__item">
<a href="../xxpositiveidentityhash/" title="-XX:[+|-]PositiveIdentityHash" class="md-nav__link">
-XX:[+|-]PositiveIdentityHash
</a>
</li>
<li class="md-nav__item">
<a href="../xxprintcodecache/" title="-XX:[+|-]PrintCodeCache" class="md-nav__link">
-XX:[+|-]PrintCodeCache
</a>
</li>
<li class="md-nav__item">
<a href="../xxprintflagsfinal/" title="-XX:[+|-]PrintFlagsFinal" class="md-nav__link">
-XX:[+|-]PrintFlagsFinal
</a>
</li>
<li class="md-nav__item">
<a href="../xxreadipinfoforras/" title="-XX:[+|-]ReadIPInfoForRAS" class="md-nav__link">
-XX:[+|-]ReadIPInfoForRAS
</a>
</li>
<li class="md-nav__item">
<a href="../xxreducecpumonitoroverhead/" title="-XX:[+|-]ReduceCPUMonitorOverhead" class="md-nav__link">
-XX:[+|-]ReduceCPUMonitorOverhead
</a>
</li>
<li class="md-nav__item">
<a href="../xxruntimeinstrumentation/" title="-XX:[+|-]RuntimeInstrumentation" class="md-nav__link">
-XX:[+|-]RuntimeInstrumentation
</a>
</li>
<li class="md-nav__item">
<a href="../xxsethwprefetch/" title="-XXsetHWPrefetch" class="md-nav__link">
-XXsetHWPrefetch
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareanonymousclasses/" title="-XX:[+|-]ShareAnonymousClasses" class="md-nav__link">
-XX:[+|-]ShareAnonymousClasses
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareclassesenablebci/" title="-XX:ShareClassesDisableBCI" class="md-nav__link">
-XX:ShareClassesDisableBCI
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareclassesenablebci/" title="-XX:ShareClassesEnableBCI" class="md-nav__link">
-XX:ShareClassesEnableBCI
</a>
</li>
<li class="md-nav__item">
<a href="../xxsharedcachehardlimit/" title="-XX:SharedCacheHardLimit" class="md-nav__link">
-XX:SharedCacheHardLimit
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareunsafeclasses/" title="-XX:[+|-]ShareUnsafeClasses" class="md-nav__link">
-XX:[+|-]ShareUnsafeClasses
</a>
</li>
<li class="md-nav__item">
<a href="../xxstacktraceinthrowable/" title="-XX:-StackTraceInThrowable" class="md-nav__link">
-XX:-StackTraceInThrowable
</a>
</li>
<li class="md-nav__item">
<a href="../xxtransparenthugepage/" title="-XX:[+|-]TransparentHugePage" class="md-nav__link">
-XX:[+|-]TransparentHugePage
</a>
</li>
<li class="md-nav__item">
<a href="../xxusecompressedoops/" title="-XX:[+|-]UseCompressedOops" class="md-nav__link">
-XX:[+|-]UseCompressedOops
</a>
</li>
<li class="md-nav__item">
<a href="../xxusecontainersupport/" title="-XX:[+|-]UseContainerSupport" class="md-nav__link">
-XX:[+|-]UseContainerSupport
</a>
</li>
<li class="md-nav__item">
<a href="../xxusegcstartuphints/" title="-XX:[+|-]UseGCStartupHints" class="md-nav__link">
-XX:[+|-]UseGCStartupHints
</a>
</li>
<li class="md-nav__item">
<a href="../xxusenogc/" title="-XX:[+|-]UseNoGC" class="md-nav__link">
-XX:[+|-]UseNoGC
</a>
</li>
<li class="md-nav__item">
<a href="../xxverboseverification/" title="-XX:[+|-]VerboseVerification" class="md-nav__link">
-XX:[+|-]VerboseVerification
</a>
</li>
<li class="md-nav__item">
<a href="../xxvmlockclassloader/" title="-XX:[+|-]VMLockClassLoader" class="md-nav__link">
-XX:[+|-]VMLockClassLoader
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-14" type="checkbox" id="nav-14">
<label class="md-nav__link" for="nav-14">
Reference
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-14">
Reference
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../openj9_support/" title="Supported environments" class="md-nav__link">
Supported environments
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_defaults/" title="Default settings" class="md-nav__link">
Default settings
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_signals/" title="Signal handling" class="md-nav__link">
Signal handling
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_directories/" title="Directory conventions" class="md-nav__link">
Directory conventions
</a>
</li>
<li class="md-nav__item">
<a href="../messages_intro/" title="OpenJ9 messages" class="md-nav__link">
OpenJ9 messages
</a>
</li>
<li class="md-nav__item">
<a href="../env_var/" title="Environment variables" class="md-nav__link">
Environment variables
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-15" type="checkbox" id="nav-15">
<label class="md-nav__link" for="nav-15">
API documentation
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-15">
API documentation
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../api-overview/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-15-2" type="checkbox" id="nav-15-2">
<label class="md-nav__link" for="nav-15-2">
Java 8 API
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-15-2">
Java 8 API
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../api-conditionhandling/" title="Condition exception handling" class="md-nav__link">
Condition exception handling
</a>
</li>
<li class="md-nav__item">
<a href="../api-cuda/" title="CUDA4J" class="md-nav__link">
CUDA4J
</a>
</li>
<li class="md-nav__item">
<a href="../api-daa/" title="Data access acceleration" class="md-nav__link">
Data access acceleration
</a>
</li>
<li class="md-nav__item">
<a href="../api-dtfj/" title="DTFJ" class="md-nav__link">
DTFJ
</a>
</li>
<li class="md-nav__item">
<a href="../api-gpu/" title="GPU" class="md-nav__link">
GPU
</a>
</li>
<li class="md-nav__item">
<a href="../api-jvm/" title="JVM diagnostic utilities" class="md-nav__link">
JVM diagnostic utilities
</a>
</li>
<li class="md-nav__item">
<a href="../api-langmgmt/" title="Monitoring and management" class="md-nav__link">
Monitoring and management
</a>
</li>
<li class="md-nav__item">
<a href="../api-shrc/" title="Shared classes" class="md-nav__link">
Shared classes
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../api-jdk11/" title="Java 11 API" class="md-nav__link">
Java 11 API
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../legal/" title="Legal" class="md-nav__link">
Legal
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">On this page ...</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#the-garbage-collector" class="md-nav__link">
The garbage collector
</a>
</li>
<li class="md-nav__item">
<a href="#garbage-collection-policies" class="md-nav__link">
Garbage collection policies
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#policy-selection-and-tuning" class="md-nav__link">
Policy selection and tuning
</a>
</li>
<li class="md-nav__item">
<a href="#gencon-policy-default" class="md-nav__link">
gencon policy (default)
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#concurrent-scavenge" class="md-nav__link">
Concurrent Scavenge
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#balanced-policy" class="md-nav__link">
balanced policy
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#arraylets-dealing-with-large-arrays" class="md-nav__link">
Arraylets: dealing with large arrays
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#metronome-policy" class="md-nav__link">
metronome policy
</a>
</li>
<li class="md-nav__item">
<a href="#optavgpause-policy" class="md-nav__link">
optavgpause policy
</a>
</li>
<li class="md-nav__item">
<a href="#optthruput-policy" class="md-nav__link">
optthruput policy
</a>
</li>
<li class="md-nav__item">
<a href="#nogc-policy" class="md-nav__link">
nogc policy
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#troubleshooting" class="md-nav__link">
Troubleshooting
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<!-- this adds 'pencil' icon to H1 so that you can edit the page directly in GitHub
<a href="https://github.com/eclipse/openj9/edit/master/docs/gc.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
-->
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<h1 id="garbage-collection">Garbage collection</h1>
<p>The process of managing memory in the VM is handled by the Allocator and the Garbage Collector (GC). These components operate on an area of memory that is reserved for VM processing called the Java heap. </p>
<p>The Allocator assigns areas of the Java heap for Java objects. See <a href="../allocator/">Memory allocation</a> for more information about the Allocator.</p>
<h2 id="the-garbage-collector">The garbage collector</h2>
<p>To prevent applications running out of memory, objects in the Java heap that are no longer required must be reclaimed. This process is known as garbage collection. When garbage is collected, the garbage collector must obtain exclusive access to the heap, which causes an application to pause while the clean up is done. This pause is often referred to as a <em>stop-the-world</em> pause because an application must halt until the process completes. In general, the first step in the GC process is to mark the objects that are reachable, which means they are still in use. The next step is to sweep away the unmarked objects to reclaim memory. The last step, which isn't always required unless the heap has become very fragmented, is to compact the heap.</p>
<h2 id="garbage-collection-policies">Garbage collection policies</h2>
<p>OpenJ9 provides several different GC policies, each one specialized for operation with a specific heap configuration and one or more collectors. These policies are summarized in the followng table. Follow the links to read more about individual policies:</p>
<table>
<thead>
<tr>
<th>GC Policy</th>
<th>Heap Configuration</th>
<th>Collectors</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#gencon-policy-default"><code>gencon</code></a> (default)</td>
<td>Generational (nursery/tenure)</td>
<td>Scavenger, Concurrent Mark, Global</td>
</tr>
<tr>
<td><a href="#balanced-policy"><code>balanced</code></a></td>
<td>Generational (multiple regions)</td>
<td>Incremental Generational</td>
</tr>
<tr>
<td><a href="#metronome-policy"><code>metronome</code></a></td>
<td>Segregated</td>
<td>Realtime</td>
</tr>
<tr>
<td><a href="#optavgpause-policy"><code>optavgpause</code></a></td>
<td>Flat</td>
<td>Concurrent Mark, Global</td>
</tr>
<tr>
<td><a href="#optthruput-policy"><code>optthruput</code></a></td>
<td>Flat</td>
<td>Global</td>
</tr>
<tr>
<td><a href="#nogc-policy"><code>nogc</code></a></td>
<td>--</td>
<td>--</td>
</tr>
</tbody>
</table>
<p>All OpenJ9 GC policies support compressed references on 64-bit platforms, which compresses heap pointers to 32 bits if the total heap size does not exceed 63 GB. Applications that require more heap space can forgo compressed pointers and select any heap size within the bounds imposed by the operating system and available system RAM.</p>
<p>OpenJ9 Java applications can determine the initial and maximum sizes of the heap for any policy by using the <a href="../xms/"><code>-Xms</code></a> and <a href="../xms/"><code>-Xmx</code></a> command line options to set the initial and maximum heap extent.</p>
<h3 id="policy-selection-and-tuning">Policy selection and tuning</h3>
<p>The selection of an appropriate GC policy and tuning the heap is primarily guided by the application dynamics and observation of how the application interacts with the heap during startup and at steady state. To help with this, all OpenJ9 GC policies are instrumented to collect a wide range of GC-related metric data for reporting in a GC log.</p>
<p>To enable GC logging for the OpenJ9 Java runtime, include the <code>-verbose:gc</code> command line option. (See <a href="../cmdline_general/">Standard command-line options</a>.) The instrumented metric data can then be interactively visualized when the GC log is loaded into the <a href="https://marketplace.eclipse.org/content/ibm-monitoring-and-diagnostic-tools-garbage-collection-and-memory-visualizer-gcmv">Garbage Collector and Memory Visualizer (GCMV) plugin for Eclipse</a>. OpenJ9 Java GC logs can also be analyzed by some online services, such as <a href="https://gceasy.io/">GCEasy</a>.</p>
<h3 id="gencon-policy-default"><code>gencon</code> policy (default)</h3>
<p>The Generational Concurrent GC policy (<a href="../xgcpolicy/#gencon"><code>-Xgcpolicy:gencon</code></a>) is probably best suited if you have a transactional application, with many short lived objects. This policy aims to minimize GC pause times without compromising throughput. This is the default policy employed by the VM, so if you want to use it you don't need to specify it on the command line when you start your application.</p>
<p>With the <code>gencon</code> policy, the Java heap is divided into two main areas, the <em>nursery</em> area, where new objects are created and the <em>tenure</em> area, where objects are moved if they have reached <em>tenure age</em>.</p>
<p>The <em>nursery</em> area is subdivided into two further areas, the <em>allocate</em> space and the <em>survivor</em> space. The GC process is illustrated in the following diagram, which shows a sequence of 4 main events:</p>
<p><img alt="The diagram is explained in the surrounding text" src="../cr/gencon_java_heap.jpg" title="Object allocation" /></p>
<ol>
<li>Objects are created in the <em>allocate</em> space.</li>
<li>The <em>allocate</em> space is full.</li>
<li>A local GC scavenge process runs and reachable objects are either copied into the <em>survivor</em> space or into the <em>tenure</em> area if they have reached <em>tenure age</em>. Any objects that can't be reached are left untouched and subsequently cleared.</li>
<li>The <em>allocate</em> and <em>survivor</em> spaces swap roles. The original <em>survivor</em> space becomes the <em>allocate</em> space where new objects are created, and the original <em>allocate</em> space becomes the <em>survivor</em> space ready for the next local GC scavenge process.</li>
</ol>
<p>The relative sizes of the <em>allocate</em> and <em>survivor</em> spaces are dynamically adjusted by a technique called <em>tilting</em>. When the <em>nursery</em> area is first created, it is evenly divided between the <em>allocate</em> and <em>survivor</em> spaces. If, after a GC scavenge process is run, the amount of space required for the <em>survivor</em> area is comparatively small, the boundary between the two spaces is adjusted by <em>tilting</em>. For example, if the <em>survivor</em> space requires only 10% of the <em>nursery</em> area, the <em>tilt ratio</em> is adjusted to give 90% of the <em>nursery</em> area to the <em>allocate</em> space. With more space available for new objects, garbage collection can be delayed.</p>
<p>The <em>tenure age</em> of an object is determined by the VM and reflects the number of times that an object has been copied between the <em>allocate</em> space and the <em>survivor</em> space. The age is in the range 1 - 14 and is adjusted dynamically by the VM depending on the overall amount of space that is used in the <em>nursery area</em>. For example, if an object has a tenure age of 5, it has been copied backwards and forwards between <em>allocate</em> and <em>survivor</em> spaces 5 times. If the VM sets a <em>tenure age</em> of 5 based on the percentage of space remaining in the <em>nursery</em> area, the next scavenge moves the object from the <em>nursery</em> to the <em>tenure</em> area. You can set an initial <em>tenure age</em> with the <a href="../xgc/#scvtenureage"><code>-Xgc:scvTenureAge</code></a> option. You can also prevent the VM dynamically adjusting the <em>tenure age</em> by setting the <a href="../xgc/#scvnoadaptivetenure"><code>Xgc:scvNoAdaptiveTenure</code></a> option so that the intial age is maintained throughout the run time of the VM.</p>
<p>Within the <em>tenure</em> area, new objects are allocated into the small object area (SOA), which is illustrated in the earlier diagram (see 3.). A large object area (LOA) is set aside for objects greater than 64 KB that cannot be allocated into the SOA to minimize fragmentation. The LOA is allocated by default but is reduced and removed after a few GC cycles if it isn't populated. To prevent the creation of an LOA, you can specify the <a href="../xloa/"><code>-Xnoloa</code></a> option on the command line when you start your application. When the <em>tenure</em> area is close to full a global GC is triggered.</p>
<p>The local GC scavenge reduces pause times by freqently reclaiming memory in the <em>nursery</em> area which, for a transactional application with many short-lived objects, has the most recyclable space. However, over time the <em>tenure</em> area might become full. So, whilst a local GC scavenge process is operating on the <em>nursery</em> area, a concurrent global GC process also runs alongside normal program execution to mark and remove unreachable objects from the <em>tenure</em> area. These two GC approaches combine to provide a good trade-off between shorter pause times and consistent throughput.</p>
<h4 id="concurrent-scavenge">Concurrent Scavenge</h4>
<p>A special mode of the <code>gencon</code> policy is known as <em>Concurrent Scavenge</em>, which aims to minimize the time spent in stop-the-world pauses by collecting nursery garbage in parallel with running application threads. To enable Concurrent Scavenge, see <a href="../xgc/#concurrentscavenge">-Xgc:concurrentScavenge</a>.</p>
<p>This mode can be enabled with hardware-based support and software-based support: </p>
<ul>
<li>
<p><strong>Hardware-based support: (Linux on IBM Z&reg; and z/OS&reg;)</strong> This mode works on the IBM z14â„¢ and later mainframe system with the Guarded Storage (GS) Facility. The GS Facility provides hardware-based support to detect when potentially stale references to objects are accessed by an application. This means that the garbage collector can start processing objects in parts of the heap without halting an application because the GS Facility is on hand to spot accesses to an object and send a notification. The object that was ready to be swept away can be moved, and references to it can be reset. You can read more about this mode in the following blog posts:</p>
<ul>
<li><a href="https://developer.ibm.com/javasdk/2017/09/18/reducing-garbage-collection-pause-times-concurrent-scavenge-guarded-storage-facility/">Reducing Garbage Collection pause times with Concurrent Scavenge and the Guarded Storage Facility</a></li>
<li><a href="https://developer.ibm.com/javasdk/2017/09/25/concurrent-scavenge-using-guarded-storage-facility-works/">How Concurrent Scavenge using the Guarded Storage Facility Works</a></li>
</ul>
</li>
<li>
<p><strong>Software-based support: (64-bit: Linux on (x86-64, POWER, IBM Z&reg;), AIX&reg;, macOS&reg;, and z/OS&reg;)</strong> With software-based support, <em>Concurrent Scavenge</em> can be enabled without any pre-requisite hardware although the performance throughput is not as good as hardware-based support.</p>
</li>
</ul>
<h3 id="balanced-policy"><code>balanced</code> policy</h3>
<p>The Balanced GC policy (<a href="../xgcpolicy/#balanced"><code>-Xgcpolicy:balanced</code></a>) evens out pause times and reduces the overhead of some of the costlier operations typically associated with garbage collection. It divides the Java heap into regions, which are managed individually to reduce the maximum pause time on large heaps and increase the efficiency of garbage collection. The aim of the policy is to avoid global garbage collections by matching object allocation and survival rates. </p>
<ul>
<li>
<p>If you have problems with application pause times that are caused by global garbage collections, particularly compactions, this policy might improve application performance. </p>
</li>
<li>
<p>If you are using large systems that have Non-Uniform Memory Architecture (NUMA) characteristics (x86 and POWER&trade; platforms only), the Balanced policy might further improve application throughput. </p>
</li>
</ul>
<p>However, even though pause times are typically evened out across GC operations, actual pause times are affected by object allocation rates, object survival rates, and fragmentation levels within the heap, and cannot therefore be bound to a certain maximum nor can a certain utilization level be guaranteed. </p>
<p>During VM startup, the GC divides the heap memory into regions of equal size. These regions remain static for the lifetime of the VM and are the basic unit of garbage collection and allocation operations. For example, when the heap is expanded or contracted, the memory committed or released corresponds to a certain number of regions. Although the Java heap is a contiguous range of memory addresses, any region within that range can be committed or released as required. This enables the Balanced GC to contract the heap more dynamically and aggressively than other garbage collectors, which typically require the committed portion of the heap to be contiguous.</p>
<p>Regions impose a maximum object size. Objects are always allocated within the bounds of a single region and are never permitted to span regions. The region size is always a power of two; for example, 512 KB, 1 MB, and so on (where KB is 2<sup>10</sup> bytes and MB is 2<sup>20</sup> bytes). The region size is selected at startup based on the maximum heap size. The collector chooses the smallest power of two which will result in less than 2048 regions, with a minimum region size of 512 KB. Except for small heaps (less than about 512 MB) the VM aims to have between 1024 and 2047 regions. </p>
<p>For further information see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/mm_gc_balanced.html">Balanced Garbage Collection policy</a>.</p>
<!--
![The diagram is explained in the surrounding text](./cr/balanced_gc_regions1.png "Region structure and characteristics found in the object heap")
-->
<h4 id="arraylets-dealing-with-large-arrays">Arraylets: dealing with large arrays</h4>
<p>Most objects are easily contained within the minimum region size of 512 KB. However, some large arrays might require more memory than is available in a single region. To support such arrays, the Balanced GC uses an <strong>arraylet</strong> representation to more effectively store large arrays in the heap. (Arraylets are also used by the Metronome GC; both Balanced and Metronome GC policies are region-based garbage collectors.)</p>
<p>Arraylets have a <strong>spine</strong>, which contains the class pointer and size, and <strong>leaves</strong>, which contain the data associated with the array. The spine also contains <strong>arrayoids</strong> which are pointers to the respective arraylet leaves, as shown in the following diagram.</p>
<p><img alt="The diagram is explained in the surrounding text" src="../cr/arraylet_diagram1.png" title="Arraylet diagram" /></p>
<p>There are a number of advantages to using arraylets. </p>
<ul>
<li>
<p>Because the heap tends to fragment over time, other collector policies might be forced to run a global garbage collection and defragmentation (compaction) phase to recover sufficient contiguous memory to allocate a large array. By removing the requirement for large arrays to be allocated in contiguous memory, the Balanced GC is more likely to be able to satisfy such an allocation without requiring unscheduled garbage collection, particularly a global defragmentation operation. </p>
</li>
<li>
<p>Additionally, the Balanced GC never needs to move an arraylet leaf once it has been allocated. The cost of relocating an array is therefore limited to the cost of relocating the spine, so large arrays do not contribute to higher defragmentation times.</p>
</li>
</ul>
<p><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> Despite the general advantage of using arraylets, they can slow down processing when the Java Native Interface (JNI) is being used. The JNI provides flexibility by enabling Java programs to call native code; for example C or C++, and if direct addressability to the inside of an object is needed, a JNI critical section can be used. However, that requires the object to be in a contiguous region of memory, or at least <em>appear</em> to be so. The JNI therefore creates a temporary contiguous array that is the same size as the original array and copies everything, element by element, to the temporary array. After the JNI critical section is finished, everything is copied from the temporary array back to the arraylet, element by element.</p>
<h3 id="metronome-policy"><code>metronome</code> policy</h3>
<p><a href="../xgcpolicy/#metronome-aix-linux-x86-only"><code>-Xgcpolicy:metronome</code></a> is designed for applications that require precise response times. Garbage collection occurs in small interruptible steps to avoid stop-the-world pauses. This policy is available only on x86 Linux and AIX platforms.</p>
<h3 id="optavgpause-policy"><code>optavgpause</code> policy</h3>
<p><a href="../xgcpolicy/#optavgpause"><code>-Xgcpolicy:optavgpause</code></a> uses concurrent mark and sweep phases, which means that pause times are reduced when compared to optthruput, but at the expense of some performance throughput.</p>
<h3 id="optthruput-policy"><code>optthruput</code> policy</h3>
<p><a href="../xgcpolicy/#optthruput"><code>-Xgcpolicy:optthruput</code></a> is optimized for throughput by disabling the concurrent mark phase, which means that applications will stop for long pauses while garbage collection takes place. You might consider using this policy when high application throughput, rather than short garbage collection pauses, is the main performance goal.</p>
<h3 id="nogc-policy"><code>nogc</code> policy</h3>
<p><a href="../xgcpolicy/#nogc"><code>-Xgcpolicy:nogc</code></a> handles only memory allocation and heap expansion, but doesn't reclaim any memory. The GC impact on runtime performance is therefore minimized, but if the available Java heap becomes exhausted, an <code>OutOfMemoryError</code> exception is triggered and the VM stops.</p>
<h2 id="troubleshooting">Troubleshooting</h2>
<p>You can diagnose problems with garbage collection operations by turning on verbose garbage collection logging. By default, the information is printed to STDERR but can be redirected to a file by specifying the <code>-Xverbosegclog</code> option. The log files contain detailed information about all operations, including initialization, stop-the-world processing, finalization, reference processing, and allocation failures. For more information, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/mm_gc_pd_verbosegc.html">Verbose garbage collection</a></p>
<p>If verbose logs do not provide enough information to help you diagnose GC problems, you can use GC trace to analyze operations at a more granular level. For more information, see <a href="../xtgc/">-Xtgc</a>.</p>
<!-- ==== END OF TOPIC ==== gc.md ==== -->
<!--
-->
<!-- This block was originally in the theme's 'footer.html' partial file. It has been moved here in part to resolve issues with the footer being too large. -->
</article>
</div>
</div>
</main>
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<cite></cite>
<footer class="footer">
<div class="md-footer-meta">
<div class="above-line">
<div class="above-line-links">
<div class="column">
<h3 >Docs</h3>
<span class="footer-link"><a href="/openj9_newuser/" >New to OpenJ9?</a></span>
<span class="footer-link"><a href="/introduction/">Getting started</a></span>
<span class="footer-link"><a href="/cmdline_specifying/">Command-line options</a></span>
</div>
<div class="column">
<h3>Resources</h3>
<span class="footer-link"><a href="https://www.eclipse.org/openj9/about/" rel="noopener noreferrer" target="_blank">About</a></span>
<span class="footer-link"><a href="https://www.eclipse.org/openj9/performance/" rel="noopener noreferrer" target="_blank">Performance</a></span>
</div>
<div class="column">
<h3 >Community</h3>
<span class="footer-link"><a href="https://www.eclipse.org/openj9/news/" rel="noopener noreferrer" target="_blank">News</a></span>
<span class="footer-link"><a href="https://blog.openj9.org/" rel="noopener noreferrer" target="_blank">Blogs</a></span>
</div>
</div>
<div class="column-incubator">
<div class="arrange-column">
<h3 ><b>OpenJ9 is an Eclipse Incubator project</b></h3>
<a class="incubator-image" href="http://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation" target="_blank"><img width="50px" src="../cr/incubator-logo.svg" alt="Eclipse Incubation"></a>
</div>
</div>
</div>
<div class="horizontal-line"></div>
<div class="below-line">
<span class="below-line-links"><a href="https://www.eclipse.org/" rel="noopener noreferrer" target="_blank">Eclipse Foundation Website </a></span>
<span class="below-line-links"><a href="https://www.eclipse.org/legal/privacy.php" rel="noopener noreferrer" target="_blank">Privacy Policy</a></span>
<span class="below-line-links"><a href="https://www.eclipse.org/legal/termsofuse.php" rel="noopener noreferrer" target="_blank">Terms of Use</a></span>
<span class="below-line-links"><a href="https://www.eclipse.org/legal/copyright.php" rel="noopener noreferrer" target="_blank">Copyright Agent</a></span>
<span class="below-line-links"><a href="https://www.eclipse.org/legal/" rel="noopener noreferrer" target="_blank">Legal</a></span>
<div class="below-line-social-media-icons">
<span class="social-media-link"> <a href="https://twitter.com/openj9/" rel="noopener noreferrer" target="_blank"> <img src="../cr/twitter-logo.svg" alt="Twitter Logo"></img></a></span>
<span class="social-media-link"> <a href="https://github.com/eclipse/openj9" rel="noopener noreferrer" target="_blank"> <img src="../cr/github-logo.svg" alt="GitHub Logo"></img></a></span>
<span class="social-media-link"> <a href="https://openj9.slack.com/" rel="noopener noreferrer" target="_blank"><img src="../cr/slack-icon.svg" alt="Slack logo"></img></a></span>
<span class="social-media-link"> <a href="https://stackoverflow.com/search?q=%23OpenJ9" rel="noopener noreferrer" target="_blank"><img src="../cr/stackoverflow-logo.svg" alt="Stack Overflow logo"></img></a></span>
</div>
</div>
</div>
</footer>
</div>
<script src="../assets/javascripts/application.a8b5e56f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>
<script src="../javascripts/oj9.js"></script>
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
}
ga.l = +new Date
/* Setup integration and send page view */
ga("create", "UA-105616558-3", "mkdocs.org")
ga("set", "anonymizeIp", true)
ga("send", "pageview")
/* Register handler to log search on blur */
document.addEventListener("DOMContentLoaded", () => {
if (document.forms.search) {
var query = document.forms.search.query
query.addEventListener("blur", function() {
if (this.value) {
var path = document.location.pathname;
ga("send", "pageview", path + "?q=" + this.value)
}
})
}
})
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>