Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: sql动态修改storage.block-cache.capacity
[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.
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.
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?
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.
It shouldn’t be. If you have modified it using tiup cluster edit-config
, it shouldn’t be.
tiup cluster edit-config
is feasible.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.