Tomcat GC日志语句的说明 [英] Explanation of Tomcat GC log statements
问题描述
下面是我的catalina.out中的一条声明,由我的tomcat服务器生成:
1885.855:[GC [PSYoungGen:742996K-> 64359K(761472K)] 2509583K - > 1832973K(4116928K),0.1453610秒] [Times:user = 0.31 sys = 0.00,real = 0.14 secs]
有人可以在这里解释各种数字的含义?
该行的分解如下:
<这个以秒为单位的时间是JVM运行的时间,所以在你的情况下大约31分钟左右,GC发生在这个时间点。 p>
[GC
- 表示此时发生GC。这是一个部分GC,有时它会显示 Full GC
现在,可用于JVM的总堆= Young + Old
[PSYoungGen:742996K-> 64359K(761472K)
- 表示并联清理收集器年轻一代(这是JVM中可用的许多类型的GC收集器之一)。
GC释放的内存始终是模式
x - > y(z)
x是GC之前的初始记忆,y是
GC之后的内存,z是在
JVM中允许用于该区域的总
内存
因此在您的示例中,
742996K-> 64359K(761472K)
- 总年轻规模为761Mb,当它达到742 Mb a时收集发生,清理到64.3Mb
,即清理了678 Mb。 (4116928K)
这里表示了总堆内存。
因此,在GC的总数可能达到4.1 Gb时,当GC发生时,它已经填充了2.5 Gb,降到了1.83 Gb--同样的678 Mb也被清除了。
0.1453610秒]
整个操作耗时0.1453610秒
$ b $ pre $ [Times:user = 0.31 sys = 0.00,real = 0.14秒]
显示了 这只是一行 - 你会寻找一个模式,特别是 另请阅读 进一步阅读: http ://sujitpal.blogspot.com/2006/08/charting-jvm-garbage-collection.html Here is a statement from my catalina.out, generated by my tomcat server : 1885.855: [GC [PSYoungGen: 742996K->64359K(761472K)] 2509583K->1832973K(4116928K), 0.1453610 secs] [Times: user=0.31 sys=0.00, real=0.14 secs] Could someone explain the meaning of various numbers in here? The break-up of the line is as followd: Now, the Total Heap available for the JVM = Young + Old The memory freed by GC is always of the pattern
x is the initial memory before GC, y is
the memory after GC, z is the total
memory allowed for that area in the
JVM so in your example,
Here the total heap memory is represented.
So out of a total possible heap of 4.1 Gb, when the GC took place, it had filled 2.5 Gb and it has come down to 1.83 Gb - again the same 678 Mb is what got cleared. This entire operation took 0.1453610 seconds shows the break-up of user, system and real times taken. This is just one line - you would be looking for a pattern esp one that says Also read the docs from Sun to get the basics. Further reading: http://sujitpal.blogspot.com/2006/08/charting-jvm-garbage-collection.html Java Garbage Collection Log messages 这篇关于Tomcat GC日志语句的说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
Full GC
其中
并使用日志分析器,如 GCViewer ,用于向您显示吞吐量和其他好东西。
1885.85
- this in seconds is the amount of time the JVM has been running, so around 31 minutes or so in your case at which point the GC took place.[GC
- states a GC occured at this point in time. This is a Partial GC, sometimes it will show Full GC
[PSYoungGen:742996K->64359K(761472K)
- represents the Parallel Scavenging Collector in the Young generation (which is one of the many types of GC collectors available in the JVM). x->y(z)
742996K->64359K(761472K)
- the total Young size is 761Mb, and when it reached 742 Mb a collection took place, and it cleared down to 64.3Mb
i.e. it cleared up 678 Mb2509583K->1832973K(4116928K)
0.1453610 secs]
[Times: user=0.31 sys=0.00, real=0.14 secs]
Full GC
in it
And use a log analyzer like GCViewer for showing you throughput and other good stuff.