Suggest integrating TiKV heap analysis into the dashboard

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 建议将tikv的heap分析集成进dashboard

| username: 有猫万事足

Currently, TiDB Dashboard does not provide heap analysis for TiKV. When you go to Advanced Debugging → Instance Performance Analysis → Manual Analysis, select TiKV, and check heap, the result will show “Not Applicable.” As shown in the image below:

However, TiKV does provide this interface to some extent. By searching, you can find this interface. I have tried it myself, and it does work. The link is as follows:

First, we need to collect heap files. In version 6.1, we can use commands to collect them.

curl http://127.0.0.1:20180/debug/pprof/heap_activate?interval=10
curl http://127.0.0.1:20180/debug/pprof/heap_list
curl http://127.0.0.1:20180/debug/pprof/heap_deactivate

The first command activates heap collection, collecting every 10 seconds. The second command views the generated heap files, and the third command deactivates heap collection. One thing to note here is that when you deactivate heap collection, it will automatically delete all previously collected heap files. So, before executing the third command, you need to move the heap files to another location.

I have tried these three interfaces myself, and they do work. Although they cannot directly meet the requirements for integration into the dashboard, they are not far off.

I hope these interfaces can be improved so that heap analysis can be integrated into the dashboard like TiDB.

| username: tidb菜鸟一只 | Original post link

Indeed, the flame graph of PD can directly generate a heap file through the interface at http://x.x.x.x:2379/debug/pprof/heap, and you can directly view it using go tool pprof, which is very convenient.

| username: Fly-bird | Original post link

Submit a request to the official team.

| username: TiDBer_小阿飞 | Original post link

Just state your requirements directly.

| username: Connor | Original post link

In the upcoming version 7.5, TiKV will enable heap profiling by default and integrate it into the TiDB dashboard for one-click access.


For related issues, see Improve TiKV OOM diagnosis routine · Issue #15927 · tikv/tikv · GitHub

| username: Jellybean | Original post link

Great, it’s much more convenient with this feature now.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.