# Grafana Tidb runtime Monitoring

+ `TiDB-Runtime --> Memroy Usage`

![left](./student-guide/diagram/23-monitor-01-01.png)

------------------------------------------------------------

- The yellow part at the bottom is the memory that TiDB actually uses, and this is the only part that TiDB can control itself. For the rest of the usage, TiDB has no means to intervene. If the yellow part of the usage is not as expected, you can troubleshoot in the normal way, such as big queries, heap profiles, etc.

Other than that, the high usage of any other part is the responsibility of Go, and TiDB itself is completely out of control. The reasons and possible solutions are described below.
  - The blue part indicates the garbage part. This part is controlled by TiDB, even if the more memory is used, the more this part will be. Reduce the pressure of the recycler by enlarging the stack space
  - The orange section, which is generally related to the highest memory usage in history, but is reuse when the heap grows, so it doesn't cause an OOM to be ignored.
  - The red part (used-by-go), which also relates to the historical maximum heap size, but this part is not heap memory and will not be freed.
