# JEP 523: which collector does the JVM pick when you do not choose one? # Same class files, same vendor (Amazon Corretto), same 2 GB memory limit. Only the JDK version and the CPU limit change. === amazoncorretto:26 --cpus=1 --memory=2g $ docker run --rm --cpus=1 --memory=2g amazoncorretto:26 java -cp /app GcReport java.version = 26.0.2.1 availableCpus = 1 maxHeapMB = 511 collector beans = Copy, MarkSweepCompact UseG1GC = false (origin DEFAULT) UseSerialGC = true (origin ERGONOMIC) UseParallelGC = false (origin DEFAULT) === amazoncorretto:27 --cpus=1 --memory=2g $ docker run --rm --cpus=1 --memory=2g amazoncorretto:27 java -cp /app GcReport java.version = 27 availableCpus = 1 maxHeapMB = 512 collector beans = G1 Young Generation, G1 Concurrent GC, G1 Old Generation UseG1GC = true (origin ERGONOMIC) UseSerialGC = false (origin DEFAULT) UseParallelGC = false (origin DEFAULT) === amazoncorretto:26 --cpus=2 --memory=2g $ docker run --rm --cpus=2 --memory=2g amazoncorretto:26 java -cp /app GcReport java.version = 26.0.2.1 availableCpus = 2 maxHeapMB = 512 collector beans = G1 Young Generation, G1 Concurrent GC, G1 Old Generation UseG1GC = true (origin ERGONOMIC) UseSerialGC = false (origin DEFAULT) UseParallelGC = false (origin DEFAULT) === amazoncorretto:27 --cpus=2 --memory=2g $ docker run --rm --cpus=2 --memory=2g amazoncorretto:27 java -cp /app GcReport java.version = 27 availableCpus = 2 maxHeapMB = 512 collector beans = G1 Young Generation, G1 Concurrent GC, G1 Old Generation UseG1GC = true (origin ERGONOMIC) UseSerialGC = false (origin DEFAULT) UseParallelGC = false (origin DEFAULT)