How to Expand TiKV Memory Usage Online

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

Original topic: 如何在线扩充tikv使用内存

| username: TiDBer_yBunUeUc

[TiDB Usage Environment] Production Environment
The total memory of the current server is 64G. I want to allocate 40G to storage.block_cache.capacity, but I encountered a restriction error. I have already modified the memory-usage-limit parameter in the configuration file to 60G, but it did not take effect.


| username: zhanggame1 | Original post link

If you configure storage.block_cache.capacity, you don’t need to configure limit. The default limit is a fixed multiple of storage.block_cache.capacity, and in my tests, it is 1.25 times.

| username: TiDBer_yBunUeUc | Original post link

Thanks a lot, I followed your answer to lift the restriction. I’ll test it out first to see the effect.

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

Directly setting config tikv storage.block-cache.capacity='GiB' will take effect immediately without impacting the business. Then, modify the configuration through tiup cluster edit-config tidb-clustername but do not reload it immediately. Next time, when making other modifications, reload them all together.

| username: TiDBer_yBunUeUc | Original post link

Yes, it was initially limited by the limit.

| username: tidb狂热爱好者 | Original post link

Can’t handle it? Need to limit memory.

| username: dba远航 | Original post link

Just configure storage.block_cache.capacity.

| username: 普罗米修斯 | Original post link

The maximum system memory is x. For storage.block-cache.capacity, set it to x*0.45. There’s no need to configure anything else separately.

| username: system | Original post link

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