Very detailed GC study notes

Source: Internet
Author: User

I.GC characteristics and selection of various GC

1. Characteristics of garbage collector

2, the choice of garbage collector

2.1 Continuous VS. Parallel

2.2 concurrency VS. Stop-the-world

2.3 compression VS. do not compress VS. Copy

Second,GC performance Indicators

Third, the generation of recycling

Iv. GC learning on the HotSpot JVM ofJ2SE 5.0 - generational,GC Type, quick assign

V. GC learning on the HotSpot JVM ofJ2SE 5.0 -SERIALGC

Vi. GC learning on the HotSpot JVM ofJ2SE 5.0 -PARALLELGC

Vii. GC learning on the HotSpot JVM ofJ2SE 5.0 -PARALLELCOMPACTINGGC

Viii. GC learning on the HotSpot JVM ofJ2SE 5.0 -CMS GC

Nine, start parameter learning example

1. GC features and selection of various GC

1.1 Characteristics of the garbage collector

The recycled object must be recycled, and objects that should not be recycled must not be recycled.

Be sure to be effective, and be quick! Pause the app's run as little as possible

Need to balance the three elements of time, space, and recovery frequency

Memory fragmentation issues (a way to resolve memory fragmentation, which is compression)

Scalability and scalability (memory allocation and recycling should not be a bottleneck in multi-core multithreaded applications)

Selection of the garbage collector

1.2 continuous VS. Parallel

Continuous garbage collector, even in multi-core applications, when recycling, there is only one core to be exploited.

However, parallel GC uses multicore,GC Tasks are separated into multiple subtasks, and these subtasks are executed in parallel on each CPU .

the benefit of parallel GC is that it reduces GC time, but the disadvantage is that it increases complexity and there is the possibility of generating memory fragmentation.



See: http://www.jiagou4.com/cms-web/2015/09/852.html


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Very detailed GC study notes

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.