Repository navigation
Set worker threads stack size - #812
Draft
NicolasFussberger wants to merge 1 commit into
Draft
NicolasFussberger wants to merge 1 commit into
NicolasFussberger wants to merge 1 commit into
Conversation
Contributor
|
Documentation preview for this pull request is available at: |
NicolasFussberger
marked this pull request as ready for review
October 20, 2026 14:14
NicolasFussberger
requested review from
FScholPer,
MaciejKaszynski,
anmittag,
antonkri,
pawelrutkaq and
ramceb
as code owners
October 20, 2026 14:14
NicolasFussberger
marked this pull request as draft
October 22, 2026 07:42
| #if defined(__SANITIZE_ADDRESS__) || defined(__SANITIZE_THREAD__) | ||
| constexpr std::size_t kWorkerThreadStackSize{0U}; | ||
| #else | ||
| constexpr std::size_t kWorkerThreadStackSize{32UL * 1024UL}; |
Contributor
Author
There was a problem hiding this comment.
Should never be smaller than the minimum stack size (which is larger than this on aarch64)
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current architecture relies on having a larger number of threads, due to blocking waits on worker threads instead of asynchronous timeout monitoring.
Each thread comes with a memory overhead, which can be mitigated by setting a smaller stack size than the default size.
A first rough analysis by AI concluded a stack size of 12KB is used in the worst case. Having 32KB should give enough buffer.