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

csi-driver-node: set GOMAXPROCS #911

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

Garfield96
Copy link
Contributor

How to categorize this PR?

/area performance
/kind enhancement
/platform gcp

What this PR does / why we need it:
Golang creates internal data structures based on the number of available CPUs. As a result, the memory consumption increases on larger machines. However, these data structures would be only needed if the load would scale with the size of the nodes. This isn't the case for CSI-drivers, since the number of volumes doesn't scale with the node size. Therefore, this change overwrites the automatically detected number of CPUs and sets it to 2 using the GOMAXPROCS environment variable. Therefore, memory consumption is stable across all node sizes. As a result, the VPA doesn't have to scale up the resources if a cluster uses many large nodes, which in the worst case could result in pod eviction.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:


@Garfield96 Garfield96 requested review from a team as code owners November 25, 2024 15:37
@gardener-robot gardener-robot added the needs/review Needs review label Nov 25, 2024
@CLAassistant
Copy link

CLAassistant commented Nov 25, 2024

CLA assistant check
All committers have signed the CLA.

@gardener-robot gardener-robot added area/performance Performance (across all domains, such as control plane, networking, storage, etc.) related kind/enhancement Enhancement, improvement, extension platform/gcp Google cloud platform/infrastructure labels Nov 25, 2024
@gardener-robot-ci-2
Copy link
Contributor

Thank you @Garfield96 for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below.

@gardener-robot
Copy link

@Garfield96 Thank you for your contribution.

@gardener-robot gardener-robot added the size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) label Nov 25, 2024
@kon-angelo
Copy link
Contributor

@Garfield96 Thank you for the find. Quite interesting indeed.

Small nit: I think the original upstream issue is kubernetes-sigs/gcp-compute-persistent-disk-csi-driver#968, which may be interesting. Could please add a comment with this issue and I believe it's okay to proceed.

@kon-angelo
Copy link
Contributor

Also based on the upstream PR, maybe the idiomatic way is to use the provided csi flag

Copy link
Member

@AndreasBurger AndreasBurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice find, lgtm

@AndreasBurger AndreasBurger added the reviewed/lgtm Has approval for merging label Dec 6, 2024
@gardener-robot gardener-robot removed the needs/review Needs review label Dec 6, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Dec 6, 2024
@AndreasBurger AndreasBurger merged commit 8423d09 into gardener:master Dec 6, 2024
13 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance Performance (across all domains, such as control plane, networking, storage, etc.) related kind/enhancement Enhancement, improvement, extension needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) platform/gcp Google cloud platform/infrastructure reviewed/lgtm Has approval for merging size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants