-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
[Streaming] Revisiting Ray Core streaming to perform I/O fully async avoiding syncing gRPC client and Python generator #42260
Changes from 1 commit
4e80a9b
3218338
fa3b683
e0f2fd0
f633401
74cea0f
42f5e0b
0758428
51c4e6a
7d825f0
6fb1478
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
lint
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3029,13 +3029,14 @@ Status CoreWorker::ReportGeneratorItemReturns( | |
<< reply.total_num_object_consumed(); | ||
if (waiter) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we avoid passing a callback entirely if there's no waiter? Not sure if this is handled any differently internally There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still need to check for signals, waiter is just a back-pressure hook for us to hold down the thread if we want to slow down the producer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
RAY_LOG(DEBUG) << "Total object consumed: " << waiter->TotalObjectConsumed() | ||
<< ". Total object generated: " << waiter->TotalObjectGenerated(); | ||
<< ". Total object generated: " | ||
<< waiter->TotalObjectGenerated(); | ||
if (status.ok()) { | ||
/// Since unary gRPC requests are not ordered, it is possible the stale | ||
/// total value can be replied. Since total object consumed only can | ||
/// increment, we always choose the larger value here. | ||
waiter->UpdateTotalObjectConsumed( | ||
std::max(waiter->TotalObjectConsumed(), reply.total_num_object_consumed())); | ||
waiter->UpdateTotalObjectConsumed(std::max( | ||
waiter->TotalObjectConsumed(), reply.total_num_object_consumed())); | ||
} else { | ||
// TODO(sang): Handle network error more gracefully. | ||
// If the request fails, we should just resume until task finishes without | ||
|
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.
This part doesn't seem to be explained in the PR description. Is this because having a waiter implementation slows down the performance? Also, the result you posted on the PR description include this optimization?
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.
Yeah, removing waiter in particular only brought about ~3% performance improvement which wasn't standing out in any way, but i think it's still make sense to remove it from the surface area provided that it's only relevant for Data but not for RPCs