This is the last GC-related article, the LZ is just a list of key parameters related to the garbage collector in the Hotspot JVM, as well as explanations of each parameter. Don't say much nonsense, this begins.
Garbage collector selection Parameters
USESERIALGC: Open this parameter using the serial & serial old collector (client mode defaults).
USEPARNEWGC: Open this parameter using the Parnew & serial old collector (not recommended).
USECONCMARKSWEEPGC: Open this parameter to use Parnew & CMS (serial old as a substitute) collector.
USEPARALLELGC: Open this parameter to use the parallel scavenge & parallel old collector (server mode defaults).
USEPARALLELOLDGC: Open this parameter to use the parallel old collector in the older generation (this parameter is useless after JDK1.5).
JVM individual memory area size related parameters
Xms: The initial value of the heap. The default is 1/64 of the physical memory, and the maximum does not exceed 1G.
XMX: The maximum value of the heap. The default is 1/4 of the physical memory, and the maximum does not exceed 1G.
XMN: The size of the Cenozoic.
XSS: Thread stack size.
PermSize: Permanent generation initial size. The default is 1/64 of the physical memory, and the maximum does not exceed 1G.
MaxPermSize: Maximum value for permanent generation. The default is 1/4 of the physical memory, and the maximum does not exceed 1G.
Newratio: The ratio of the Cenozoic to the older generation. For example, 3, then the Cenozoic Jian 1/4, older generation accounted for 3/4.
Survivorratio: The ratio of the new generation to adjust the Eden area and the Survivor area, the default is 8, that is, the Eden area is 80% size, two survivor respectively 10% of the size. (Note: This parameter setting is to explain the replication algorithm in the chapter, solve the replication algorithm memory by half.) The Eden area is the 80% part of the copy algorithm chapter, and the Survivor area is the two 10% part. )
Garbage collector Performance General parameters
Pretenuresizethreshold: The size of an object promoted to an older generation. The default is 0, for example, 10M, then more than 10M objects will not be allocated in the Eden area, but directly into the old generation.
Maxtenuringthreshold: The maximum age for promotion in the old years. The default is 15, for example, set to 10, then the object will be placed in the old generation after 10 ordinary GC.
DISABLEEXPLICITGC: Disable System.GC ().
Parallel collector parameters
Parallelgcthreads: The number of threads that were opened at the time of collection. The default is equal to the number of CPUs.
Gctimeratio: Sets the system throughput. For example, set to 99, the GC time ratio is 1/1+99=1%, that is, the requirement throughput is 99%. If not satisfied, it will shrink the Cenozoic size.
Maxgcpausemillis: Sets the maximum pause time for garbage collection. If the setting value is not met, the new generation size will be reduced preferentially, and the throughput will be sacrificed if it is still not satisfied.
Concurrent Collector Parameters
Cmsinitiatingoccupancyfraction: The percentage of memory that triggers the CMS collector. For example, 60% means that when the memory reaches 60%, the CMS will start to collect concurrently.
Usecmscompactatfullcollection: This has been mentioned earlier to send a memory collation after every CMS collector cleans up the garbage.
Cmsfullgcsbeforecompaction: Set up after several CMS garbage collection, triggering a memory collation.
Conclusion
GC-related series is basically over, this article is just a list, then we together to enter the virtual machine source World bar.
Author: zuoxiaolong (Zao Jianrong)
Source: Blog Park Zao Jianrong Technology Blog--http://www.cnblogs.com/zuoxiaolong