我的 ElasticSearch 5.6 日志中的“GC(分配失败)”是什么意思?

我的 ElasticSearch 5.6 日志中的“GC(分配失败)”是什么意思?

我在 Elasticsearch 5.6.3 日志中不断看到这些。这是否意味着我应该扩展并添加更多 RAM?或者这只是 ElasticSearch 的正常操作?

    [GC (Allocation Failure) [ParNew
 Desired survivor size 11141120 bytes, new threshold 15 (max 15)
 - age 1: 1761848 bytes, 1761848 total
 - age 2: 126464 bytes, 1888312 total
 - age 3: 165056 bytes, 2053368 total
 - age 4: 50584 bytes, 2103952 total
 - age 5: 105120 bytes, 2209072 total
 - age 6: 99072 bytes, 2308144 total
 - age 7: 2024 bytes, 2310168 total
 - age 8: 95632 bytes, 2405800 total
 - age 9: 24960 bytes, 2430760 total
 - age 10: 62552 bytes, 2493312 total
 - age 11: 95816 bytes, 2589128 total
 - age 12: 54248 bytes, 2643376 total
 - age 13: 50704 bytes, 2694080 total
 - age 14: 856 bytes, 2694936 total
 - age 15: 4736 bytes, 2699672 total
 : 134451K->3691K(152320K), 0.0031179 secs] 375121K->244360K(500480K), 0.0032213 secs] [Times: user=0.02 sys=0.01, real=0.00 secs] 
 [GC (Allocation Failure) [ParNew
 Desired survivor size 11141120 bytes, new threshold 15 (max 15)
 - age 1: 731712 bytes, 731712 total
 - age 2: 447632 bytes, 1179344 total
 - age 3: 120736 bytes, 1300080 total
 - age 4: 165056 bytes, 1465136 total
 - age 5: 50584 bytes, 1515720 total
 - age 6: 105120 bytes, 1620840 total
 - age 7: 98552 bytes, 1719392 total
 - age 8: 1872 bytes, 1721264 total
 - age 9: 94736 bytes, 1816000 total
 - age 10: 24664 bytes, 1840664 total
 - age 11: 62256 bytes, 1902920 total
 - age 12: 95816 bytes, 1998736 total
 - age 13: 53696 bytes, 2052432 total
 - age 14: 4112 bytes, 2056544 total
 - age 15: 856 bytes, 2057400 total
 : 134251K->3308K(152320K), 0.0042321 secs] 374920K->243982K(500480K), 0.0043257 secs] [Times: user=0.02 sys=0.01, real=0.00 secs] 

答案1

GC (Allocation Failure)是一个 JVM 消息(不是 Elasticsearch 特有的消息),这可能是内存压力的迹象,但对 JVM 来说并不具有灾难性(这会导致OutOfMemoryError日志行)。它也可能完全无害。

GC (Allocation Failure)意味着 Java 垃圾收集器尝试运行,堆空间不足,然后尝试分配更多内存。这不一定是个坏信号。如果您收到OutOfMemoryError错误并且 JVM 崩溃,那么您就知道自己有麻烦了。

附注/免责声明/全面披露/无论你想要什么:我在一家托管 Elasticsearch 集群的 DBaaS 公司工作。

相关内容