이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 4. Basic configuration options of Shenandoah garbage collector


Shenandoah garbage collector (GC) has the following basic configuration options:

-Xlog:gc
Print the individual GC timing.
-Xlog:gc+ergo
Print the heuristics decisions, which might shed light on outliers, if any.
-Xlog:gc+stats

Print the summary table on Shenandoah internal timings at the end of the run.

It is best to run this with logging enabled. This summary table conveys important information about GC performance. Heuristics logs are useful to figure out GC outliers.

-XX:+AlwaysPreTouch
Commit heap pages into memory and helps to reduce latency hiccups.
-Xms and -Xmx
Making the heap non-resizeable with -Xms = -Xmx reduces difficulties with heap management. Along with AlwaysPreTouch, the -Xms = -Xmx commit all memory on startup, which avoids difficulties when memory is finally used. -Xms also defines the low boundary for memory uncommit, so with -Xms = -Xmx all memory stays committed. If you want to configure Shenandoah for a lower footprint, then setting lower -Xms is recommended. You need to decide how low to set it to balance the commit/uncommit overhead versus memory footprint. In many cases, you can set -Xms arbitrarily low.
-XX:+UseLargePages
Enables hugetlbfs Linux support.
-XX:+UseTransparentHugePages
Enables huge pages transparently. With transparent huge pages, it is recommended to set /sys/kernel/mm/transparent_hugepage/enabled and /sys/kernel/mm/transparent_hugepage/defrag to madvise. When running with AlwaysPreTouch, it will also pay the defrag tool costs upfront at startup.
-XX:+UseNUMA
While Shenandoah does not support NUMA explicitly yet, it is a good idea to enable NUMA interleaving on multi-socket hosts. Coupled with AlwaysPreTouch, it provides better performance than the default out-of-the-box configuration.
-XX:-UseBiasedLocking
There is a tradeoff between uncontended (biased) locking throughput, and the safepoints JVM does to enable and disable them. For latency-oriented workloads, turn biased locking off.
-XX:+DisableExplicitGC
Invoking System.gc() from user code forces Shenandoah to perform additional GC cycle. It usually does not harm, as -XX:+ExplicitGCInvokesConcurrent gets enabled by default, which means the concurrent GC cycle would be invoked, not the STW Full GC.

Revised on 2024-05-03 15:37:52 UTC

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat