Add zswap metrics: bytes_used and compression_efficiency - #1337
Conversation
|
|
|
Welcome @divikchotani-oss! |
|
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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
|
/test pull-npd-e2e-test |
|
/assign @wangzhen127 |
04da8a4 to
2e971c9
Compare
|
/lgtm |
| klog.Fatalf("Error initializing metric for %q: %v", metrics.MemoryDirtyUsedID, err) | ||
| } | ||
|
|
||
| if _, ok := memoryConfig.MetricsConfigs[string(metrics.MemoryZswapBytesUsedID)]; ok { |
There was a problem hiding this comment.
Can you add some unit test?
There was a problem hiding this comment.
and can you squash the commits after the update?
There was a problem hiding this comment.
I added unit tests for zswap to the commit and squashed it all into one commit, thanks
2e971c9 to
cdbbadf
Compare
DigitalVeer
left a comment
There was a problem hiding this comment.
Thanks for this update! Can we please update the systemstatsmonitor documentation as well.
| metrics.MemoryZswapBytesUsedID: "compute.googleapis.com/guest/memory/zswap/bytes_used", | ||
| metrics.MemoryZswapCompressionEfficiencyID: "compute.googleapis.com/guest/memory/zswap/compression_efficiency", |
There was a problem hiding this comment.
Is this metric registered and/or launched? I cannot find any documentation and some issues came up when testing locally.
- CreateTimeSeries rejected on both spellings:
control guest/memory/percent_used → {} (accepted)
PR type guest/memory/zswap/bytes_used → 400 INVALID_ARGUMENT "unknown metric type"
flat guest/memory/zswap_bytes_used → 400 INVALID_ARGUMENT "unknown metric type"
- Not in the API descriptors:
$ GET /v3/projects/…/metricDescriptors?filter=starts_with("compute.googleapis.com/guest")
-- No match for zswap
- Running on stackdriver fails on every export:
… metric.type="compute.googleapis.com/guest/memory/zswap/compression_efficiency" … unknown metric type
… metric.type="compute.googleapis.com/guest/memory/zswap/bytes_used" … unknown metric type
There was a problem hiding this comment.
Hi, thanks for the catch! I updated the documentation, the reason for the error is because the metric descriptors have not yet been registered in the backend, once that happens, the errors should be resolved.
cdbbadf to
baa6d36
Compare
baa6d36 to
7d4863a
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AnishShah, divikchotani-oss, wangzhen127 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This commit adds tracking for memory/zswap_bytes_used and memory/zswap_compression_efficiency via procfs.