elasticsearch - 是否存在一些官方文档来介绍 gc 日志?
问题描述
今天有一个索引慢的日志,
[2020-02-12T15:52:37,418][WARN ][i.i.s.index ] [node-1] [company/KTngnM6ASD-_KdU0FFAWRA] took[22.7s], took_millis[22703], type[_doc], id[20080943028], routing[], source[{...}]
然后检查gc.log
以找出原因,
[2020-02-12T07:52:37.417+0000][22539][safepoint ] Total time for which application threads were stopped: 0.0004935 seconds, Stopping threads took: 0.0001389 seconds
[2020-02-12T07:52:37.586+0000][22539][safepoint ] Application time: 0.1682439 seconds
[2020-02-12T07:52:37.586+0000][22539][safepoint ] Entering safepoint region: GenCollectForAllocation
[2020-02-12T07:52:37.586+0000][22539][gc,start ] GC(315124) Pause Young (Allocation Failure)
[2020-02-12T07:52:37.586+0000][22539][gc,task ] GC(315124) Using 8 workers of 8 for evacuation
[2020-02-12T07:52:37.641+0000][22539][gc,age ] GC(315124) Desired survivor size 34865152 bytes, new threshold 3 (max threshold 6)
[2020-02-12T07:52:37.641+0000][22539][gc,age ] GC(315124) Age table with threshold 3 (max threshold 6)
[2020-02-12T07:52:37.641+0000][22539][gc,age ] GC(315124) - age 1: 22998672 bytes, 22998672 total
[2020-02-12T07:52:37.641+0000][22539][gc,age ] GC(315124) - age 2: 4966112 bytes, 27964784 total
[2020-02-12T07:52:37.641+0000][22539][gc,age ] GC(315124) - age 3: 10219520 bytes, 38184304 total
[2020-02-12T07:52:37.641+0000][22539][gc,age ] GC(315124) - age 4: 4875304 bytes, 43059608 total
[2020-02-12T07:52:37.641+0000][22539][gc,heap ] GC(315124) ParNew: 597611K->52614K(613440K)
[2020-02-12T07:52:37.641+0000][22539][gc,heap ] GC(315124) CMS: 4992477K->4998973K(16095680K)
[2020-02-12T07:52:37.641+0000][22539][gc,metaspace ] GC(315124) Metaspace: 103488K->103488K(1144832K)
[2020-02-12T07:52:37.641+0000][22539][gc ] GC(315124) Pause Young (Allocation Failure) 5459M->4933M(16317M) 54.724ms
[2020-02-12T07:52:37.641+0000][22539][gc,cpu ] GC(315124) User=0.35s Sys=0.00s Real=0.06s
[2020-02-12T07:52:37.641+0000][22539][safepoint ] Leaving safepoint region
似乎 gc 没问题,但有些日志不明白,例如
Entering safepoint region: Cleanup
Entering safepoint region: RevokeBias
Entering safepoint region: GenCollectForAllocation
Cleanup
, RevokeBias
,是什么GenCollectForAllocation
意思?和什么Application time
意思?为什么如此不同?
Application time: 0.1382641 seconds
Application time: 13.2106552 seconds
Application time: 106.3031188 seconds
解决方案
有趣的是,您提到了一些事情,但不提供它们的日志。反正:
RevokeBias
是在撤销偏向锁定时或当偏向锁定的“胖”锁被放气时。
GenCollectForAllocation
- 这就是触发安全点的原因。您可以将其解读为:“分配失败的分代收集器”。还有更多其他原因,仅供参考。
Cleanup
是什么安全点清理任务。
AFAIK,如果您想了解更多详细信息,则需要启用跟踪日志级别。
推荐阅读
- javascript - 根据在 Javascript 中单击的链接选择单选输入
- java - 删除 Java 结果集中的重复行
- php - CakePHP 3.x - toArray() on null
- php - PHP - 如何将 for 循环的结果写入文件
- javascript - 使用请求承诺时来自 Azure 的错误
- c# - 如何通过代码发送本地用户凭据,以便窗口应用程序可以在本地用户上下文中运行
- cmd - cmd中的颤振错误
- javascript - Firestore:多个“数组包含”
- rabbitmq - spring amqp 在不需要时关闭兔子监听器
- angular - 角材料 - 空徽章