How to read the Garbage Collector output (for Sun JVM)

there are lots of applications to make the output of the *–verbose:gc* parameter easy to read, but still it may be useful to have a general idea of the meaning of the "numbers" in the gc log file... The language to describe the memory areas for the Sun JVM is slightly different to the one used for IBM JVM. Also the parameters are quite different, and they cannot be mixed up! As we can see in the following diagram, there is a *heap area *(divided in *young *and *tenured* areas) and a *perm* area. The most important parameters to define the different areas are indicated too: Besides that, the output of the *-verbose:gc *parameter may be quite different depending on the additional parameters we set. For example:

  • *-XX:+PrintGCTimeStamps* will print a time stamp before each collection line.
  • *-XX:+PrintGCDetails *will print more details at garbage collection.  h3. Minor Garbage Collection: As per the description provided by Sun, the minor collection output created by parameters *-verbosegc -XX:+PrintGCDetails *looks like:

    *+[GC [ secs]+*

    + +

    Let’s see a more real example:

    *83.304: *This is the start time of the collection since the VM started.

    *GC* indicates that this is a minor garbage collector. If the executed collection is a global one, then we will see *FullGC* instead of GC.

    *DefNew:* This is the *collector type *used for the minor collection. The most common values here are DefNew and ParNew. This depends again on the parameters we set for the JVM, for example *-XX:+UseParNewGC *(for the Parallel New garbage collector).

    *890K: *This value refers to the size of the young generation which is allocated before GC takes place.

    *64K: *This value is the young area allocated after GC (ideally, it should be smaller).

    *960K:* This value is the maximum young area available (Eden + one of the survivor areas). *0.004494 secs: T*his is the pause time for the minor collection. *890K: *This is the occupancy of the entire heap before GC.

    *217K: * This is the occupancy of the entire heap after GC. *5056K: *Maximum heap available (max heap – one of the survivor areas).

    *0.004606 secs: *Pause time for the entire garbage collection.     h3. Full Garbage Collection: As we have alredy mentioned, when a full garbage collection takes place, the tag *Full GC *appears in the GC output, as you can see in the following example:

     

    *3074.315:* This is the start time of the collection since the VM started.

    *1738752K: *This is the size of the tenured area allocated before the GC.

    *1738751K: *This is the size of the tenured area allocated after GC (this should be a smaller value).

    **1738752K: This is the maximum tenured area available (MaxHeap – Young).

    *2007551K: *This is the heap allocated before GC.

    *1773223K:* This is the heap allocated after GC. *2007552K: *This is the maximum available heap (MaxHeap – one of the survivor areas).

    *246227K: * This is the perm area allocated before GC. *246227K:*  This is the perm area allocated after GC.

1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看REAdMe.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看REAdMe.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看READme.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值