Skip to content

Add zswap metrics: bytes_used and compression_efficiency - #1337

Open
divikchotani-oss wants to merge 1 commit into
kubernetes:masterfrom
divikchotani-oss:add-zswap-metrics
Open

Add zswap metrics: bytes_used and compression_efficiency#1337
divikchotani-oss wants to merge 1 commit into
kubernetes:masterfrom
divikchotani-oss:add-zswap-metrics

Conversation

@divikchotani-oss

Copy link
Copy Markdown

This commit adds tracking for memory/zswap_bytes_used and memory/zswap_compression_efficiency via procfs.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 19, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: divikchotani-oss / name: Divik Chotani (368a56c)

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 19, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Welcome @divikchotani-oss!

It looks like this is your first PR to kubernetes/node-problem-detector 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/node-problem-detector has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @divikchotani-oss. Thanks for your PR.

I'm waiting for a kubernetes 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.

Details

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.

@kubernetes-prow kubernetes-prow Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 19, 2026
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 19, 2026
@AnishShah

Copy link
Copy Markdown

/ok-to-test

@kubernetes-prow kubernetes-prow Bot 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 Aug 19, 2026
@ajaysundark

Copy link
Copy Markdown
Contributor

/test pull-npd-e2e-test

Comment thread pkg/systemstatsmonitor/memory_collector_unix.go Outdated
@AnishShah

Copy link
Copy Markdown

/assign @wangzhen127

@divikchotani-oss
divikchotani-oss force-pushed the add-zswap-metrics branch 3 times, most recently from 04da8a4 to 2e971c9 Compare August 20, 2026 21:38
@AnishShah

Copy link
Copy Markdown

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 21, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AnishShah, divikchotani-oss
Once this PR has been reviewed and has the lgtm label, please ask for approval from wangzhen127. For more information see the Code Review Process.

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

Details 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

klog.Fatalf("Error initializing metric for %q: %v", metrics.MemoryDirtyUsedID, err)
}

if _, ok := memoryConfig.MetricsConfigs[string(metrics.MemoryZswapBytesUsedID)]; ok {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add some unit test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and can you squash the commits after the update?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I added unit tests for zswap to the commit and squashed it all into one commit, thanks

@kubernetes-prow kubernetes-prow Bot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 21, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants