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]>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.ankurm.flagsdemo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Companion app for "JVM Flags for Spring Boot in Containers (JDK 25/27)" on ankurm.com.
|
||||
* See docs/output/*.txt for the captured runs this post quotes from, and
|
||||
* {@link JvmDiagnosticsController} for the live /internal/jvm-flags endpoint
|
||||
* used to inspect what the JVM actually resolved its memory/GC flags to
|
||||
* inside a running container. Delete that endpoint before shipping this to
|
||||
* a real service — it exists for this demo only.
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class FlagsDemoApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(FlagsDemoApplication.class, args);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user