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

在 Kubernetes 上优化 Java 应用程序:进阶篇.pdf

上传人: 竿*** 编号:981423 2025-11-29 46页 1.66MB

1、Optimizing Java Applications on KubernetesBeyond the BasicsBruno BorgesMicrosoft Developer DivisionJava Engineering Group(JEG),June 2024DevDiv Java Engineering GroupAgenda Part II:Kubernetes Vertical Autoscaling Java on Kubernetes Understanding CPU Throttling Impact of resource distribution on perfo

2、rmance 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 be

3、tter starting 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 importa

4、nt,but 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 are

5、a by eliminating 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

6、 Layer 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 MBA

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
根据文章内容,以下是全文关键点的概括: 1. **容器镜像优化**: - 减小容器镜像大小以提升安全性,减少攻击面。 - 使用distroless镜像,减少依赖,降低风险。 2. **JVM启动优化**: - 使用JVM Class Data Sharing (CDS) 缩短启动时间。 - 了解JVM默认值,根据环境配置最小/最大堆大小和GC。 3. **Kubernetes资源管理**: - 理解CPU请求和限制在Kubernetes中的含义。 - 使用Vertical Pod Autoscaler (VPA) 自动调整Pod资源。 4. **性能测试**: - 通过A/B性能测试比较不同拓扑结构。 - 监控资源消耗、延迟和吞吐量。 5. **资源分配**: - 合理分配资源以优化性能和成本。 - 比较不同资源分配策略对性能的影响。
**容器瘦身术** **JVM启动加速秘籍** **Kubernetes资源优化之道**
客服
商务合作
小程序
服务号
折叠