Skip to content

Set worker threads stack size - #812

Draft
NicolasFussberger wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:stack_size_worker
Draft

NicolasFussberger wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:stack_size_worker

Conversation

@NicolasFussberger

@NicolasFussberger NicolasFussberger commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-812: https://eclipse-score.github.io/lifecycle/pr-812/

@NicolasFussberger
NicolasFussberger marked this pull request as ready for review October 20, 2026 14:14
@NicolasFussberger
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};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should never be smaller than the minimum stack size (which is larger than this on aarch64)

This branch was successfully deployed

1 active deployment
workflow-approval — 1128bfe9 Deployed Oct 19, 2026 by NicolasFussberger via Build and test unit-tests-x86_64-qnx / approval #1545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant