The three "G1 of the New generation GC" of Java Virtual machine

Source: Internet
Author: User

Today began the actual combat Java Virtual Machine three: "Virtual machine working mode."

Total of 5 Series

  • "Heap overflow processing" in one of the actual Java virtual machines
  • Virtual machine working mode for Java Virtual machine
  • The three "G1 of the New generation GC" of Java Virtual machine
  • Live Java Virtual machine Four "Disable System.GC ()"
  • Real-time Java Virtual Machine Five "turn on JIT compilation"

The main task of the new generation GC is to reclaim the Eden and survivor areas. Once the Eden Zone is fully occupied, the new generation GC will start. The new generation GC collects before and after the heap data 5.6, where E represents the Eden area, s represents the Survivor area, and O indicates the old age. As you can see, the new generation GC deals only with the Eden and survivor areas, and after recycling, all Eden areas should be emptied, while the survivor area will be collected as part of the data, but there should be at least one survivor area, analogous to the other Cenozoic collectors, This does not seem to change much. Another important change is the growing region of the old age, as the objects of some survivor or Eden areas may be promoted to the old age.

Figure 5.6 G1 's new Generation GC

After the new generation GC occurs, if the Printgcdetails option is turned on, you can get a GC log similar to the following (only partial logs are given here, full logs and their analysis are shown in the 5th. 4.6):

0.336: [GC Pause (Young), 0.0063051 secs] ....   [eden:235.0m (235.0M)->0.0b (229.0M) survivors:5120.0k->11.0m Heap:239.2m (400.0M)->10.5m (400.0M)] [times:user=0.06 sys=0.00, real=0.01 secs]

The log content of G1 is very rich compared to the logs of other recyclers. Of course weThe most important concern is the GC's pause time and the recycling situation. As you can see from the log, the Eden area was originally occupied with 235M space, was emptied after recycling, and the survivor Zone grew from 5M to 11M, because some objects were copied from the Eden zone to the Survivor area, the entire heap was 400M, and the total stack was reduced from 239M to 10.5M before recycling.

"Heap overflow processing" in one of the actual Java virtual machines

Virtual machine working mode for Java Virtual machine

Excerpt from

The three "G1 of the New generation GC" of Java Virtual machine

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.