-
Notifications
You must be signed in to change notification settings - Fork 619
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
Possible Memory Leak in WatchBackend #595
Comments
That's an allocation profile, isn't it? The inuse_space profile would be relevant if you're investigating memory consumption. |
@pschultz I need to update my post, i think my pprof was pointing to the wrong culprit within WatchBackend. I'll provide more detail shortly. |
Looking at the updated pprof, we see the following:
|
@pschultz the above pprof is an inuse_space profile. |
I'm still digging into this issue. I've been unsuccessful in recreating the behavior in a lab environment. I'm gathering some more pprofs from devices to try and narrow down what's happening. It's possible that our solution to address #611 will resolve this behavior as well. |
We made some good progress on this yesterday. From what we can tell, the memory leak has something to do with "next" being a string. We have switched it to be a bytes.Buffer and changed the Parse function in parse_new.go to use a bufio.NewScanner. With these changes we are no longer seeing the rapid increase in memory utilization. We're going to do some additional cleanup and also look at whether using strings.builder works as well. We should be able to have a PR and some really good performance comparisons that we can share soon. |
@murphymj25 that sounds great, thanks debugging and resolving that. Looking forward to the PR! |
I have created pull request #629 and added some detail on memory performance comparing the pull request to the current 1.5.11 release. |
Over the last few weeks we've been noticing that memory usage for our instances continues to grow. I performed a pprof and found that about 1/3 of the used memory at the time was for main.WatchBackend. In our environment, we use the manual overrides to control when services are introduced to be load balanced as well as allow us to disable load balancing while allowing the service to be healthy. Because of that we have a pretty large number of overrides (currently ~3700, and we are pretty much constantly adding and removing manual overrides.
The text was updated successfully, but these errors were encountered: