首页 > 其他 > 详细

JVM 垃圾回收

时间:2019-10-12 19:59:57      阅读:81      评论:0      收藏:0      [点我收藏+]

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>并发收集器并发线程数

JVM 垃圾回收

原文:https://www.cnblogs.com/caiyao/p/11663416.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!