-
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
[core] Cache runtime env core worker #48928
base: master
Are you sure you want to change the base?
[core] Cache runtime env core worker #48928
Conversation
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: hjiang <[email protected]>
ef4760a
to
ae5543b
Compare
Signed-off-by: hjiang <[email protected]> Signed-off-by: hjiang <[email protected]>
ae5543b
to
321dc87
Compare
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.
Is the 17% improvement observed on the CI release test or local laptop?
From local |
Signed-off-by: hjiang <[email protected]>
Can you test the real release test and see the performance impact? |
src/ray/core_worker/core_worker.h
Outdated
/// Serialized runtime info env are cached. | ||
mutable std::mutex runtime_env_serialization_mutex_; | ||
/// Maps serialized runtime env to **immutable** deserialized protobuf. | ||
mutable boost::compute::detail::lru_cache<std::string, |
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.
Can we temporarily change this back to std::unordered_map so that this PR compiles and we can see the real perf impact on the release test. I'm curious whether the release test will see the same perf improvement as what you observed locally.
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.
Sure, release run launched: https://buildkite.com/ray-project/release/builds/27207
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.
Is this with the modification of release test to add env var runtime env?
A shared lru cache is needed for my PR: #48928 Signed-off-by: hjiang <[email protected]>
Signed-off-by: hjiang <[email protected]>
Signed-off-by: hjiang <[email protected]>
Signed-off-by: hjiang <[email protected]>
fd5b0bd
to
b52df48
Compare
Followup PR for #48749
This PR caches json and protobuf deserialization for serialized runtime env.
Checked with benchmark (https://github.com/ray-project/ray/blob/master/release/benchmarks/distributed/test_many_tasks.py), verified throughput improves from ~11550 to ~ 13565, which is ~17%.