当前位置:首页 > 报告详情

4312 - Kubernetes 上 Java 性能调优的秘诀.pdf

上传人: 竿*** 编号:982739 2025-11-29 46页 1.73MB

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

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
根据《Secrets of Performance Tuning Java on Kubernetes》的内容,以下是全文关键点的概括: 1. **容器镜像优化**: - 减小容器镜像大小以提升安全性,减少攻击面。 - 使用distroless镜像,减少依赖,降低风险。 2. **JVM启动优化**: - 利用JVM Class Data Sharing (CDS) 缩短启动时间。 - GraalVM Native Image可进一步减少启动时间和镜像大小。 3. **JVM默认配置**: - 了解JVM默认值,根据环境配置最小/最大堆大小和GC。 - 避免仅使用`java -jar`命令启动应用。 4. **Kubernetes资源管理**: - 使用HPA和VPA进行垂直和水平自动扩展。 - 理解Kubernetes CPU限制对JVM的影响,使用`-XX:ActiveProcessorCount`调整JVM。 5. **资源分配与性能**: - 优化资源分配,避免资源浪费,提高性能。 - 通过A/B性能测试评估不同拓扑结构的影响。 6. **性能测试**: - 使用A/B测试比较不同拓扑结构在资源消耗、延迟和吞吐量上的表现。
**容器瘦身术** **JVM启动优化秘籍** **Kubernetes资源分配的艺术**
客服
商务合作
小程序
服务号
折叠