Repository navigation
Add dynamic untracked memory limits for more precise memory tracking - #64423
Conversation
|
This is an automated comment for commit 2c193a7 with description of existing statuses. It's updated for the latest CI running ⏳ Click here to open a full report in a separate page
Successful checks
|
…e into precise-memtracking
|
I'm not sure what's wrong with the Upgrade check. Does anyone have an idea? I've added a new setting to the history and it does not show up, but the check is still failing. Changed settings are not reflected in settings changes history (see changed_settings.txt) - FAIL New settings are not reflected in settings changes history (see new_settings.txt) - FAIL |
|
Okay, merge master and CI tests rerun fixed the problem. Tests |
|
This has broken |
|
It might have also broken test_failed_async_inserts/test.py::test_failed_async_inserts https://s3.amazonaws.com/clickhouse-test-reports/0/2da27f4deeb4141b154f16bf4420a1018a97b610/integration_tests__release__[2_4].html Integration tests were not run in the last execution, so it's hard to say |
…ory_limit is constant
…ed_memory_limit is constant
The current memory tracker has an error of up to `untracked_memory_limit = 4MB` per thread. Consider a ClickHouse server running with 8GB RAM and a standard `max_server_memory_usage_to_ram_ratio = 0.9` server setting. If there are 1000 threads (and every thread has 800KB on average) OOM can happen before any query is stopped with `MEMORY_LIMIT_EXCEEDED`. We need total untracked memory to be proportional to current memory usage regardless of the number of threads. To make it fit into 10% RAM we want an error to be less than e.g. 6%. To achieve it we need `untracked_memory_limit` to be updated dynamically and be proportional to current thread memory usage for threads with small memory footprint: `untracked_memory_limit = clamp(already_tracked / 16, 4KB, 4MB)` Resubmit of: ClickHouse#64423 Co-authored-by: Azat Khuzhin <[email protected]>
The current memory tracker has an error of up to `untracked_memory_limit = 4MB` per thread. Consider a ClickHouse server running with 8GB RAM and a standard `max_server_memory_usage_to_ram_ratio = 0.9` server setting. If there are 1000 threads (and every thread has 800KB on average) OOM can happen before any query is stopped with `MEMORY_LIMIT_EXCEEDED`. We need total untracked memory to be proportional to current memory usage regardless of the number of threads. To make it fit into 10% RAM we want an error to be less than e.g. 6%. To achieve it we need `untracked_memory_limit` to be updated dynamically and be proportional to current thread memory usage for threads with small memory footprint: `untracked_memory_limit = clamp(already_tracked / 16, 4KB, 4MB)` Resubmit of: ClickHouse#64423 Co-authored-by: Azat Khuzhin <[email protected]>
The current memory tracker has an error of up to `untracked_memory_limit = 4MB` per thread. Consider a ClickHouse server running with 8GB RAM and a standard `max_server_memory_usage_to_ram_ratio = 0.9` server setting. If there are 1000 threads (and every thread has 800KB on average) OOM can happen before any query is stopped with `MEMORY_LIMIT_EXCEEDED`. We need total untracked memory to be proportional to current memory usage regardless of the number of threads. To make it fit into 10% RAM we want an error to be less than e.g. 6%. To achieve it we need `untracked_memory_limit` to be updated dynamically and be proportional to current thread memory usage for threads with small memory footprint: `untracked_memory_limit = clamp(already_tracked / 16, 4KB, 4MB)` Resubmit of: ClickHouse#64423 Co-authored-by: Azat Khuzhin <[email protected]>
The current memory tracker has an error of up to `untracked_memory_limit = 4MB` per thread. Consider a ClickHouse server running with 8GB RAM and a standard `max_server_memory_usage_to_ram_ratio = 0.9` server setting. If there are 1000 threads (and every thread has 800KB on average) OOM can happen before any query is stopped with `MEMORY_LIMIT_EXCEEDED`. We need total untracked memory to be proportional to current memory usage regardless of the number of threads. To make it fit into 10% RAM we want an error to be less than e.g. 6%. To achieve it we need `untracked_memory_limit` to be updated dynamically and be proportional to current thread memory usage for threads with small memory footprint: `untracked_memory_limit = clamp(already_tracked / 16, 4KB, 4MB)` Resubmit of: ClickHouse#64423 Co-authored-by: Azat Khuzhin <[email protected]>
The current memory tracker has an error of up to `untracked_memory_limit = 4MB` per thread. Consider a ClickHouse server running with 8GB RAM and a standard `max_server_memory_usage_to_ram_ratio = 0.9` server setting. If there are 1000 threads (and every thread has 800KB on average) OOM can happen before any query is stopped with `MEMORY_LIMIT_EXCEEDED`. We need total untracked memory to be proportional to current memory usage regardless of the number of threads. To make it fit into 10% RAM we want an error to be less than e.g. 6%. To achieve it we need `untracked_memory_limit` to be updated dynamically and be proportional to current thread memory usage for threads with small memory footprint: `untracked_memory_limit = clamp(already_tracked / 16, 4KB, 4MB)` Resubmit of: ClickHouse#64423 Co-authored-by: Azat Khuzhin <[email protected]>
The current memory tracker has an error of up to
untracked_memory_limit = 4MBper thread. Consider a ClickHouse server running with 8GB RAM and a standardmax_server_memory_usage_to_ram_ratio = 0.9server setting. If there are 1000 threads (and every thread has 800KB on average) OOM can happen before any query is stopped withMEMORY_LIMIT_EXCEEDED.We need total untracked memory to be proportional to current memory usage regardless of the number of threads. To make it fit into 10% RAM we want an error to be less than e.g. 6%. To achieve it we need
untracked_memory_limitto be updated dynamically and be proportional to current thread memory usage for threads with small memory footprint:untracked_memory_limit = clamp(already_tracked / 16, 4KB, 4MB).Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
This PR was reverted
Documentation entry for user-facing changes
CI Settings
NOTE: If your merge the PR with modified CI you MUST KNOW what you are doing
NOTE: Checked options will be applied if set before CI RunConfig/PrepareRunConfig step