Java垃圾收集日志消息

Java垃圾收集日志消息

本文介绍了Java垃圾收集日志消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经配置java将垃圾收集信息转储到日志中(,但没有找到明确的解释。



我有一些合理的猜测,但我正在寻找答案,它们为条目中的数字提供了严格的定义,并由可靠来源提供支持。所有答案的自动+1引用sun文档。我的问题是:


  1. PSYoungGen是指什么?我认为这与以前的(年轻?)一代有关,但究竟是什么?

  2. 数字的第二个三元组与第一个三元组的区别是什么?

  3. 为什么名称(PSYoungGen)但不是第二?

  4. 三元组中每个数字(内存大小)的含义是什么。例如在109884K-> 14201K(139904K)中,是GC 109884k之前的内存,然后减少到14201K。第三个数字如何相关?为什么我们需要第二组数字?



我不确定为什么在你的PSYoungGen中存在PSYoungGen;你改变了垃圾回收器吗?


I have configured java to dump garbage collection information into the logs (verbose GC). I am unsure of what the garbage collection entries in the logs mean. A sample of these entries are posted below. I've searched around on Google and have not found solid explanations.

I have some reasonable guesses, but I'm looking for answers which provide strict definitions of what the numbers in the entries mean, backed up by credible sources. An automatic +1 to all answers which cite sun documentation. My questions are:

  1. What does PSYoungGen refer to? I assume it has something to do with the previous (younger?) generation, but what exactly?
  2. What is the difference between the second triplet of numbers and the first?
  3. Why is a name(PSYoungGen) specified for the first triplet of numbers but not the second?
  4. What does each number (memory size) in the triplet mean. For example in 109884K->14201K(139904K), is the memory before GC 109884k and then it is reduced to 14201K. How is the third number relevant? Why would we require a second set of numbers?
解决方案

Most of it is explained in the GC Tuning Guide (which you would do well to read anyway).

I'm not certain why there's a PSYoungGen in yours; did you change the garbage collector?

这篇关于Java垃圾收集日志消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 18:21