-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Doc] Revamp ray core design patterns doc [11/n]: limit running tasks #29046
Conversation
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, 2 nits
Signed-off-by: Jiajun Yao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Jiajun for making this more clear!
|
||
.. note:: | ||
|
||
If you submit a finite number of tasks, it's unlikely that you will hit the issue mentioned above since each task only uses a small amount of memory in the queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"each task" -> "each task spec" (or whatever we call it)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
task spec is internal implementation details. I feel just calling task is better. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to make it clear the memory usage at this point is only for bookkeeping of tasks, not the memory actually used by tasks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
|
||
You have a data processing workload that processes each input file independently using Ray :ref:`remote functions <ray-remote-functions>`. | ||
Since each task needs to load the input data into heap memory and do the processing, running too many of them can cause OOM. | ||
In this case, you can use the ``memory`` resource to limit the number of concurrently running tasks (usage of other resources like ``num_cpus`` can achieve the same goal as well). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably add a note to clarify that memory is a logical resource.
Also, it would be nice to link or mention @clarng's ongoing memory monitor work.
Signed-off-by: Jiajun Yao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last comments!
|
||
.. note:: | ||
|
||
There is active work ongoing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops. Yea, I was trying to link to @clarng' work but seems that part of doc is not checked in yet. So I'll leave it out for now.
Signed-off-by: Stephanie Wang <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
…ray-project#29046) Create a new design pattern for limiting the number of running tasks. Also distinguish it from an existing pattern of limiting pending tasks given there are confusions about these two patterns. Signed-off-by: Jiajun Yao <[email protected]> Signed-off-by: Stephanie Wang <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Jiajun Yao [email protected]
Why are these changes needed?
Create a new design pattern for limiting the number of running tasks. Also distinguish it from an existing pattern of limiting pending tasks given there are confusions about these two patterns.
Related issue number
#27048
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.