Skip to content

Optionally set COMMODORE_CATALOG_COMPILE_PROCESSES based on cluster's CPU limit#42

Merged
simu merged 2 commits into
mainfrom
feat/more-resource-tuning
May 29, 2026
Merged

Optionally set COMMODORE_CATALOG_COMPILE_PROCESSES based on cluster's CPU limit#42
simu merged 2 commits into
mainfrom
feat/more-resource-tuning

Conversation

@simu

@simu simu commented May 28, 2026

Copy link
Copy Markdown
Member

Users can opt-in to setting each CI job's environment variable COMMODORE_CATALOG_COMPILE_PROCESSES based on the cluster's CPU limit by setting the environment variable COMMODORE_PROCESSES_FROM_CPU_LIMIT to a non-empty value in their GitLab CI config.

For CI configurations that opt-in to this feature, we compute the Commodore process count based on the cluster's CPU limit by rounding down to the next nearest integer, clamped at 1.

The CPU limit parser supports all supported K8s quantity values (cf. https://kubernetes.io/docs/reference/kubernetes-api/definitions/quantity-resource/)

For CI configurations that don't opt-in to this feature, COMMODORE_CATALOG_COMPILE_PROCESSES is set to 0 which allows Commodore to auto-detect the number of worker processes to use, preserving the Commodore v1.33.1 and older behavior.

Checklist

  • The PR has a meaningful title. It will be used to auto-generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Update the documentation.
  • Categorize the PR by adding one of the following labels so it shows up
    in the correct changelog section:
    bug, enhancement, documentation, change, breaking, dependency, internal

@simu simu added the enhancement New feature or request label May 28, 2026
Base automatically changed from renovate/projectsyn-commodore-1.x to main May 28, 2026 14:30
@simu
simu force-pushed the feat/more-resource-tuning branch from d110653 to c29fa84 Compare May 28, 2026 14:45
@simu
simu changed the base branch from main to feat/ci-job-memory-requests May 28, 2026 14:46
@simu
simu force-pushed the feat/more-resource-tuning branch from c29fa84 to fda7b30 Compare May 28, 2026 14:46
@simu simu changed the title Give users more options to tune CI job resource usage Optionally set COMMODORE_CATALOG_COMPILE_PROCESSES based on cluster's CPU limit May 28, 2026
@simu
simu force-pushed the feat/more-resource-tuning branch from fda7b30 to 667e25c Compare May 28, 2026 14:56
@simu
simu marked this pull request as ready for review May 28, 2026 15:04
Base automatically changed from feat/ci-job-memory-requests to main May 28, 2026 15:19
@simu
simu force-pushed the feat/more-resource-tuning branch from 667e25c to bf3ee9a Compare May 28, 2026 15:19
@simu
simu requested a review from a team May 28, 2026 15:24
@simu
simu force-pushed the feat/more-resource-tuning branch 3 times, most recently from 94eea44 to 8229cf2 Compare May 29, 2026 07:40
simu added 2 commits May 29, 2026 09:55
…'s CPU limit

Users can opt-in to setting each CI job's environment variable
`COMMODORE_CATALOG_COMPILE_PROCESSES` based on the cluster's CPU limit
by setting the environment variable `COMMODORE_PROCESSES_FROM_CPU_LIMIT`
to a non-empty value in their GitLab CI config.

For CI configurations that opt-in to this feature, we compute the
Commodore process count based on the cluster's CPU limit by rounding
down to the next nearest integer, clamped at 1.

Currently, the CPU limit parser supports unsuffixed CPU limits and
milli-CPU CPU limits and will raise an error for other CPU limit
configurations.

For CI configurations that don't opt-in to this feature,
`COMMODORE_CATALOG_COMPILE_PROCESSES` is set to `0` which allows
Commodore to auto-detect the number of worker processes to use,
preserving the Commodore v1.33.1 and older behavior.
@simu
simu force-pushed the feat/more-resource-tuning branch from 8229cf2 to c4a201d Compare May 29, 2026 08:06
@simu
simu merged commit ab336dc into main May 29, 2026
9 checks passed
@simu
simu deleted the feat/more-resource-tuning branch May 29, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants