--- title: "Transport 慢操作日志阈值配置" date: 2026-03-25 lastmod: 2026-03-25 description: "transport.slow_operation_logging_threshold 配置项用于定义触发慢操作警告日志的时间阈值。" tags: ["Transport", "慢操作日志", "性能监控", "调试"] summary: "配置项作用 # transport.slow_operation_logging_threshold 配置项用于定义传输层操作触发慢操作警告日志的时间阈值。 配置项属性 # 配置路径: transport.slow_operation_logging_threshold 数据类型: TimeValue(时间值) 默认值: 5s(5秒) 是否可选: 是 作用域: NodeScope(节点级别) 动态更新: 是(可以动态更新,无需重启) 配置建议 # 默认配置 # transport: slow_operation_logging_threshold: 5s # 默认值 高性能集群 # transport: slow_operation_logging_threshold: 10s # 减少日志噪音 延迟敏感环境 # transport: slow_operation_logging_threshold: 2s # 更早发现性能问题 调试环境 # transport: slow_operation_logging_threshold: 1s # 捕获所有慢操作 注意事项 # 动态更新: 此配置可以动态更新,无需重启节点。 功能说明:" --- ## 配置项作用 `transport.slow_operation_logging_threshold` 配置项用于定义**传输层操作触发慢操作警告日志的时间阈值**。 ## 配置项属性 - **配置路径**: `transport.slow_operation_logging_threshold` - **数据类型**: `TimeValue`(时间值) - **默认值**: `5s`(5秒) - **是否可选**: 是 - **作用域**: NodeScope(节点级别) - **动态更新**: 是(可以动态更新,无需重启) ## 配置建议 ## 默认配置 ```yaml transport: slow_operation_logging_threshold: 5s # 默认值 ``` ## 高性能集群 ```yaml transport: slow_operation_logging_threshold: 10s # 减少日志噪音 ``` ## 延迟敏感环境 ```yaml transport: slow_operation_logging_threshold: 2s # 更早发现性能问题 ``` ## 调试环境 ```yaml transport: slow_operation_logging_threshold: 1s # 捕获所有慢操作 ``` ## 注意事项 1. **动态更新**: 此配置可以动态更新,无需重启节点。 2. **功能说明**: - 当传输线程上的入站消息处理时间超过此配置的阈值时,Easysearch 会记录警告日志 - 帮助识别性能瓶颈和慢操作 - 日志级别为 WARN 3. **阈值选择建议**: - 默认值 5 秒适用于大多数环境 - 高性能集群:可增加到 10-15 秒以减少日志噪音 - 延迟敏感环境:可降低到 2-3 秒以更早发现性能问题 4. **日志输出**: 慢操作日志会包含操作类型、耗时等信息,有助于排查性能问题。 5. **监控建议**: 在生产环境中建议配合监控系统关注慢操作日志,及时发现性能瓶颈。