Skip to content

Conversation

israbbani
Copy link
Contributor

@israbbani israbbani commented Oct 16, 2025

For more details about the resource isolation project see #54703.

This PR moves the driver into the workers cgroup when it registers with the NodeManager. Also updates the tests to reflect this.

This now includes changes from #57800.

@israbbani israbbani added core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests labels Oct 16, 2025
for line in leaf_cgroup_lines:
root_procs_file.write(line.strip())
root_procs_file.flush()
# 3) Move the current process back into the _ROOT_CGROUP
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This wasn't previously required because the Driver (for ray.init) was moved by the test script into the LEAF_CGROUP_ and never touched again.

However, now it will be moved by the raylet back into _TEST_CGROUP when ray stops.

@israbbani israbbani marked this pull request as ready for review October 16, 2025 17:59
@israbbani israbbani requested a review from a team as a code owner October 16, 2025 17:59
cursor[bot]

This comment was marked as outdated.

israbbani and others added 5 commits October 16, 2025 15:07
… to calculate weights (#57800)

This PR stacks on #57776. 

For more details about the resource isolation project see
#54703.

When Ray calculates the number of cpus available on the machine, it
checks to see if it's running in a container. However, it truncates the
number of cpus.

In this PR, 
- If the number of CPUs on the machine is <=
`DEFAULT_MIN_SYSTEM_RESERVED_CPU_CORES`, then raise a ValueError.
Previously, this was < `DEFAULT_MIN_SYSTEM_RESERVED_CPU_CORES`.
- Return fractional CPUs from `ray._private.utils.get_num_cpus` if an
optional parameter is set to True.

Signed-off-by: irabbani <[email protected]>
Signed-off-by: irabbani <[email protected]>
cursor[bot]

This comment was marked as outdated.

@israbbani israbbani changed the title [core] (cgroups 18/n) Moving the driver into the system cgroup. [core] (cgroups 18/n) Moving the driver into the workers cgroup. Oct 16, 2025
Signed-off-by: irabbani <[email protected]>
@edoakes edoakes merged commit c142e8d into master Oct 17, 2025
6 checks passed
@edoakes edoakes deleted the irabbani/cgroups-18 branch October 17, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants