1、Secrets of Performance Tuning Java on KubernetesBeyond the BasicsBruno BorgesMicrosoft Core AIJava Engineering Group,October 2025DevDiv Java Engineering GroupAgenda Part II:Kubernetes Vertical Autoscaling Java on Kubernetes Understanding CPU Throttling Impact of resource distribution on performance
2、and cost Part III:AB Perf Test Performance Testing different topologies Part 0:Size and Startup time Container images JVM startup optimizations Part I:JVM Defaults Default Ergonomics Understand JVM default values How memory and CPU impact GC selection Garbage Collectors Recommendations for better st
3、arting points for dedicated environmentsNon-goal:Advanced JVM TuningWe dont cover JVM Tuning here,but you can see the opportunities!Part 0:Size and Startup timeSize is nice,security is better:reducing attack surface area.DevDiv Java Engineering GroupWhy reduce container images?Size is important,but
4、Storage is cheap Network speed between VM and Container Registry is super fast if container image size is impacting scaling,then make it a priority Security is truly important,and Less 3rd-party dependencies reduces potential vulnerabilities that can be exploited Reduces attacking surface area by el
5、iminating unnecessary tools Easier to meet compliance requirements Easier to audit Lower risk of misconfiguration Faster to update and patchDevDiv Java Engineering GroupHow to reduce container image size?Base Image OS layer Use distroless images Java application Reduce dependencies at runtime Layer
6、dependencies and app binary separately Run with a non-root user JVM runtime Create a custom Java runtime with just the parts you need Go the extra mile with GraalVM Native ImageDevDiv Java Engineering GroupBase imagesImageTypeSize(extracted)DebianFull117 MBUbuntuFull 78.1 MBDebianSlim74.8 MBAlpineSl