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

set kubelet_status_update_frequency to 120s #12106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

poblahblahblah
Copy link
Contributor

@poblahblahblah poblahblahblah commented Apr 4, 2025

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

The default setting out of the box for this is 5 minutes. As far as I can tell this is what EKS, AKS, and ACK all use. On our metal clusters we were seeing a lot more GC activity causing memory contention and higher CPU usage. It was eventually traced to how often the Node Conditions were updating. You can see when we rolled out this change to this cluster in the screenshot below.

On a ~300 node cluster updating this setting to 120s brought Prometheus' Bytes allocated and freed per second from 1Gi down to ~450Mi and the CPU time from ~7 seconds down to ~3 seconds. It also brought GC cycles per minute from ~8 down to ~3.3.

Screenshot 2025-04-03 at 1 24 12 PM

I recognize that updating this setting is called out in the Large Deployment docs, but I think 10s is a bit low for most cases. Even on our small clusters this was causing a noticeable difference with Prometheus.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Updated kubelet_status_update_frequency from 10s to 120s. Useful for larger clusters.

On a ~300 node cluster updating this setting to 120s brought Prometheus' Bytes
allocated and freed per second from 1Gi down to ~450Mi and the CPU time from ~7
seconds down to ~3 seconds. It also brought GC cycles per minute from ~8 down to
~3.3.

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 4, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: poblahblahblah
Once this PR has been reviewed and has the lgtm label, please assign cristicalin for approval. For more information see the Code Review Process.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 4, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @poblahblahblah. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@VannTen
Copy link
Contributor

VannTen commented Apr 4, 2025 via email

@tico88612
Copy link
Member

I think a better way to do this would be to document the record rather than change the defaults.
I agree with @VannTen if you want to change the defaults.

@poblahblahblah
Copy link
Contributor Author

poblahblahblah commented Apr 6, 2025

edit: I re-read the comment I wrote and I could have worded it better. I would love the know the reasoning behind 10s being the default here.

@VannTen
Copy link
Contributor

VannTen commented Apr 6, 2025 via email

@yankay
Copy link
Member

yankay commented Apr 7, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 7, 2025
@VannTen
Copy link
Contributor

VannTen commented Apr 8, 2025

The default setting out of the box for this is 5 minutes

Are we talking about --node-status-update-frequency ? Because from what I can tell the default is 10s like in kubespray. https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/

(In that case we're unlikely to change this, deviating from kubernetes defaults has an higher bar)

@VannTen
Copy link
Contributor

VannTen commented Apr 8, 2025

c07d60b -> commit which introduced the parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants