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

[RFC] Fractional resource scheduling (CPU) #259

Closed
pang-wu opened this issue Jul 25, 2022 · 0 comments
Closed

[RFC] Fractional resource scheduling (CPU) #259

pang-wu opened this issue Jul 25, 2022 · 0 comments

Comments

@pang-wu
Copy link
Contributor

pang-wu commented Jul 25, 2022

Problem Statement

Ray support fractional resource scheduling for actors, you can put resources less than 1 to improve the utilization of physical resources. Currently RayDP map Spark executor cores straight to actor CPU, which makes Spark users unable to leverage Ray's advance scheduling scheme.
We also want user able to schedule on GPU machines.

Why Not Custom Resource Scheduling on Spark?

Spark has custom resource scheduling, which, RayDP has integration with. However, Spark's custom resource does not support fractional scheduling: You can not set something like spark.executor.resource.CPU.amount=0.1

Purpose Solution

Add config spark.ray.actor.resource.* where * potentially could be anything. Currently only cpu and gpu are supported as a special case (because case sensitiveness) in this PR.

Example usage:

ray.init(num_cpus=2)

# Allocate 10 Spark executors, which in total will only occupy 1 vCore in Ray's perspective.
spark = raydp.init_spark(app_name="test_cpu_fraction",
                         num_executors=10, executor_cores=1, executor_memory="500 M",
                         configs={"spark.ray.actor.resource.cpu": "0.1"})
@pang-wu pang-wu changed the title [RFC] Fractional resource scheduling (CPU and GPU) [RFC] Fractional resource scheduling (CPU) Aug 1, 2022
@pang-wu pang-wu closed this as completed Aug 1, 2022
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

No branches or pull requests

1 participant