Files
geedge-jira/md/OMPUB-1031.md
2025-09-14 21:52:36 +00:00

136 lines
4.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 【E21现场】OLAP在升级23.07版本后部分Clickhouse服务器使用率超80%
| ID | Creation Date | Assignee | Status |
|----|----------------|----------|--------|
| OMPUB-1031 | 2023-10-12T21:13:20.000+0800 | 戚岱杰 | 已解决 |
---
OLAP在升级23.07版本后Clickhouse服务器Server43、Server44、Server47、Server48、Server49的/data目录使用率超过80%其余Clickhouse服务器/data使用率为40%--60%。**qidaijie** commented on *2023-10-13T10:07:40.880+0800*:
现场排查:
# 数据情况:
## Server35/36为Query节点不存储数据因此磁盘使用率较低。
## 对比存储配额趋势图较升级前2023-10-06每天多3TB左右的数据。
### 其原因为22.11版本分中心ETL汇聚存在丢日志的情况升级23.07后程序优化除夜间最高峰时期总量85w/s会存在3-5%的日志丢失,其余时间均正常。
### !存储配额趋势图.png|thumbnail!!日志量(总量).png|thumbnail!
# 存储配置情况:
## 现场存储配额:
### Max Days设置为40天。
### Security Events表TTL为40天其余为30天原因参考OMPUB-860
## 对比Clickhouse表数据块时间
### Server43/44/47/48/49异常节点数据范围均为40天。
#### !异常节点数据片时间图.png|thumbnail!
### 对比Server37/38正常节点session_record表数据范围为30天security_event表数据范围为40天。
#### !正常节点数据片时间图.png|thumbnail!
## 通过Clickhouse查询表信息Server43/44/47/48/49 session_record表均携带30天的TTL配置参考[^query.desc.session_record_local.txt]
 
综上怀疑为表TTL在部分节点未成功删除数据。
---
**qidaijie** commented on *2023-10-13T17:50:41.508+0800*:
目前已确认为Server43/44/47/48/49服务器Clickhouse未执行TTL因TTL功能为组件自控制未执行原因待后续继续排查任务暂降级为Medium。
 
临时处置方式通过手动触发的方式将Server43/44/47/48/49服务器session_record表超过TTL配置时间30天的数据删除。
---
**qidaijie** commented on *2023-11-03T11:08:21.022+0800*:
经过近期对比排查:
* 选取Server 43节点进行手动触发 *session_record表单分区* 的TTL操作执行后该节点session_record表恢复TTL功能。
** 后对Server 44节点进行上述重复操作未恢复。
* 异常Clickhouse节点{*}也在执行TTL删除操作{*},但比其他正常节点慢,且{*}无法完全删除{*}全部的过期数据。
** 例如有300GB的文件需要删除只删除了200GB。
* 整体观察Clickhouse集群数据节点每个节点的数据摄入量、Merge频率没有较大差异。
后续继续排查以及确认是否为Clickhouse TTL机制存在相关BUG。
---
**qidaijie** commented on *2023-11-24T19:13:29.431+0800*:
目前现场保留Server 47和Server 49两个节点持续观察其余节点TTL功能均已恢复正常。
---
**qidaijie** commented on *2024-01-04T10:05:56.047+0800*:
后经过测试已复现该问题为Clickhouse 21.x版本BUG详细内容见[Clickhouse TTL失效问题排查|https://docs.geedge.net/pages/viewpage.action?pageId=124752639]
---
**qidaijie** commented on *2024-02-22T11:28:20.154+0800*:
后续操作在NZ → Componet Status → Clickhouse Status中增加了未删除数据块个数相关监控图表如图
!TTL监控.png|thumbnail!
 
目前情况Clickhouse节点使用率基本保持在35%左右保留的Server 47和Server 49两个节点在50%左右,如下图:
!CK磁盘使用率-20240221.png|thumbnail!
 
由于该问题是由Clickhouse 21.x版本BUG引起需升级版本解决目前磁盘使用率相对较低流量稳定的情况下使用率将维持在这个范围暂将bug状态改为持续追踪状态。
---
## Attachments
**51963/CK磁盘使用率-20240221.png**
---
**45812/query.desc.session_record_local.txt**
---
**45799/sdb1.jpg**
---
**51962/TTL监控.png**
---
**45809/存储配额趋势图.png**
---
**45811/日志量(总量).png**
---
**45810/异常节点数据片时间图.png**
---
**45813/正常节点数据片时间图.png**
---