This question already has answers here:
Java Garbage Collection Log messages
                                
                                    (3个答案)
                                
                        
                4年前关闭。
            
        

我的Java GC日志:

[GC (Allocation Failure) [PSYoungGen: 267611K->5387K(255488K)] 386801K->125992K(4367872K), 0.0187757 secs] [Times: user=0.05 sys=0.01, real=0.02 secs]
[GC (Allocation Failure) [PSYoungGen: 255243K->4819K(242688K)] 375848K->125488K(4355072K), 0.0157165 secs] [Times: user=0.05 sys=0.00, real=0.02 secs]
2015-10-16 16:30:53.623  INFO 26072 ---      [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5194569f: startup date [Fri Oct 16 13:57:40 CST 2015]; root of context hierarchy
2015-10-16 16:30:53.628  INFO 26072 ---      [       Thread-4] c.e.c.s.c.l.EnniuWeightedLoadBalancer    : Shutting down the Executor Pool for DynamicServerListLoadBalancer
2015-10-16 16:30:53.629  INFO 26072 ---      [       Thread-2] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@63510626: startup date [Fri Oct 16 13:57:44 CST 2015]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@5194569f
2015-10-16 16:30:53.635  INFO 26072 ---      [       Thread-2] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2015-10-16 16:30:53.648  INFO 26072 ---      [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2015-10-16 16:30:53.649  INFO 26072 ---      [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
Heap
 PSYoungGen      total 242688K, used 100212K [0x0000000742800000, 0x000000075bf80000, 0x00000007c0000000)
  eden space 237568K, 40% used [0x0000000742800000,0x0000000748528590,0x0000000751000000)
  from space 5120K, 94% used [0x000000075ba80000,0x000000075bf34d70,0x000000075bf80000)
  to   space 20992K, 0% used [0x0000000759680000,0x0000000759680000,0x000000075ab00000)
 ParOldGen       total 4112384K, used 120668K [0x0000000647800000, 0x0000000742800000, 0x0000000742800000)
  object space 4112384K, 2% used [0x0000000647800000,0x000000064edd72f0,0x0000000742800000)
 Metaspace       used 71725K, capacity 76019K, committed 76248K, reserved 1114112K
  class space    used 9925K, capacity 10922K, committed 10968K, reserved 1048576K


那么,PSYoungGen: 267611K->5387K(255488K)是什么意思?

最佳答案

这意味着年轻一代的大小从267m减少到5m,从而节省了255m的RAM空间。

有关更多详细信息,请参见this link

07-28 13:02