-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-9874. Introduce Metrics for listKeys Dashboard #5745
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
Conversation
|
@muskan1012 There are checkstyle and findbugs failures. It would be nice to wait with PR creation until a clean CI run in your fork is completed. https://github.com/muskan1012/ozone/actions/runs/7128100497 |
| private MutableRate listKeysAveragePagination; | ||
|
|
||
| @Metric(about = "ops per second for listKeys") | ||
| private MutableRate listKeysOpsPerSec; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the Latency metric listKeysLatencyNs, maybe we just need to add a cumulative number of listKeys metric(such as: listKeysSize), which we can calculate to get listKeysOpsPerSec and listKeysAveragePagination.
ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMPerformanceMetrics.java
Lines 92 to 93 in 0e91b2a
| @Metric(about = "listKeys latency in nanoseconds") | |
| private MutableRate listKeysLatencyNs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented the cumulative number of listKeys using keyCount, which is set to maxKeys if truncated or cacheKeyMap.size() otherwise.
listKeysAveragePagination is set using keyCount.
listKeysOpsPerSec is calculated as keyCount / ((Time.monotonicNowNanos() - startNanos) / 1_000_000_000.0f).
Added latency tracking with addListKeysReadFromRocksDbLatencyNs.
This approach captures the metrics as you suggested.
|
cc @tanvipenumudy can you please take a look as well? |
tanvipenumudy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @muskan1012 for the patch, please find a few comments.
...src/test/java/org/apache/hadoop/ozone/om/response/snapshot/TestOMSnapshotDeleteResponse.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/apache/hadoop/ozone/om/response/snapshot/TestOMSnapshotDeleteResponse.java
Outdated
Show resolved
Hide resolved
|
@muskan1012 can you please rebase the change and address the conflicts? |
|
Thank you @muskan1012 for updating the patch, could you please take a look at the build failure? |
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
...ger/src/test/java/org/apache/hadoop/ozone/om/response/bucket/TestOMBucketDeleteResponse.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@muskan1012, the failed checks appear related to the changes ( Could you also please rebase the patch? Thanks! |
|
Thank you @muskan1012 for rebasing and fixing the test failures. Reran the workflow; could you please take a look at the integration test failure on |
|
@adoroszlai, @xichen01 could you please take another look at the patch? Thanks |
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
...one/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOMMultiTenantManagerImpl.java
Outdated
Show resolved
Hide resolved
...est/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBufferWithDummyResponse.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/fsck/ContainerMapper.java
Outdated
Show resolved
Hide resolved
@muskan1012, it would help if you could also please share the updated list keys dashboard (or prometheus/graphana metrics - whichever works!) once all changes are incorporated, thanks. |
adoroszlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @muskan1012 for updating the patch.
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
...ne/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/response/TestCleanupTableInfo.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/PrefixParser.java
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
adoroszlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @muskan1012 for updating the patch. Mostly looks good, some unnecessary changes are still left over.
Also, can you please consider @kerneltime's suggestion to rename averagePagination to keyCount?
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/fsck/ContainerMapper.java
Outdated
Show resolved
Hide resolved
...ne/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/response/TestCleanupTableInfo.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Doroszlai, Attila <[email protected]>
|
Hi @adoroszlai, thank you for reviewing it. Fixed minor nits as well. |
tanvipenumudy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @muskan1012 for working on the patch iteratively, thank you @adoroszlai, @kerneltime, @xichen01 for the reviews.
What changes were proposed in this pull request?
Introduced following metrics for listKey operations:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9874
How was this patch tested?
manually tested it on a cluster