Dynamically Modify sql storage.block-cache.capacity

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

Original topic: sql动态修改storage.block-cache.capacity

| username: l940399478

[TiDB Usage Environment] Production Environment
[TiDB Version] v5.1.4

[Encountered Problem: Problem Phenomenon and Impact]
The default value of storage.block-cache.capacity used by TiKV is currently causing high memory usage on the nodes. I want to lower it and would like to ask what the impact on the online running business would be if I dynamically reduce it using SQL, and approximately how long the modification would take.

| username: WalterWj | Original post link

You can consider modifying with reload. If you want to reduce the impact, you can specify --transfer-timeout during reload and increase it. This way, when TiKV restarts, it will wait for all leaders to transfer away. Theoretically, the impact is minimal, and there should be no failures, at most just a bit slower.

| username: l940399478 | Original post link

Previously, I modified it through reload, and later the cluster was restarted. After the restart, the previous modifications reverted to the default values. Shouldn’t the modifications have been persisted to the file after the last change? Why did it revert after restarting the instance?

| username: tidb菜鸟一只 | Original post link

Directly using SET config tikv storage.block-cache.capacity=‘GiB’ will take effect immediately and will not affect the business. Then, modify the configuration through tiup cluster set-config tidb-clustername, but do not reload it immediately. Reload it the next time you make other modifications together.

| username: WalterWj | Original post link

It shouldn’t be. If you have modified it using tiup cluster edit-config, it shouldn’t be.

| username: redgame | Original post link

tiup cluster edit-config is feasible.

| username: system | Original post link

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