AppCDS for Spring Boot applications: first contact

Photo by Nick Fewings on Unsplash

Abstract

Application Class Data Sharing (AppCDS) is a JVM feature for startup acceleration and memory saving. Originated from HotSpot of JDK 1.5 (back in 2004), it had been staying quite limited and partly commercial for a long time. But in OpenJDK 10 (2018), it became widely available and significantly more applicable. Moreover, recently released Java 13 made the feature application even more simple.

The idea behind AppCDS is to “share” once loaded classes between JVM instances on the same host. It seems that it should be fit for microservices, especially for Spring Boot “broilers” that have thousands of library classes, because the JVM would not need to load (parse and verify) those classes on every start of every instance, and those classes would not duplicate in memory. Consequently, the startup should become faster and memory footprint should be smaller. Sounds great, doesn’t it?

That’s right. But if you’re used to not believing street banners but checked facts and measures, then welcome aboard! Let’s find out what it’s like truly…

Publication
This article was also published on this site to improve its appearance. There is also Russian translation of the article.
Software Engineer

Favorite technology: common sense

comments powered by Disqus
Next