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

New component: cgroup aware go runtime extension #30289

Open
2 tasks
tomershafir opened this issue Jan 4, 2024 · 12 comments
Open
2 tasks

New component: cgroup aware go runtime extension #30289

tomershafir opened this issue Jan 4, 2024 · 12 comments
Labels
Accepted Component New component has been sponsored Stale

Comments

@tomershafir
Copy link

tomershafir commented Jan 4, 2024

The purpose and use-cases of the new component

Set go runtime variables based on linux cgroupfs automatically, or let the user set a cgroup relative value. For example, set GOMAXPROCS and GOMEMLIMIT by importing https://github.com/uber-go/automaxprocs and https://github.com/KimMachineGun/automemlimit.

Example configuration for the component

Proxy config for https://github.com/uber-go/automaxprocs and https://github.com/KimMachineGun/automemlimit

Telemetry data types supported

It is data type independent

Is this a vendor-specific component?

  • This is a vendor-specific component
  • If this is a vendor-specific component, I am proposing to contribute and support it as a representative of the vendor.

Code Owner(s)

No response

Sponsor (optional)

@mx-psi

Additional context

I think about a single extension that should theoretically cover the entire go runtime, starting with the 2 variables mentioned above.

Core issue ref: open-telemetry/opentelemetry-collector#9203

@mx-psi
Copy link
Member

mx-psi commented Jan 4, 2024

cc @open-telemetry/helm-maintainers would love to know what you think (is this something we would want on the Helm chart? If so, anything specific about the design we should take into account?)

@TylerHelmuth
Copy link
Member

Seems reasonable to me. In the helm chart an extension like this would allow us to remove some templates like https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/templates/_helpers.tpl#L169. A solution like this also helps users running the collector outside of kubernetes.

I'd like to see some example configs of how the extension would be configured.

@mx-psi mx-psi added Accepted Component New component has been sponsored and removed Sponsor Needed New component seeking sponsor needs triage New item requiring triage labels Jan 9, 2024
@tomershafir
Copy link
Author

maybe something like:

extensions:
  cgroupgoruntime:
    gomaxprocs: # hardcoded percentage 100
      enable: true
    gomemlimit:
      percentage: 85 # default 90, enabled by value > 0

@TylerHelmuth
Copy link
Member

Would gomaxprocs or gomemlimit ever have additional fields in their sections?

@tomershafir
Copy link
Author

I assume that the linux and go relevant interfaces should be stable for long, so I guess no. There may be additional sections.

@cforce
Copy link

cforce commented Mar 2, 2024

Setting gomaxprocs as env var does not reduce core usage as expected .

@iblancasa
Copy link
Contributor

It would be interesting to have this extension. Recently, Prometheus added automatic memory limit handling based on the same mechanism.

Copy link
Contributor

github-actions bot commented May 6, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label May 6, 2024
@tomershafir
Copy link
Author

I wont be able to work on this issue. @mx-psi do you have someone to assign?

@mx-psi mx-psi removed the Stale label May 6, 2024
@mx-psi
Copy link
Member

mx-psi commented May 6, 2024

@tomershafir no, but I can remove the Stale marker and leave it open for now in case somebody else volunteers

Copy link
Contributor

github-actions bot commented Jul 8, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Jul 8, 2024
@mx-psi mx-psi removed the Stale label Jul 8, 2024
Copy link
Contributor

github-actions bot commented Sep 9, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Component New component has been sponsored Stale
Projects
None yet
Development

No branches or pull requests

5 participants