openshift / cluster-monitoring-operator

Manage the OpenShift monitoring stack
Apache License 2.0
247 stars 360 forks source link

MON-3914: adjust Prometheus GOGC based on infra topology #2390

Closed simonpasquier closed 2 months ago

simonpasquier commented 2 months ago

Prometheus v2.53.0 automatically sets GOGC=75 unless the environment variable is set explicitly. The (upstream) rationale is that GOGC=75 reduces memory usage significantly for a slight increase of CPU usage.

OCP components running on Single Node OpenShift (SNO) environments should be savvy on CPU hence the operator sets GOGC to 100 (the Go runtime default value) when the infrastructure topology is SingleReplica.

See https://github.com/openshift/prometheus/pull/206 for more detailed data.

openshift-ci-robot commented 2 months ago

@simonpasquier: This pull request references MON-3914 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift/cluster-monitoring-operator/pull/2390): >Prometheus v2.53.0 automatically sets GOGC=75 unless the environment variable is set explicitly. The (upstream) rationale is that GOGC=75 reduces memory usage significantly for a slight increase of CPU usage. > >OCP components running on Single Node OpenShift (SNO) environments should be savvy on CPU hence the operator sets GOGC to 100 (the Go runtime default value) when the infrastructure topology is SingleReplica. > >See https://github.com/openshift/prometheus/pull/206 for more detailed data. > > > >* [ ] I added CHANGELOG entry for this change. >* [X] No user facing changes, so no entry in CHANGELOG was needed. > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fcluster-monitoring-operator). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
simonpasquier commented 2 months ago

/retest-required

machine424 commented 2 months ago

/lgtm Thanks! I'll add a test based on go_gc_gogc_percent (If there isn’t much overhead)

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: machine424, simonpasquier

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/cluster-monitoring-operator/blob/master/OWNERS)~~ [machine424,simonpasquier] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 2 months ago

@simonpasquier: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).