Repository navigation
Tune max_threads_min_free_memory_per_thread/max_insert_threads_min_free_memory_per_thread and add logs - #105542
Conversation
|
Workflow [PR], commit [a0c9de7] Summary: ✅
AI ReviewSummary
Missing context / blind spots
Final Verdict
|
alexey-milovidov
left a comment
There was a problem hiding this comment.
I don't understand this.
|
I have a server with 16 GiB of RAM and 64 cores (16GiB limit is manually passed for reproducing another issue) If you still think that 1GiB/4GiB limit is a way to go - let's keep it, but at least let's add some logs |
|
Also if I understand the formula correctly, it uses available memory to make judgement, but, not all queries uses at least 1GiB/thread |
Tbh I think it's okay... Maybe we can set the limits a little bit smaller. But the current values are realistic; they are set from two observations:
But maybe we should lower the thresholds twice? Anyway, worth collecting more data first. |
I think for "fast" queries that do not require a lot of RAM they will make queries slower, and it may be hard to understand why. But anyway, let's at least add logging for now. |
…e_memory_per_thread-fixes
…e_memory_per_thread-fixes
|
@groeneai, investigate the CI failure on this PR: a The crash is in the new
I have merged the latest |
|
@alexey-milovidov Thanks, investigated. No existing issue or fix PR. STID 2280-2571 is a singleton: 1 hit in 90 days, only this PR run (2026-05-29 20:28, sha Crash signature (raw SIGSEGV, not an ASan report): write fault at an unmapped address inside
So this is not a structural bug in the new subsystem; it is heap corruption whose origin is upstream (a wild write or data race from another component clobbering the queued element). The broader Next step / ask: per our no-speculative-fix policy I will not push a defensive guard into |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 8/8 (100.00%) | Lost baseline coverage: none · Uncovered code |
|
@alexey-milovidov update: I decrypted and symbolized the core dump ( Symbolized crash: Registers: I scanned all 1905 threads in the core: no ASan error-report thread, no thread in a Other findings:
Conclusion: this is a one-off, environment-specific heap corruption with no visible corrupting writer and no reproduction. There is no defect to fix in |
alexey-milovidov
left a comment
There was a problem hiding this comment.
The earlier CHANGES_REQUESTED was about the threshold tuning, which has since been reverted — the remaining diff only adds a DEBUG log in getMaxThreadsForAvailableMemory when the number of threads is lowered, which is what we agreed on ("let's at least add logging for now"). Approving.
CI status: the failed CH Inc sync was two flaky integration jobs (both failed tests passed on in-job retry; the other shard hit a session timeout at 99% with 0 failures) — I have rerun the failed jobs. The Report messages failure only reported transient CI DB insert timeouts (play.clickhouse.com read timeout) from build jobs, unrelated to this PR.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Tune max_threads_min_free_memory_per_thread/max_insert_threads_min_free_memory_per_thread and add logs
Version info
26.6.1.617