High Memory Usage of Raftstore in Idle Cluster

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

Original topic: 空负载集群 raftstore 占用内存非常高

| username: MrSylar

[TiDB Usage Environment]
[TiDB Version]
v5.4.0
[Encountered Problem: Problem Phenomenon and Impact]
In an idle load cluster, the raftstore of tikv has high usage. Could you please advise on a good solution?
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]

| username: h5n1 | Original post link

Idle load, test cluster?

| username: MrSylar | Original post link

Yes, the development test cluster.

| username: h5n1 | Original post link

I suggest upgrading to 5.4.3 and see.

| username: MrSylar | Original post link

:grinning: Can’t upgrade for now

| username: Jellybean | Original post link

Confirm the block cache parameter of TiKV to see if it is set too high.

| username: h5n1 | Original post link

It seems there is an issue with memory reclamation. How much memory is allocated by TiKV? Try adjusting the ratio with this parameter: raftstore.evict-cache-on-memory-ratio. You need to edit the config and then reload TiKV. The impact after adjustment is not yet clear.

| username: MrSylar | Original post link

This is not high, Grafana is rarely used.

| username: MrSylar | Original post link

I look forward to having a book on TiDB internals. I can’t find these terms in the code or on the monitoring, feeling completely lost.

| username: MrSylar | Original post link

My memory usage after restarting the cluster

| username: redgame | Original post link

Try adjusting the Region division strategy, merging smaller Regions, and reducing the number of Regions.

| username: TiDBer_vfJBUcxl | Original post link

Check this out

| username: xfworld | Original post link

Are the disk write and IO speeds of the TiKV nodes normal?