Files
zgc-jdk25-benchmarks/flags/docs/output/02-gc-selection-jdk27.txt
T
asmhatreandClaude Sonnet 5 2f88734f5d Add flags: production JVM flag cheat sheet for Spring Boot on JDK 25/27
MaxRAMPercentage vs a hardcoded -Xmx, -XX:-UseContainerSupport, the
ActiveProcessorCount lie, and which diagnostic flags are worth leaving
on in prod, verified in real Docker containers on JDK 25 and JDK 27.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-10-01 04:34:04 +00:00

60 lines
5.2 KiB
Plaintext

$ for mem,cpu in 256m:1 512m:1 1800m:1 512m:2 1800m:2 4g:2; do
docker run --rm --memory=$mem --cpus=$cpu --entrypoint java flags-demo:jdk27 \
-XX:+PrintFlagsFinal -version | grep -E "UseG1GC|UseSerialGC|UseCompactObjectHeaders|MaxHeapSize|MaxRAMPercentage"
done
--- mem=256m cpus=1 ---
int ActiveProcessorCount = -1 {product} {default}
size_t MaxHeapSize = 132120576 {product} {ergonomic}
double MaxRAMPercentage = 25.000000 {product} {default}
bool UseCompactObjectHeaders = true {product lp64_product} {default}
bool UseG1GC = true {product} {ergonomic}
bool UseParallelGC = false {product} {default}
bool UseSerialGC = false {product} {default}
--- mem=512m cpus=1 ---
int ActiveProcessorCount = -1 {product} {default}
size_t MaxHeapSize = 134217728 {product} {ergonomic}
double MaxRAMPercentage = 25.000000 {product} {default}
bool UseCompactObjectHeaders = true {product lp64_product} {default}
bool UseG1GC = true {product} {ergonomic}
bool UseParallelGC = false {product} {default}
bool UseSerialGC = false {product} {default}
--- mem=1800m cpus=1 ---
int ActiveProcessorCount = -1 {product} {default}
size_t MaxHeapSize = 471859200 {product} {ergonomic}
double MaxRAMPercentage = 25.000000 {product} {default}
bool UseCompactObjectHeaders = true {product lp64_product} {default}
bool UseG1GC = true {product} {ergonomic}
bool UseParallelGC = false {product} {default}
bool UseSerialGC = false {product} {default}
--- mem=512m cpus=2 ---
int ActiveProcessorCount = -1 {product} {default}
size_t MaxHeapSize = 134217728 {product} {ergonomic}
double MaxRAMPercentage = 25.000000 {product} {default}
bool UseCompactObjectHeaders = true {product lp64_product} {default}
bool UseG1GC = true {product} {ergonomic}
bool UseParallelGC = false {product} {default}
bool UseSerialGC = false {product} {default}
--- mem=1800m cpus=2 ---
int ActiveProcessorCount = -1 {product} {default}
size_t MaxHeapSize = 471859200 {product} {ergonomic}
double MaxRAMPercentage = 25.000000 {product} {default}
bool UseCompactObjectHeaders = true {product lp64_product} {default}
bool UseG1GC = true {product} {ergonomic}
bool UseParallelGC = false {product} {default}
bool UseSerialGC = false {product} {default}
--- mem=4g cpus=2 ---
int ActiveProcessorCount = -1 {product} {default}
size_t MaxHeapSize = 1073741824 {product} {ergonomic}
double MaxRAMPercentage = 25.000000 {product} {default}
bool UseCompactObjectHeaders = true {product lp64_product} {default}
bool UseG1GC = true {product} {ergonomic}
bool UseParallelGC = false {product} {default}
bool UseSerialGC = false {product} {default}