MarkLogic - 错误日志文件中的慢 Fsync Notice/warning 连续
MarkLogic - Slow Fsync Notice/warning in errorlog file continuously
我们在 AWS 上使用 ML 实例。我们使用磁盘来存储数据。
我们的日志文件中出现大量缓慢的 fsync 消息
2019-07-10 00:00:01.756 Info: Memory 46% phys=31816 virt=51033(160%) rss=14950(46%) anon=13748(43%) file=2903(9%) forest=7442(23%) cache=10240(32%) registry=1(0%)
2019-07-10 00:00:02.036 Notice: Slow fsync /data/failover/Forests/test-003-1-1/Journals/Journal-20190709-235839-8921048-15627167181139510-10676271677428093868-9000702, 562.1 KB in 1.637 sec
2019-07-10 00:00:02.042 Notice: Slow fsync /data/Forests/test-modules/Label, 1.316 sec
2019-07-10 00:00:02.043 Notice: Slow fsync /data/Forests/Schemas/Label, 1.305 sec
2019-07-10 00:00:02.043 Notice: Slow fsync /data/Forests/Security/Label, 1.312 sec
2019-07-10 00:00:02.195 Notice: Slow fsync /data/Logs, 1.22 sec
2019-07-10 00:00:13.836 Warning: Slow fsync /data/failover/Forests/test-003-1-1/Label, 2.445 sec
2019-07-10 00:00:13.886 Warning: Slow msync /data/Forests/test-001-1/0000844d/Ordinals, 1 MB in 2.007 sec
2019-07-10 00:00:13.888 Notice: Slow fsync /data/failover/Forests/test-002-1-1/Label, 1.995 sec
2019-07-10 00:00:14.139 Info: Merged 444 MB in 94 sec at 5 MB/sec to /data/Forests/test-001-1/0000844b
2019-07-10 00:00:14.995 Info: Merging 690 MB from /data/Forests/test-001-1/0000844b, /data/Forests/test-001-1/00008449, /data/Forests/test-001-1/0000844a, and /data/Forests/test-001-1/0000844c to /data/Forests/test-001-1/0000844e, timestamp=15627162115706539
2019-07-10 00:00:42.740 Info: Saved 84 MB in 24 sec at 4 MB/sec to /data/failover/Forests/test-002-1-1/000041b5
2019-07-10 00:00:45.861 Info: Merged 193 MB in 58 sec at 3 MB/sec to /data/failover/Forests/test-002-1-1/000041b6
收到上述 "slow fsync" 消息的原因是什么。这是否意味着磁盘速度慢或网络拥塞。如何找出这些消息的原因。
这是否意味着查询执行也将运行缓慢?或任何其他对 MarkLogic 性能的影响?
这个 knowledge base article 有很多关于这些错误消息的详细信息。
特别是,fsync 应该在几毫秒内完成,因此看到它需要大约 2.5 秒才能完成非常令人担忧:
2019-07-10 00:00:13.836 Warning: Slow fsync /data/failover/Forests/test-003-1-1/Label, 2.445 sec
fsync 的目的是“synchronize a file's in-core state with storage device”。缓慢的 fsync 本质上意味着您的磁盘正在 运行ning 缓慢。这样做的影响是直接在磁盘上读取或写入数据可能需要更长的时间。发生这种情况的原因可能有多种。要检查的一些事项:
- 由于故障转移,您在该主机上是否有很多主森林?正确平衡所有主机之间的主森林可能会有所帮助。
- 慢 fsync 和 运行ning 查询之间是否存在关联?优化您的查询以从磁盘中提取更少的文档可能会有所帮助。
- 除了 MarkLogic 运行ning 之外,您在该主机上还有其他软件吗? (NodeJS 应用程序、Splunk 等)让 MarkLogic 运行 在该主机上独占可能会有所帮助。
如果您不能快速确定原因,通常最好与 MarkLogic 支持或您友好的社区顾问一起解决这个问题。
我们在 AWS 上使用 ML 实例。我们使用磁盘来存储数据。 我们的日志文件中出现大量缓慢的 fsync 消息
2019-07-10 00:00:01.756 Info: Memory 46% phys=31816 virt=51033(160%) rss=14950(46%) anon=13748(43%) file=2903(9%) forest=7442(23%) cache=10240(32%) registry=1(0%)
2019-07-10 00:00:02.036 Notice: Slow fsync /data/failover/Forests/test-003-1-1/Journals/Journal-20190709-235839-8921048-15627167181139510-10676271677428093868-9000702, 562.1 KB in 1.637 sec
2019-07-10 00:00:02.042 Notice: Slow fsync /data/Forests/test-modules/Label, 1.316 sec
2019-07-10 00:00:02.043 Notice: Slow fsync /data/Forests/Schemas/Label, 1.305 sec
2019-07-10 00:00:02.043 Notice: Slow fsync /data/Forests/Security/Label, 1.312 sec
2019-07-10 00:00:02.195 Notice: Slow fsync /data/Logs, 1.22 sec
2019-07-10 00:00:13.836 Warning: Slow fsync /data/failover/Forests/test-003-1-1/Label, 2.445 sec
2019-07-10 00:00:13.886 Warning: Slow msync /data/Forests/test-001-1/0000844d/Ordinals, 1 MB in 2.007 sec
2019-07-10 00:00:13.888 Notice: Slow fsync /data/failover/Forests/test-002-1-1/Label, 1.995 sec
2019-07-10 00:00:14.139 Info: Merged 444 MB in 94 sec at 5 MB/sec to /data/Forests/test-001-1/0000844b
2019-07-10 00:00:14.995 Info: Merging 690 MB from /data/Forests/test-001-1/0000844b, /data/Forests/test-001-1/00008449, /data/Forests/test-001-1/0000844a, and /data/Forests/test-001-1/0000844c to /data/Forests/test-001-1/0000844e, timestamp=15627162115706539
2019-07-10 00:00:42.740 Info: Saved 84 MB in 24 sec at 4 MB/sec to /data/failover/Forests/test-002-1-1/000041b5
2019-07-10 00:00:45.861 Info: Merged 193 MB in 58 sec at 3 MB/sec to /data/failover/Forests/test-002-1-1/000041b6
收到上述 "slow fsync" 消息的原因是什么。这是否意味着磁盘速度慢或网络拥塞。如何找出这些消息的原因。
这是否意味着查询执行也将运行缓慢?或任何其他对 MarkLogic 性能的影响?
这个 knowledge base article 有很多关于这些错误消息的详细信息。
特别是,fsync 应该在几毫秒内完成,因此看到它需要大约 2.5 秒才能完成非常令人担忧:
2019-07-10 00:00:13.836 Warning: Slow fsync /data/failover/Forests/test-003-1-1/Label, 2.445 sec
fsync 的目的是“synchronize a file's in-core state with storage device”。缓慢的 fsync 本质上意味着您的磁盘正在 运行ning 缓慢。这样做的影响是直接在磁盘上读取或写入数据可能需要更长的时间。发生这种情况的原因可能有多种。要检查的一些事项:
- 由于故障转移,您在该主机上是否有很多主森林?正确平衡所有主机之间的主森林可能会有所帮助。
- 慢 fsync 和 运行ning 查询之间是否存在关联?优化您的查询以从磁盘中提取更少的文档可能会有所帮助。
- 除了 MarkLogic 运行ning 之外,您在该主机上还有其他软件吗? (NodeJS 应用程序、Splunk 等)让 MarkLogic 运行 在该主机上独占可能会有所帮助。
如果您不能快速确定原因,通常最好与 MarkLogic 支持或您友好的社区顾问一起解决这个问题。