Where does the TiKV flame graph come from?

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

Original topic: tikv火焰图从哪里调出来的?

| username: 逍遥_猫

TiKV experiences OOM periodically, and I want to see a flame graph like the one below, but I can’t find the entry point. Could you please advise, experts?

I couldn’t find it in the manual analysis and continuous analysis of the dashboard.

| username: 逍遥_猫 | Original post link

After clicking the flame graph, the image looks like this:

| username: 有猫万事足 | Original post link

Check out these two articles, they explain that the heap analysis of TiKV is not integrated into the dashboard, but there are interfaces available to retrieve it.

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


The first command activates heap collection, collecting data every 10 seconds. The second command lists the generated heap files, and the third command deactivates heap collection. One important thing to note is that when you deactivate heap collection, it will automatically delete all previously collected heap files. Therefore, before executing the third command, you need to move the heap files to another location.
| username: TiDBer_小阿飞 | Original post link

Isn’t the flame graph in Prometheus?

| username: Fly-bird | Original post link

TiKV experiences OOM at regular intervals. You can see the memory usage of KV in Grafana, and then check the SQL statements in the dashboard.

| username: 像风一样的男子 | Original post link

Set the maximum memory usage for kv.

| username: 逍遥_猫 | Original post link

Set the maximum memory storage.block-cache.capacity to 45% of the physical memory.

| username: system | Original post link

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