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