drainer 进程内存使用率很高

tidb 集群版本:4.0.15 版本
tidb 在跑了1个1G的大事务后,drainer 的进程内存使用率就涨上去了,同时还有 binlog_drainer_checkpoint_tso_no_change_for_1m的告警,但是binlog_drainer_checkpoint_tso_no_change_for_1m 告警恢复后,drainer 的进程内存使用率 也没有降下去,大家有遇到过类似的问题吗?

重启drainer后应该内存占用会下去

做个 heap 看一下吧
curl http://{drainer_ip}/debug/pprof/heap?seconds=30 > heap.out

当时执行这个,但是出来的结果有也就是目标文件是有问题的,不知道为什么

再收集啊,然后收集出来的文件用go tool pprof进行查看。
go tool pprof -http={xx.xx.xx.xx}:8080 heap.out

1 个赞