Java 9 wishing list: Please give us a better garbage collection mechanism

Source: Internet
Author: User

Java 9 wishing list: Please give us a better garbage collection mechanism

Oracle said that the low pause of the G1 garbage collection mechanism will replace Parallel GC to improve system execution efficiency.

Currently, Oracle is planning to use the G1 server garbage collection mechanism as the default recycle option in the 32-bit and 64-bit Java Server Configuration schemes. However, this processing method may cause a series of subsequent problems.

As JEP, the JDK enhancement solution, was released for the first time earlier this year and has just been updated this month.) 248 states that the purpose of this mechanism change is to introduce the pause time into memory management. "In general, limiting the GC pause time is more important than maximizing the throughput," This suggestion points out. "The low-Pause garbage collection solution, such as G1, should provide a better overall user experience for most users-at least compared to the current default option Parallel GC, which is mainly for throughput. ...... This change is mainly based on the assumption that limiting the latency level usually takes precedence over Improving the throughput capacity. If this assumption is not accurate, this adjustment may not bring the desired effect, or even need to be reviewed again ."

Oracle plans to deploy G1 in Java 9 to be launched next year. JDK is a Java Development Tool) 8 and later versions, G1 has ushered in a number of performance improvements. According to the JEP document, it should be further improved in JDK 9.

According to a description by Oracle, G1 is positioned specifically for server-type garbage collection solutions with large memory capacity and multi-processor devices. However, using it as the default collection mechanism may expose some unknown potential problems in G1, as JEP 248 pointed out. "If some problems cannot be solved within the JDK 9 lifecycle, we will use Parallel GC as the default garbage collection solution for general JDK 9 ." G1 also provides multiple resource usage methods. "When the resource usage needs to be controlled at the lowest level, the user should first choose another garbage collection mechanism to replace G1, and after the change, the backup recovery mechanism must be explicitly specified ."

Parallel GC this Parallel garbage collection solution has been serving as the default option in Java for many years, applications that need to minimize the suspension time of garbage collection mainly adopt Concurrent Mark Sweep, which is also an alternative, said Scott Sellers, a Java virtual machine technology vendor Azul Systems. G1 is a brand new implementation solution with more concise code and more friendly to developers in terms of maintenance. Therefore, "some users may prefer to use G1 as the processing method after evolution, "Sellers explained.

However, G1 also has its own drawbacks, including slow data throughput and poor performance compared with the parallel garbage collection mechanism, he said. "Another major shortcoming of G1 is that if an application requires a very strict response time feature, the precisely adjusted CMS garbage collection mechanism can provide response time indicators that are better than G1 in almost all situations."

Original article title: Cleaner garbage collector wanted for Java 9

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.