Skip to content

feat(helm): cap numerical backend threads via defaults.threadpoolLimit - #31

Open
lewisjared wants to merge 2 commits into
mainfrom
feat/threadpool-limit
Open

feat(helm): cap numerical backend threads via defaults.threadpoolLimit#31
lewisjared wants to merge 2 commits into
mainfrom
feat/threadpool-limit

Conversation

@lewisjared

Copy link
Copy Markdown
Contributor

Split out of #29 so the worker tuning feature and the esmvaltool config fix can be reviewed separately.

  • Adds defaults.threadpoolLimit (default 4), rendered as OMP_NUM_THREADS, OPENBLAS_NUM_THREADS, MKL_NUM_THREADS, NUMEXPR_NUM_THREADS, VECLIB_MAXIMUM_THREADS and BLIS_NUM_THREADS in every worker Secret, per the memory use guide. Without a cap, numpy/scipy size their thread pools off the host core count, so parallel diagnostics oversubscribe the CPUs on large nodes.
  • Tunable per provider via providers.<name>.threadpoolLimit. An individual variable set in env wins over the cap, and null leaves the backends unbounded.
  • The name follows threadpoolctl, which manages exactly this set of libraries, so it maps cleanly to a threadpool_limit setting if this moves upstream into climate-ref itself.
  • Guards the provider Secret template against a nulled env override, which reaches the template as nil rather than an empty map.

This may be better placed upstream (climate-ref could set these in the executor, e.g. via threadpoolctl), in which case this chart value becomes a passthrough or goes away.

Renders OMP_NUM_THREADS and the five sibling backend variables into
every worker Secret, per the upstream memory use guide. Without a cap,
numpy and scipy size their thread pools off the host core count, so
parallel diagnostics oversubscribe the CPUs on large nodes.
The name follows threadpoolctl, which manages the same libraries.
Tunable per provider, with an explicit env key winning over the cap.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@lewisjared, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dfa19dab-c0a2-431d-b020-fd4dd71201e9

📥 Commits

Reviewing files that changed from the base of the PR and between f0655b5 and b4c0a71.

📒 Files selected for processing (5)
  • changelog/31.improvement.md
  • helm/README.md
  • helm/templates/providers/secret.yaml
  • helm/values.yaml
  • tests/test_helm_render.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/threadpool-limit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant