Garbage Collector Parameters Summary

Source: Internet
Author: User

Parameters Description

-xx:+useserialgc

The JVM runs the default value in client mode, and after this switch is turned on, memory recycling is performed using the collector combination of Serial + Serial old
-xx:+useparnewgc After you turn on this switch, use Parnew + Serial old collector for garbage collection
-xx:+useconcmarksweepgc Using parnew + cms + Serial old collector combination for memory reclamation, Serial old as the CMS "Concurrent Mode Failure" After the failure of the fallback collector.
-xx:+useparallelgc The JVM runs the default value in Server mode, and when this switch is turned on, it is recycled using the collector combination of parallel scavenge + Serial old
-xx:+useparalleloldgc Recycling with collector combinations of Parallel scavenge + Parallel old
-xx:survivorratio The capacity ratio of the Eden region to the survivor region in the Cenozoic, the default is 8, which represents eden:subrvivor = 8:1
-xx:pretenuresizethreshold Directly promoted to the size of the old age object, after setting this parameter, objects larger than this parameter will be allocated directly in the old age
-xx:maxtenuringthreshold Promotion to the age of the old, each time after minor GC, the age of 1, when the value of this parameter to enter the old age
-xx:useadaptivesizepolicy Dynamically adjusts the size of each area in the Java heap and the age of entry into the old age
-xx:+handlepromotionfailure Whether to allow the new generation to collect the guarantee, once minor GC, another piece of survivor space is not enough, will be directly in the old age to retain
-xx:parallelgcthreads Set the number of threads in a parallel GC for memory reclamation
-xx:gctimeratio GC time is the column of the total time, the default value is 99, which is to allow 1% GC time, only valid when using the parallel scavenge collector
-xx:maxgcpausemillis Set maximum pause time for GC, valid under parallel scavenge collector
-xx:cmsinitiatingoccupancyfraction Set the CMS collector to start garbage collection after the old age space is used, the default value is 68%, only valid in the CMS collector,-xx:cmsinitiatingoccupancyfraction=70
-xx:+usecmscompactatfullcollection Because the CMS collector is fragmented, this parameter sets whether a memory defragmentation process is required after the garbage collector, only valid when the CMS collector
-xx:+cmsfullgcbeforecompaction Set up a CMS collector to perform a memory defragmentation process after several garbage collections, usually with the usecmscompactatfullcollection parameter
-xx:+usefastaccessormethods Original type optimization
-xx:+disableexplicitgc Whether to turn off manual System.GC
-xx:+cmsparallelremarkenabled Reduce Mark pauses
-xx:largepagesizeinbytes The size of the memory page cannot be set too large, affecting the size of the perm,-xx:largepagesizeinbytes=128m

Client, Server mode default GC

New
generation GC mode old age and persistent GC mode

Client

Serial Serial GC Serial Old serial GC
Server Parallel Scavenge Parallel Recovery GC Parallel Old parallel GC

Sun/oracle JDK GC Combination method

New
generation GC mode old age and persistent GC mode

-xx:+useserialgc

Serial Serial GC Serial Old serial GC
-xx:+useparallelgc Parallel Scavenge Parallel Recovery GC Serial Old parallel GC
-xx:+useconcmarksweepgc Parnew Parallel GC CMS concurrency GC
When "Concurrent Mode Failure" appears
Using the serial old serial GC
-xx:+useparnewgc Parnew Parallel GC Serial Old serial GC
-xx:+useparalleloldgc Parallel Scavenge Parallel Recovery GC Parallel Old parallel GC
-xx:+useconcmarksweepgc
-xx:+useparnewgc
Serial Serial GC CMS concurrency GC
When "Concurrent Mode Failure" appears
Using the serial old serial GC

Garbage Collector Parameters Summary

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.