Skip to content
0:00 / 0:00

#jvm#kubernetes#garbagecollection

Secrets of Performance Tuning Java on Kubernetes by Bruno Borges

Devoxx

172K subscribers • 52 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Bruno Borges

Intermediate. Assumes working knowledge.

31K views4 years ago2 recommendations

Cloud and DevOpsSystems programmingKubernetesJava and the JVMPerformance and optimization

Bruno Borges explains JVM ergonomics, CPU throttling, and garbage collection tuning for running Java applications efficiently on Kubernetes.

Initially, getting Java to run on Kubernetes may seem complicated, but after a few lines of YAML and a bit of work with Docker, you will wonder what all that fuss was. It is easy! Then you start looking at the performance of your Java app in one core, one GB of memory container, and this is when it all very quickly gets murky. Ops, SREs, and Java developers need to be aware of the JVM's inner works when deciding on how to resource their applications. Without this knowledge, it isn't easy to know whether it is best to scale vertically or horizontally for performance and costs. This talk will explore JVM ergonomics, CPU throttling, Garbage Collectors, and how using this knowledge can help you increase performance while reducing costs in the cloud.

Why it's here

2 people recommend this

What people say. Recommended for understanding JVM flags, memory limits, and garbage collection tuning when running Java in containers.

u/ventuspilotin r/Clojure • Recommends

On “At what point of Clojure career, does one need to actually learn JVM?”

If you are involved with running any JVM application you should know at least some `java` options. `-Xss, -Xms, -Xmx` and `-XX:+Use...` should almost always be specified IMO. This video talks about Java tuning and what happens if you don't specify anything, e.g. you add memory to your instance and the JVM won't use it unless you tell it to, or the JVM will default to using the serial GC which you rarely want.

u/gaelfr38in r/scala • Recommends

On “What JVM flags do you use on your projects?”

No flag until we face some issue and/or we need very high performance. With the exception of: - explicit memory settings (Xmx/Xms or MaxRamPercentage depending if we're on VMs or K8S) - explicit Garbage Collector When we need fine tuning, we mostly look at the GC options and stuff like "huge pages" (don't remember the name). If you're running in container/K8S, I recommend this talk from Bruno Borges: link to this video One of the TL;DR is "don't trust the defaults".

u/doofzWasTakenin r/kubernetes • Mentions

Why is it a good idea to set pod requests equal to limits for Java applications? I was researching about Java application performance tuning on kubernetes, and one of the posts I found was this one by Juan Pedro Moreno. He says: >Setting requests equal to limits for memory is a good idea in general. While I understand that this guarantees resources for that service in kubernetes manager, I fail to understand other benefits, and thus why it is generally a good idea as he said. What brings me to this conference from Bruno Borges, a Microsoft representative, he shows a couple examples, where he used requests and limits set to the same values as well. However he does not mention why, I jus…