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

[core][scalability] Change ray syncer from unary call to streaming call #30460

Merged
merged 46 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e07305d
up
fishbone Nov 17, 2022
5dc404f
init check
fishbone Nov 18, 2022
e15e050
remove incorrect stopped
fishbone Nov 18, 2022
cf1300e
up
fishbone Nov 18, 2022
100575e
add test and buffer
fishbone Nov 18, 2022
d5ee969
fix
fishbone Nov 18, 2022
ae6e3e2
fix
fishbone Nov 18, 2022
2a20329
up
fishbone Nov 18, 2022
bf9f305
up
fishbone Nov 18, 2022
56e833c
Merge branch 'syncer-stream' of github.com:iycheng/ray into syncer-st…
fishbone Nov 18, 2022
13e194c
fix crash
fishbone Nov 18, 2022
39d3f88
up
fishbone Nov 18, 2022
cbca804
up
fishbone Nov 18, 2022
efb6e34
fix delete
fishbone Nov 19, 2022
a06c95d
up
fishbone Nov 19, 2022
24ba4f6
up
fishbone Nov 19, 2022
1776bce
update
fishbone Nov 19, 2022
a51d7e3
up
fishbone Nov 19, 2022
79d7670
fix lint
fishbone Nov 23, 2022
c5a4a0c
Merge remote-tracking branch 'upstream/master' into syncer-stream
fishbone Nov 23, 2022
96dcbb4
fix failure
fishbone Nov 23, 2022
31d0899
Merge remote-tracking branch 'upstream/master' into syncer-stream
fishbone Jan 12, 2023
e8d6ced
fix comment
fishbone Jan 13, 2023
8c645cb
fix comment
fishbone Jan 13, 2023
afee968
format
fishbone Jan 13, 2023
2c7ac98
check
fishbone Jan 13, 2023
b4505b2
up
fishbone Jan 14, 2023
7baa247
add test initial
fishbone Jan 14, 2023
4030a35
add unit test
fishbone Jan 14, 2023
780f03b
fix
fishbone Jan 15, 2023
a958bc6
fix comments
fishbone Jan 17, 2023
59083a9
fix some
fishbone Jan 18, 2023
85a1b29
fix all comments
fishbone Jan 19, 2023
41c60c1
add comments
fishbone Jan 19, 2023
72049c2
fix comments
fishbone Jan 19, 2023
ef369fc
fix comments
fishbone Jan 20, 2023
77869c0
fix
fishbone Jan 20, 2023
0045ead
fix comments
fishbone Jan 20, 2023
0d0bab2
format
fishbone Jan 20, 2023
a6b4b06
fix
fishbone Jan 21, 2023
28c22c5
add digram
fishbone Jan 23, 2023
edcc1af
fix
fishbone Jan 23, 2023
89e213e
Merge remote-tracking branch 'upstream/master' into syncer-stream
fishbone Jan 24, 2023
972caac
fix win build
fishbone Jan 24, 2023
26a6d3a
fix gcs-ft test
fishbone Jan 25, 2023
d5b30e0
fix
fishbone Jan 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2619,6 +2619,7 @@ cc_test(
copts = COPTS,
tags = ["team:core"],
deps = [
":grpc_common_lib",
":ray_common",
":ray_mock",
"@com_google_googletest//:gtest",
Expand Down
15 changes: 9 additions & 6 deletions release/nightly_tests/many_nodes_tests/actor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ def foo(self):
return actors


def test_actor_ready(actors):
remaining = [actor.foo.remote() for actor in actors]
ray.get(remaining)


def parse_script_args():
parser = argparse.ArgumentParser()
parser.add_argument("--cpus-per-actor", type=float, default=0.2)
Expand All @@ -43,7 +38,15 @@ def main():
sleep(10)
return
actor_ready_start = perf_counter()
test_actor_ready(actors)
total_actors = len(actors)
objs = [actor.foo.remote() for actor in actors]

while len(objs) != 0:
objs_ready, objs = ray.wait(objs, timeout=10)
rkooo567 marked this conversation as resolved.
Show resolved Hide resolved
print(
f"Status: {total_actors - len(objs)}/{total_actors}, "
f"{perf_counter() - actor_ready_start}"
)
actor_ready_end = perf_counter()
actor_ready_time = actor_ready_end - actor_ready_start

Expand Down
20 changes: 17 additions & 3 deletions src/mock/ray/common/ray_syncer/ray_syncer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,24 @@ class MockReceiverInterface : public ReceiverInterface {
namespace ray {
namespace syncer {

class MockNodeSyncConnection : public NodeSyncConnection {
class MockRaySyncerBidiReactor : public RaySyncerBidiReactor {
public:
using NodeSyncConnection::NodeSyncConnection;
MOCK_METHOD(void, DoSend, (), (override));
using RaySyncerBidiReactor::RaySyncerBidiReactor;

MOCK_METHOD(void, Disconnect, (), (override));

MOCK_METHOD(bool,
PushToSendingQueue,
(std::shared_ptr<const RaySyncMessage>),
(override));
};

template <typename T>
class MockRaySyncerBidiReactorBase : public RaySyncerBidiReactorBase<T> {
public:
using RaySyncerBidiReactorBase<T>::RaySyncerBidiReactorBase;

MOCK_METHOD(void, Disconnect, (), (override));
};

} // namespace syncer
Expand Down
3 changes: 3 additions & 0 deletions src/ray/common/id.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,7 @@ ID_OSTREAM_OPERATOR(ActorID);
ID_OSTREAM_OPERATOR(TaskID);
ID_OSTREAM_OPERATOR(ObjectID);
ID_OSTREAM_OPERATOR(PlacementGroupID);

const NodeID kGCSNodeID = NodeID::FromBinary(std::string(kUniqueIDSize, 0));

} // namespace ray
4 changes: 4 additions & 0 deletions src/ray/common/id.h
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,7 @@ DEFINE_UNIQUE_ID(PlacementGroupID);

#undef DEFINE_UNIQUE_ID
} // namespace std

namespace ray {
extern const NodeID kGCSNodeID;
}
4 changes: 4 additions & 0 deletions src/ray/common/ray_config_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,10 @@ RAY_CONFIG(int64_t, grpc_keepalive_time_ms, 10000)
/// grpc keepalive timeout
RAY_CONFIG(int64_t, grpc_keepalive_timeout_ms, 20000)

/// grpc streaming buffer size
/// Set it to 512kb
RAY_CONFIG(int64_t, grpc_stream_buffer_size, 512 * 1024);

/// Whether to use log reporter in event framework
RAY_CONFIG(bool, event_log_reporter_enabled, false)

Expand Down
Loading