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

Cherry pick "[core][state] Task backend improve performance #32251" #32379

Merged

Conversation

cadedaniel
Copy link
Member

@cadedaniel cadedaniel commented Feb 9, 2023

PR #32251
Release blocker #32235

Signed-off-by: rickyyx <rickyx@anyscale.com>

This PR aims to improve performance of the task backend with 3 changes:

Delay conversion of protobuf. We found the protobuf conversion, especially from TaskSpecification to TaskInfoEntry that's needed for the task metadata has been slow, and was in the critical path of task execution and submission. This PR delays the generation of rpc::TaskEvnets before sending in the flush thread. During task execution, it will simply generate a TaskEvent entry that's in-memory with a lower overhead.
Fixed the circular buffer that's used as the underlying data structures for the buffered events. This prevents constant resizing when the buffer gets filled up or flushed, which is costly.
Adjust the niceness of the flushing thread, so it has a lower priority than the worker thread.
Copy link
Contributor

@rickyyx rickyyx left a comment

Choose a reason for hiding this comment

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


via GIPHY

thanks

Copy link
Collaborator

@zhe-thoughts zhe-thoughts left a comment

Choose a reason for hiding this comment

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

Approved for cherry pick into 2.3.0

@cadedaniel cadedaniel merged commit a01d74b into ray-project:releases/2.3.0 Feb 9, 2023
@cadedaniel cadedaniel deleted the cherry-pick-core-perf-fix branch February 9, 2023 22:16
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.

5 participants