多年以来,java一直是贪婪的应用程序的同义词,这种类型的应用程序在晚上打开冰箱并吞噬所有可用资源,直到崩溃。 该行为的主要原因是缺乏一种有效的方式来将操作系统在Java堆中分配且不再使用的内存交还给操作系统。
However with the new feature released on OpenJDK 12 for Automatic Vertical Scaling of the java Heap in combination with Shenandoah Garbage Collector algorithm the JVM now is able to dynamically scale the java heap and give back the committed memory to the SO when necessary. That´s an amazing feature that will allow you to save money when running your microservice application on a cloud environment that usually fees you by the used resource.
Check this VIDEO out (Slides here)
This post was originally released on my Blog. If you have any doubts or questions feel free to drop a comment here or reach me out on Twitter @educostadev.