Skip to content

[Core] Add worker resource limit - #17179

Merged
jovany-wang merged 4 commits into
ray-project:masterfrom
antgroup:add_worker_resource_limit
Jul 21, 2021
Merged

jovany-wang merged 4 commits into
ray-project:masterfrom
antgroup:add_worker_resource_limit

Conversation

@chenk008

@chenk008 chenk008 commented Jul 19, 2021 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

When ray worker started in container, we add cpushare limit, cpuset, memory limit when enable worker_resource_restricted

We can also use enviroment CUDA_VISIBLE_DEVICES to add nvidia limit in next PR

Related issue number

#16871

Checks

@chenk008
chenk008 force-pushed the add_worker_resource_limit branch 4 times, most recently from f5b3279 to c2d82b0 Compare July 19, 2021 09:46

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This won't be maintainable, can we use boost::json or other json library?

@chenk008 chenk008 Jul 20, 2021 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@simon-mo Here we want to distinguish which resource is instance.

For example, a task request two cpu core. If CPU is instance resource , the allocation resource will be {"CPU":[10000,0,10000]}. If CPU is not instance resource, the allocation resource will be {"CPU":20000}

Comment thread src/ray/common/task/task_spec.cc Resolved
@chenk008
chenk008 force-pushed the add_worker_resource_limit branch from cbc3762 to a1247a5 Compare July 20, 2021 11:38
@chenk008
chenk008 requested review from jovany-wang and simon-mo July 20, 2021 14:17
@ericl ericl removed their assignment Jul 20, 2021
Comment thread src/ray/common/ray_config_def.h Resolved
Comment thread .buildkite/pipeline.yml Resolved
Comment thread python/ray/workers/setup_worker.py Resolved
Comment thread python/ray/workers/setup_worker.py Resolved
Comment thread src/ray/common/task/task_spec.cc Resolved
@jovany-wang

Copy link
Copy Markdown
Contributor

@rkooo567 Do you have any comment?

@chenk008
chenk008 force-pushed the add_worker_resource_limit branch from 9bac832 to 8007b40 Compare July 21, 2021 06:33
@chenk008
chenk008 force-pushed the add_worker_resource_limit branch from 8007b40 to 14d19f0 Compare July 21, 2021 06:35
@jovany-wang
jovany-wang merged commit afd59be into ray-project:master Jul 21, 2021
@jovany-wang
jovany-wang deleted the add_worker_resource_limit branch July 21, 2021 14:00
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.

6 participants