gpt4 book ai didi

java - GC 输出说明

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:26:35 26 4
gpt4 key购买 nike

我正在运行具有以下设置的 Java 应用程序:
-XX:+CMSParallelRemarkEnabled
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintGCApplicationConcurrentTime
-XX:+打印GCDetails
-XX:+PrintGCTimeStamps
-XX:+PrintGCDateStamps
-XX:+PrintHeapAtGC
-XX:+PrintTenuringDistribution

我不确定如何解释相关的 gc 日志(如下)。特别是:

  • 堆在 GC 调用后=31(完整 3):这是否意味着有 31 个次要 GC 和 3 个完整 GC?

  • 是什么触发了连续几行Total time for which the application threads are stoppedApplication Time?是否有可能获得与每一行相关联的时间戳?

GC 日志:

Total time for which application threads were stopped: 0.0046910 seconds  Application time: 0.7946670 seconds  Total time for which application threads were stopped: 0.0002900 seconds  Application time: 1.0153640 seconds  Total time for which application threads were stopped: 0.0002780 seconds  Application time: 1.0161890 seconds  Total time for which application threads were stopped: 0.0002760 seconds  Application time: 1.0145990 seconds  Total time for which application threads were stopped: 0.0002950 seconds  Application time: 0.9999800 seconds  Total time for which application threads were stopped: 0.0002770 seconds  Application time: 1.0151640 secondsTotal time for which application threads were stopped: 0.0002730 secondsApplication time: 0.9996590 seconds  Total time for which application threads were stopped: 0.0002880 seconds  Application time: 0.9624290 seconds  {Heap before GC invocations=30 (full 3):   par new generation   total 131008K, used 130944K [0x00000000eac00000, 0x00000000f2c00000, 0x00000000f2c00000)    eden space 130944K, 100% used [0x00000000eac00000, 0x00000000f2be0000, 0x00000000f2be0000)    from space 64K,   0% used [0x00000000f2bf0000, 0x00000000f2bf0000, 0x00000000f2c00000)    to   space 64K,   0% used [0x00000000f2be0000, 0x00000000f2be0000, 0x00000000f2bf0000)   concurrent mark-sweep generation total 131072K, used 48348K [0x00000000f2c00000, 0x00000000fac00000, 0x00000000fac00000)   concurrent-mark-sweep perm gen total 30000K, used 19518K [0x00000000fac00000, 0x00000000fc94c000, 0x0000000100000000)  2010-05-11T09:30:13.888+0100: 384.955: [GC 384.955: [ParNew  Desired survivor size 32768 bytes, new threshold 0 (max 0)  : 130944K->0K(131008K), 0.0052470 secs] 179292K->48549K(262080K), 0.0053030 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]  Heap after GC invocations=31 (full 3):   par new generation   total 131008K, used 0K [0x00000000eac00000, 0x00000000f2c00000, 0x00000000f2c00000)    eden space 130944K,   0% used [0x00000000eac00000, 0x00000000eac00000,   0x00000000f2be0000)  from space 64K,   0% used [0x00000000f2be0000, 0x00000000f2be0000, 0x00000000f2bf0000)    to   space 64K,   0% used [0x00000000f2bf0000, 0x00000000f2bf0000, 0x00000000f2c00000)   concurrent mark-sweep generation total 131072K, used 48549K [0x00000000f2c00000, 0x00000000fac00000, 0x00000000fac00000)   concurrent-mark-sweep perm gen total 30000K, used 19518K [0x00000000fac00000, 0x00000000fc94c000, 0x0000000100000000)  }Total time for which application threads were stopped: 0.0056410 seconds  Application time: 0.0475220 seconds  Total time for which application threads were stopped: 0.0001800 seconds  Application time: 1.0174830 seconds  Total time for which application threads were stopped: 0.0003820 seconds  Application time: 1.0126350 seconds  Total time for which application threads were stopped: 0.0002750 seconds  Application time: 1.0155910 secondsTotal time for which application threads were stopped: 0.0002680 secondsApplication time: 1.0155580 seconds  Total time for which application threads were stopped: 0.0002880 seconds  Application time: 1.0155480 seconds  Total time for which application threads were stopped: 0.0002970 seconds  Application time: 0.9896810 seconds  

最佳答案

那些没有时间戳的行不是 gc 事件,它们记录了安全点何时发生以及它们持续了多长时间。在 6u21 之前,它们有些不可靠。

关于java - GC 输出说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2809240/

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