Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Clear CPU affinity for worker processes #36816

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

stephanie-wang
Copy link
Contributor

Why are these changes needed?

Clear CPU affinity for worker processes when forking from raylet. See #35984 for more details.

This PR is not tested because the best way to do so would require sudo permissions.

Related issue number

Closes #35984.

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Stephanie Wang <swang@cs.berkeley.edu>

// Clear any CPU affinity that might have been inherited from the raylet.
// See https://github.com/ray-project/ray/issues/35984.
cpu_set_t mask;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to add a test for this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know of a good way to do it (in the PR description: This PR is not tested because the best way to do so would require sudo permissions.). What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops. Sorry I missed that comment. I think it is okay to merge if you manually have checked it then.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lmk if you tested manually!

@rkooo567 rkooo567 added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Jun 26, 2023
@stephanie-wang stephanie-wang removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Jun 27, 2023
@rkooo567 rkooo567 merged commit 92cc3c3 into ray-project:master Jun 29, 2023
rkooo567 added a commit to rkooo567/ray that referenced this pull request Jun 29, 2023
jjyao pushed a commit that referenced this pull request Jun 29, 2023
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
Clear CPU affinity for worker processes when forking from raylet. See ray-project#35984 for more details.

This PR is not tested because the best way to do so would require sudo permissions.

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
…6816)" (ray-project#36958)

This reverts commit 92cc3c3.

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
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.

[Core] Workers shouldn't inherit raylet's cpu affinity setttings.
2 participants