`

JAVA GC日志输出

    博客分类:
  • java
gc 
阅读更多
2014-09-09T09:45:41.560+0800: 336279.264: [GC2014-09-09T09:45:41.560+0800: 336279.264: [ParNew: 136477K->167K(153344K), 0.0245680 secs] 151436K->15125K(2080128K), 0.0248620 secs] [Times: user=0.05 sys=0.00, real=0.03 secs]


[GC2014-09-09T09:45:41.560+0800: 336279.264: [ParNew: 136477K->167K(153344K), 0.0245680 secs] 151436K->15125K(2080128K), 0.0248620 secs]

这里面表示:[GC时间:[ParNew区的gc情况:136477K到167K,回收了153344Kk,用时0.024秒]


GC的格式,用形式化描述


S ::= [TIME:[GC代情况]+,耗时][Times:用户态耗时,系统态耗时,实际总耗时]
GC代情况 ::= GC代标志:回收前大小->回收后大小(总大小)


即,一个总分的结构,显示GC总体情况,里面包含了各类GC的具体情况。


http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html
GC参数:
-XX:MinHeapFreeRatio=40 -XX:MaxHeapFreeRatio=70 -Xms3670k -Xmx64m


The Young Generation



-XX:+UseParallelGC  并行GC
-Xincgc ™
-XX:+UseConcMarkSweepGC

Note that -XX:+UseParallelGC should not be used with -XX:+UseConcMarkSweepGC .
并行GC和标记扫描GC不能同时使用。

-XX:ParallelGCThreads=<desired number> :指定并行GC的线程数量


-XX:MaxGCPauseMillis=<nnn>最大GC暂停时间毫秒数
-XX:GCTimeRatio=<nnn> ;1 / (1 + <nnn>)


-XX:YoungGenerationSizeIncrement=<nnn > for the young generation and -XX:TenuredGenerationSizeIncrement=<nnn> for the tenured generation. The percentage by which a generation shrinks is adjusted by the command line flag -XX: AdaptiveSizeDecrementScaleFactor=<nnn >. If the size of an increment for growing is XXX percent, the size of the decrement for shrinking will be XXX / nnn percent.


标记扫描GC的参数列表:
-XX:+UseConcMarkSweepGC \
-XX:+CMSIncrementalMode \
-XX:+CMSIncrementalPacing \
-XX:CMSIncrementalDutyCycleMin=0 \
-XX:+CMSIncrementalDutyCycle=10 \
-XX:+PrintGCDetails \
-XX:+PrintGCTimeStamps \
-XX:-TraceClassUnloading

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics