gpt4 book ai didi

tomcat - Tomcat GC日志语句解释

转载 作者:行者123 更新时间:2023-11-28 21:45:00 33 4
gpt4 key购买 nike

这是来 self 的 catalina.out 的声明,由我的 tomcat 服务器生成:

1885.855:[GC [Psyounggen:742996K-> 64359K(761472K)] 2509583K-> 1832973K(4116928K),0.1453610 SECS]

谁能解释一下这里各种数字的含义?

最佳答案

线路分解如下:

1885.85 - 这是 JVM 运行的时间,以秒为单位,因此在您的情况下大约 31 分钟左右,此时 GC 发生了。

[GC - 表示此时发生了 GC。这是Partial GC,有时会显示Full GC

现在,可用于 JVM 的 Total Heap = Young + Old

[PSYoungGen:742996K->64359K(761472K) - 代表年轻代中的并行清理收集器(这是 JVM 中可用的多种 GC 收集器之一)。

GC释放的内存始终是pattern

x->y(z) 

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

所以在你的例子中,742996K->64359K(761472K) - Young 的总大小为 761Mb,当它达到 742Mb 时发生了一次收集,并清除到 64.3Mb即它清除了 678 Mb

2509583K->1832973K(4116928K)

这里表示总堆内存。因此,在 4.1 Gb 的总可能堆中,当 GC 发生时,它已经填充了 2.5 Gb,并且已经下降到 1.83 Gb - 同样的 678 Mb 被清除了。

0.1453610 secs]

整个操作耗时 0.1453610 秒

[Times: user=0.31 sys=0.00, real=0.14 secs] 

显示了 user, system and real times 的分解拍摄。

这只是一行 - 您会寻找一种模式,尤其是其中显示 Full GC 的模式并使用像 GCViewer 这样的日志分析器向您展示吞吐量和其他好东西。

另请阅读 docs from Sun获得基础知识。

进一步阅读:

http://sujitpal.blogspot.com/2006/08/charting-jvm-garbage-collection.html

Java Garbage Collection Log messages

关于tomcat - Tomcat GC日志语句解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4468546/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com