Spec-Zone .ru
спецификации, руководства, описания, API
|
Parallel compaction complements the existing parallel collector by
performing full GCs in parallel to take advantage of multiprocessor (or
multi-threaded) hardware. As the name suggests, it is best suited to
platforms that have two or more CPUs or two or more hardware threads. It
was first made available in
Prior to the availability of parallel compaction, the parallel collector would perform young generation collections (young GCs) in parallel, but full GCs were performed single-threaded. (During a young GC, only the young generation is collected; during a full GC the entire heap is collected. See the documents referenced below for more details on generations and garbage collection.) Parallel compaction performs full GCs in parallel, resulting in lower garbage collection overhead and better application performance, particularly for applications with large heaps running on multiprocessor hardware.
Parallel compaction is not enabled by default; add the option
-XX:+UseParallelOldGC
to the java
command line to enable parallel compaction.
(Parallel compaction will likely be enabled by default on multiprocessor
hardware in a future release.)
Note that parallel compaction is not available in combination with the concurrent mark sweep collector; it can only be used with the parallel young generation collector. The documents referenced below provide more information on the available collectors and recommendations for their use.
The HotSpot
The HotSpot