From cf1bc835d54b95ea1682aa85b48775e1390cebd5 Mon Sep 17 00:00:00 2001 From: Yi Cheng <74173148+iycheng@users.noreply.github.com> Date: Wed, 8 Feb 2023 10:46:45 -0800 Subject: [PATCH] [core] Fix the GCS memory usage high issue It's not because of leak. The root cause is because we allocate more requests when start. This PR fixed it by making the number of call constant. --- src/ray/rpc/grpc_server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ray/rpc/grpc_server.cc b/src/ray/rpc/grpc_server.cc index d38e02d57151..208950652a71 100644 --- a/src/ray/rpc/grpc_server.cc +++ b/src/ray/rpc/grpc_server.cc @@ -148,7 +148,7 @@ void GrpcServer::Run() { if (entry->GetMaxActiveRPCs() != -1) { buffer_size = entry->GetMaxActiveRPCs(); } - for (int j = 0; j < buffer_size; j++) { + for (int j = 0; j < (buffer_size / num_threads_); j++) { entry->CreateCall(); } }