-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-7517. Register OM-S3G gRPC performance metrics #4044
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
|
@GeorgeJahad @duongkame Please take a look at this PR |
duongkame
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.
Overall this is a big work to enable perf metrics for GRPC. Thanks @xBis7 for the contribution.
It looks good overall, yet I think we can make the metric component reusable, e.g. for SCM, and some concerns about efficiency.
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Outdated
Show resolved
Hide resolved
...e-manager/src/main/java/org/apache/hadoop/ozone/om/grpc/metrics/GrpcOzoneManagerMetrics.java
Outdated
Show resolved
Hide resolved
...e-manager/src/main/java/org/apache/hadoop/ozone/om/grpc/metrics/GrpcOzoneManagerMetrics.java
Outdated
Show resolved
Hide resolved
...ne-manager/src/main/java/org/apache/hadoop/ozone/om/grpc/GrpcOmServerRequestInterceptor.java
Outdated
Show resolved
Hide resolved
|
@duongkame Could you take another look at this? |
|
@duongkame can you take a look again? |
duongkame
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.
LGTM, just put a few minor comments.
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/grpc/metrics/GrpcMetrics.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/grpc/metrics/GrpcMetrics.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/grpc/metrics/GrpcMetrics.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/hadoop/ozone/grpc/metrics/GrpcMetricsServerRequestInterceptor.java
Outdated
Show resolved
Hide resolved
|
@duongkame I made the changes you suggested and some more improvements to make everything simpler. Could you take another look? @neils-dev Could you take a look as well and see if we can close this if there are no more comments? |
|
@kerneltime can you take a look at this PR as well. Thanks. |
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/GrpcOzoneManagerServer.java
Outdated
Show resolved
Hide resolved
| grpcMetrics.addGrpcQueueTime(queueTime); | ||
|
|
||
| // set metrics processing time | ||
| grpcMetrics.addGrpcProcessingTime(processingTime); |
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.
Can you attach a label for which request was received?
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.
@kerneltime I added the tag. That's how it looks, "tag.LatestRequestType" : "CommitKey".
{
"name" : "Hadoop:service=OzoneManager,name=GrpcMetrics",
"modelerType" : "GrpcMetrics",
"tag.LatestRequestType" : "CommitKey",
"tag.Hostname" : "27fbfa05d584",
"SentBytes" : 1093,
"ReceivedBytes" : 2173,
"UnknownMessagesSent" : 0,
"UnknownMessagesReceived" : 0,
"GrpcQueueTimeNumOps" : 8,
"GrpcQueueTimeAvgTime" : 969339.5,
"GrpcProcessingTimeNumOps" : 8,
"GrpcProcessingTimeAvgTime" : 2.98469375E7,
"NumOpenClientConnections" : 1
},
Let me know what you think.
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.
The changes look good to me @xBis7, thanks.
|
@tanvipenumudy Thanks for reviewing this PR. |
|
@kerneltime Can you take another look on this PR and help get it merged? |
|
@kerneltime @neils-dev can you please check if all your comments are addressed, so we can merge this? |
@adoroszlai All comments have been addressed. |
|
Thanks @xBis7 for continued efforts on this. Thanks @duongkame, @kerneltime, @neils-dev, @tanvipenumudy for the reviews. |
|
Thanks @adoroszlai for merging it. |
What changes were proposed in this pull request?
In this patch we are exposing performance metrics in the
/jmxand/promendpoints, for using gRPC between OM and S3G clients. The metrics are similar to the ones gathered by hadoop RPC. Hadoop RPC uses a proxy server that monitors the socket and gathers the metrics based on it's traffic. We can achieve similar results using gRPC interceptors to get all the messages sent and received by the server and monitor the number of active client connections using gRPC transport filter.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7517
How was this patch tested?
We can't have unit tests without adding a pom dependency to OzoneManager or S3Gateway. Furthermore, we can't have an integration test with Grpc enabled because Mini Ozone Cluster tries to configure Grpc server ports on multiple OMs with the same port causing binding errors.
In order to test this patch, a new acceptance test was added. This acceptance test gets executed only if grpc is enabled.
This patch can also be tested manually in a docker environment after setting the configuration for grpc. We can also enable the new percentiles flag
ozone.grpc.metrics.percentiles.intervals. Add indocker-configunder/hadoop-ozone/dist/target/ozone-1.3.0-SNAPSHOT/compose/ozoneAnd then check
/jmxand/promendpoints for the om. For example in/jmxwe have something like