JVM 垃圾回收
Maximum Pause Time Goal: -XX:MaxGCPauseMillis=<nnn>
Throughput Goal: -XX:GCTimeRatio=19
most objects survive for only a short period of time
Default Arrangement of Generations, Except for Parallel Collector and G1
young tenued
-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
committed space and virtual space
-Xmx
XX:MinHeapFreeRatio=
<minimum>
-XX:MaxHeapFreeRatio=
<maximum>
-Xms
<min> 初始大小
-Xmx
<max> 最大大小
NewRatio ratio: tenured generation to the young generation
-XX:NewRatio=3 标示新生代:老年代 1:3
-XX:SurvivorRatio=6 设置survivor和eden区的比率, 6表示 一个survivor和eden区比率为 1:6
-XX:+PrintTenuringDistribution 查看
-XX:+UseSerialGC 使用serial gc
-
-XX:+UseParallelGC
.
并发垃圾收集器: -XX:+UseConcMarkSweepGC CMS -XX:+UseG1GC: G1
这多种收集器有什么优点和缺点?
parallel collector = throughput collector
-XX:+UseParallelGC 当只使用这个参数来指定使用Parallel Collector时,年轻代和老年代都使用这个收集器
-XX:ParallelGCThreads=
<N>并发收集器并发线程数