How Can Machine Learning Assist to Improve JVM Performance

Many developers are either unaware of or prefer not to use JVM flags when running their Java applications, especially those requiring complex numerical inputs, such as memory-related flags. Despite the abundance of these flags, tuning even just one or two can significantly enhance application performance, which is critical in performance-sensitive scenarios.

In this talk, I am going to explain an approach for auto tuning JVM flags that I studied in my master’s thesis which was in collaboration with Oracle. In my master’s thesis, I explored five different machine learning models trained on data that was extracted from the G1 GC logs of a Java application, with the goal of improving its throughput and latency. The results were promising.

I believe that by sharing these tools and ideas, developers struggling to optimize memory-related JVM flags could not only benefit from this approach but also find it an enjoyable process.

Recorded at Jfokus 2025.