-
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] Fix the GCS memory usage high issue. #32302
Conversation
@@ -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++) { |
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.
will num_threads_ ever be 0?
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.
Sorry, I missed this one. But I don't think it's going to be a big issue here since it should be always greater than 0.
But yeah, we should enforce it by adding CHECK.
…ct#32323) This is a corner case where buffer could be 0 and a comments needs to be fixed in the previous PR.
…ct#32323) This is a corner case where buffer could be 0 and a comments needs to be fixed in the previous PR. Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Why are these changes needed?
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.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.