ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-10357. Implement granular metrics for OM sortDatanodes

Open tanvipenumudy opened this issue 1 year ago • 1 comments

What changes were proposed in this pull request?

To be merged once https://github.com/apache/ozone/pull/5391 is in.

The patch implements granular metrics around KeyManagerImpl#sortDatanodes method. The following metrics have been introduced:

  • sortDatanodesLatencyNs: KeyManagerImpl#sortDatanodes call latency in nanoseconds.
  • sortDatanodesSortByDistanceCostLatencyNs: NetworkTopology#sortByDistanceCost call latency in sortDatanodes.
  • sortDatanodesResolveNodeLocationLatencyNs: KeyManagerImpl#resolveNodeLocation call latency in sortDatanodes (for non-datanode host reads).
  • numSortDatanodesCalls: Number of KeyManagerImpl#sortDatanodes calls.
  • numSortDatanodesNonDatanodeHostReads: Number of non-datanode host reads in sortDatanodes (number of KeyManagerImpl#getOtherNode calls).

What is the link to the Apache JIRA

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

How was this patch tested?

  • The metrics have been tested manually on a cluster with the Ozone services running.
  • Green Git CI: https://github.com/tanvipenumudy/ozone/actions/runs/8137480673/

tanvipenumudy avatar Mar 04 '24 08:03 tanvipenumudy

@kerneltime, @muskan1012 could you please take a look at the patch? Thanks!

tanvipenumudy avatar Mar 04 '24 16:03 tanvipenumudy