Methods for Limiting TiKV Memory

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

Original topic: Tikv内存限制方法

| username: TiDBer_NGmQDBXo

【TiDB Version】V 6.0
【Problem Encountered】Is there any way to limit the memory usage of TiKV? For example, I want to set a maximum limit of 2G or 1G to observe the performance loss.

| username: ablewang_xiaobo | Original post link

Adjust the following parameters:
storage.block-cache → capacity
rocksdb.defaultcf | rocksdb.writecf | rocksdb.lockcf → block-cache-size
raft-engine → memory-limit

| username: xfworld | Original post link

You can set limits, but TiKV itself requires a large amount of memory to achieve high performance, so such limits are not very meaningful.

| username: cs58_dba | Original post link

If there is no room for optimization in the SQL itself, it is recommended to limit the number of connections. Avoid having too many connections at once, which could crash the service.

| username: TiDBer_NGmQDBXo | Original post link

Okay, thank you everyone.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.