memory_usage_limit is deduced much less then expected #9745
Labels
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
affects-8.5
This bug affects the 8.5.x(LTS) versions.
component/storage
severity/major
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
memory_usage_limit is inferred by block_cache_cap
https://github.com/pingcap/tidb-engine-ext/blob/521fd9dbc55e58646045d88f91c3c35db50b5981/src/config/mod.rs#L3597-L3598
which is set by
https://github.com/pingcap/tidb-engine-ext/blob/521fd9dbc55e58646045d88f91c3c35db50b5981/src/config/mod.rs#L3795-L3805
and modified by
https://github.com/pingcap/tidb-engine-ext/blob/521fd9dbc55e58646045d88f91c3c35db50b5981/proxy_components/proxy_server/src/config.rs#L405-L408
See pingcap/tidb-engine-ext@2f2900a.
And tiflash proxy limit the memory for CF to a small number.
https://github.com/pingcap/tidb-engine-ext/blob/521fd9dbc55e58646045d88f91c3c35db50b5981/proxy_components/proxy_server/src/config.rs#L123-L134
The logic affects all released versions including LTS 6.1/6.5/7.1/7.5/8.1/8.5
As a result, consider an enough big memory, the limit could be:
So basicly, the memory limit is 0.05 * total available machine memory / 0.45 * 0.75.
Note, even if the raft-engine is used, we still take the raft_db memory size into account.
And because there is a memory high water machanism, the memory usage on proxy will time another 0.1 factor
So as a result,
The text was updated successfully, but these errors were encountered: