Skip to content

[8.0] Add cgroup2 limit support#8110

Merged
fstagni merged 1 commit intoDIRACGrid:rel-v8r0from
sfayer:add_cgroups
Apr 15, 2025
Merged

[8.0] Add cgroup2 limit support#8110
fstagni merged 1 commit intoDIRACGrid:rel-v8r0from
sfayer:add_cgroups

Conversation

@sfayer
Copy link
Copy Markdown
Member

@sfayer sfayer commented Mar 28, 2025

Hi,

Here is an initial attempt at cgroup2 support via delegation... It supports MemoryLimitMB (int) and MemoryNoSwap (bool) options in ceParameters for both InProcessCE and SingularityCE (although I've not tested the latter). It's opportunistic, so should be transparent on sites that don't have cgroup delegation support (just running the payload unrestricted as before).

A hint for LHCb deployment: I suggest setting your limit a little shy of 4G, maybe around 3900 (as you won't get any benefit at sites with 4096 slots otherwise, as the pilot won't be protected without a small gap).

Closes #7853.

Regards,
Simon

BEGINRELEASENOTES
*WorkloadManagement
NEW: cgroup2 limit support
ENDRELEASENOTES

@DIRACGridBot DIRACGridBot added the alsoTargeting:integration Cherry pick this PR to integration after merge label Mar 28, 2025
@sfayer sfayer force-pushed the add_cgroups branch 2 times, most recently from 43bbaf7 to 0afde78 Compare March 28, 2025 17:00
@sfayer sfayer marked this pull request as ready for review March 28, 2025 17:23
Comment thread src/DIRAC/Core/Utilities/CGroups2.py Outdated
Comment thread src/DIRAC/Core/Utilities/CGroups2.py Outdated
@sfayer sfayer force-pushed the add_cgroups branch 2 times, most recently from 2c98b36 to db003e2 Compare April 9, 2025 11:54
@sfayer
Copy link
Copy Markdown
Member Author

sfayer commented Apr 9, 2025

Thanks for the review (I didn't notice it for a while, the notification must have got lost in the flurry of recent diracx activity :-)

I've added support for setting a CPU limit and written the requested documentation.

Regards,
Simon

@fstagni fstagni merged commit 16a2dd1 into DIRACGrid:rel-v8r0 Apr 15, 2025
34 of 35 checks passed
@DIRACGridBot DIRACGridBot added sweep:done All sweeping actions have been done for this PR sweep:failed Sweeping failed and needs manual intervention labels Apr 15, 2025
@DIRACGridBot
Copy link
Copy Markdown

Sweep summary

Sweep ran in https://github.com/DIRACGrid/DIRAC/actions/runs/14472511501

Failed:

  • integration
    cherry-pick 16a2dd1 into integration failed
    check merge conflicts on a local copy of this repository
    git fetch upstream
    git checkout upstream/integration -b cherry-pick-2-16a2dd1a3-integration
    git cherry-pick -x -m 1 16a2dd1a3
    # Fix the conflicts
    git cherry-pick --continue
    git commit --amend -m 'sweep: #8110 Add cgroup2 limit support' --author='Simon Fayer <sf105@ic.ac.uk>'
    git push -u origin cherry-pick-2-16a2dd1a3-integration
    
    # If you have the GitHub CLI installed the PR can be made with
    gh pr create \
         --label 'sweep:from rel-v8r0' \
         --base integration \
         --repo DIRACGrid/DIRAC \
         --title '[sweep:integration] Add cgroup2 limit support' \
         --body 'Sweep #8110 `Add cgroup2 limit support` to `integration`.
    
    Adding original author @sfayer as watcher.
    
    BEGINRELEASENOTES
    *WorkloadManagement
    NEW: cgroup2 limit support
    ENDRELEASENOTES
    Closes #8158'

fstagni added a commit to fstagni/DIRAC that referenced this pull request Apr 16, 2025
sfayer added a commit to sfayer/DIRAC that referenced this pull request Apr 16, 2025
maxnoe pushed a commit to maxnoe/DIRAC that referenced this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alsoTargeting:integration Cherry pick this PR to integration after merge sweep:done All sweeping actions have been done for this PR sweep:failed Sweeping failed and needs manual intervention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants