-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Consider removing memory_ballast
extension
#8343
Comments
@mx-psi thank you for summarizing the issue. I don't see any good reason to keep this extension. I'd suggest we just go ahead and deprecate it with clear instructions on how to utilize Let's discuss it in the next SIG meeting. |
One starting point to ensure we can do this correctly is to replace the memory ballast extension by an equivalent mechanism using |
From Atlassian's experience, we've not needed the ballast extension for a deployment that is strictly observing the host (doesn't expose any endpoints for services to send data, and prom is used to monitor the collector itself). On average, our deployments will use:
What is being monitored by the collector changes from service to service but roughly 4 - 10 receivers are running and capturing data. (some are internal to us so it didn't make sense to list them out). We have an internal service that works near similar to the collector which we had messed around with the To get back on topic, I think the risk of continued maintenance of the ballast extension is:
I believe it served us well, but I see it as a bigger risk keeping it around. |
Here is a user report for An alternative to outright removal would be to modify the current implementation to use |
Filed open-telemetry/opentelemetry-helm-charts/issues/891 to do #8343 (comment) as decided on the last Collector SIG |
Are there any plans on implementing |
@hanswurscht I think we can do something similar to the Helm chart approach, it will further help validate that GOMEMLIMIT is a valid alternative. Could you file an issue on the operator repository and link it to this one? |
Based on the discussion on open-telemetry/opentelemetry-helm-charts#891 and this issue, I filed #8803 to deprecate the memory ballast extension. |
This is a misunderstanding. Go heap profiles only show what survived after the last garbage-collection. (Also heap ballast serves to slow down garbage collection) |
**Description:** Based on user reports on open-telemetry/opentelemetry-helm-charts/issues/891 and the discussion on #8343, we can deprecate the memory ballast extension in favor of using `GOMEMLIMIT`. This PR: - Deprecates the memory ballast extension in the README - Removes references to the memory ballast extension on docs - Updates k8s example to use `GOMEMLIMIT` with the same approach as in the Helm chart (80% of memory limit) - Deprecates the memory ballast extension Go module Once this PR is accepted, open-telemetry/opentelemetry-helm-charts/issues/891 can move ahead with enabling `useGOMEMLIMIT` by default on the Helm chart. Other issues will be opened for opentelemetry.io, the Opentelemetry Operator and other parts of the OpenTelemetry project to remove references to this extension once the PR is merged. No explicit timeline is given for removal of the extension. **Link to tracking Issue:** Updates #8343 --------- Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
I have an anecdote for you. We had been struggling with trying to tune our gateway collectors for a few weeks after we started experimenting with connectors to generate metrics from our traces. Though we did identify some memory leaks, under load the collector would spike its memory usage and eventually cause the It would then get stuck in GC loops until our readiness probes failed and k8s would lay them to rest. After replacing |
…10671) #### Description This PR removes the deprecated memory ballast extension and all the logic in place in memorylimiter and service that was using it. #### Link to tracking issue Related to #8343. I don't want to close it until the [helm chart](open-telemetry/opentelemetry-helm-charts#1268) is updated. #### Testing Unit tests --------- Co-authored-by: Antoine Toulme <antoine@toulme.name> Co-authored-by: Curtis Robert <crobert@splunk.com> Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
This is now done!! 🎉 🎉 Thanks to @TylerHelmuth for making the final push! |
The
memory_ballast
extension allows defining a 'heap ballast' to make the behavior of Go's garbage collector more predictable. Quoting this post,This functionality was added in #45 but a few years and Go versions have passed since and there has since been discussion (e.g. see #7512 (comment) ) on the need of this extension today. In particular, tweaking
GOMEMLIMIT
andGOGC
may be enough to tackle the issues the extension was meant to address.It also seems like the extension may be risky in some cases and increase memory usage (this may be the cause of #7512).
The most recent issue on the matter upstream is golang/go/issues/42430.
This issue is to decide whether we should remove the memory ballast extension or not.
cc @Aneurysm9 @dmitryax
The text was updated successfully, but these errors were encountered: