Trendovi i budućnost Jave
Optimizing existing applications in terms of performance has always been a specific area of concern in the software development world. Since garbage collection algorithms are responsible for managing dynamic memory allocation and play a crucial role in the efficiency of enterprise applications written in Java, there are constant improvements of these underlying algorithms, the essential components of Java Virtual Machine (JVM) that are part of automatic memory management provided by its runtime. Throughout Java’s history, the most challenging aspect of this automated system has been concurrency – trying to achieve efficient reuse of unnecessary memory while the application is running, and therefore preserving the desired performance of a program. In the recent versions of JDK, apart from traditional garbage collectors, several new experimental GCs have been implemented and tested, including a scalable low-latency ZGC and low-pause-time Shenandoah GC. Available as experimental features and on some operating systems in previous JDK builds, ZGC and Shenandoah finally reached the production stage in JDK 15. This presentation explains the most important aspects of contemporary garbage collection algorithms, as well as their typical usage and expected performance across several JDKs in comparison with the traditional ones.