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] Does Ray support NUMA? #50030

Open
Jay-ju opened this issue Jan 23, 2025 · 3 comments
Open

[core] Does Ray support NUMA? #50030

Jay-ju opened this issue Jan 23, 2025 · 3 comments
Labels
core Issues that should be addressed in Ray Core enhancement Request for new feature and/or capability question Just a question :)

Comments

@Jay-ju
Copy link
Contributor

Jay-ju commented Jan 23, 2025

Description

When I set num_cpus, can I bind this num_cpus to a certain cpu? If not currently possible, I will try to do it here.

Use case

No response

@Jay-ju Jay-ju added enhancement Request for new feature and/or capability triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 23, 2025
@cszhu cszhu added the core Issues that should be addressed in Ray Core label Jan 23, 2025
@MortalHappiness MortalHappiness added question Just a question :) and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 25, 2025
@MortalHappiness
Copy link
Member

MortalHappiness commented Jan 25, 2025

I think you can to use custom resources.

@Jay-ju
Copy link
Contributor Author

Jay-ju commented Jan 25, 2025

I think you can to use custom resources.

Can custom resources achieve that when I set num_cpus=0.5 for a certain actor, the executing thread always falls on a certain CPU? And it will not switch CPUs. The main purpose is to reduce the time for CPU core switching.

@Superskyyy
Copy link
Contributor

Superskyyy commented Jan 25, 2025

I think you can to use custom resources.

Can custom resources achieve that when I set num_cpus=0.5 for a certain actor, the executing thread always falls on a certain CPU? And it will not switch CPUs. The main purpose is to reduce the time for CPU core switching.

You can simply achieve the pinned CPU behavior with the Python api os.sched_setaffinity and no setting cpu in Ray alone is purely logical not only it doesn't pin the process to CPU, it also doesn't restrict using more than 0.5 CPUs, it can use 100 potentially.

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 enhancement Request for new feature and/or capability question Just a question :)
Projects
None yet
Development

No branches or pull requests

4 participants