Skip to content

HDDS-10516. Add metrics for chunk read from internal ratis#6375

Merged
jojochuang merged 1 commit intoapache:masterfrom
ChenSammi:HDDS-10516
Mar 14, 2024
Merged

HDDS-10516. Add metrics for chunk read from internal ratis#6375
jojochuang merged 1 commit intoapache:masterfrom
ChenSammi:HDDS-10516

Conversation

@ChenSammi
Copy link
Contributor

What changes were proposed in this pull request?

add metrics for chunk read from internal ratis.

Currently, there are following metrics on every datanode for chunk reads.

"numReadChunk" : 136237,
"bytesReadChunk" : 1395066880,
"LatencyReadChunkNumOps" : 136237,
"LatencyReadChunkAvgTime" : 1.0,

The chunk read requests come from both remote user client and internal ratis if the datanode is the leader of the ratis group. Currently, we cannot tell how much data is read by user client, and how much data is read by ratis leader itself. So this task is to introduce a new set of following metrics for read by ratis,

numReadStateMachine // the request counts from ratis
bytesReadStateMachine // the total bytes read by ratis

So the final goal is we want to know how much data is read by user client. So for read from user client,

bytesReadChunk - bytesReadStateMachine = bytes read by user clients

numReadChunk - numReadStateMachine = request counts from user clients

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10516

How was this patch tested?

Manual test.

  1. start a three datanode docket cluster
  2. check both metrics are 0 on leader Datanode

image
image

  1. run freon
    ozone freon randomkeys --num-of-volumes=5 --num-of-buckets=2 --num-of-keys=10000 --replication-type=RATIS --replication=THREE --validate-writes --num-of-validate-threads=10
  2. check both metrics again on leader Datanode.

image
image

For leader datanode, it's bytesReadChunk equal to bytesReadStateMachine now.
And bytesReadChunk and bytesReadStateMachine are all 0 on other two follower datanodes.
5. Use "ozone fs -get" command to read several keys created by freon.
6. check both metrics again on leader Datanode, bytesReadChunk value is increased, while bytesReadStateMachine still remains the same.

image

Copy link
Contributor

@ashishkumar50 ashishkumar50 left a comment

Choose a reason for hiding this comment

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

Thanks @ChenSammi, LGTM.

@jojochuang jojochuang merged commit 2ffdb3c into apache:master Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants