Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
Currently the MutableRates metrics class serializes all writes to metrics it contains because of its use of MetricsRegistry.add() (i.e., even two increments of unrelated metrics contained within the same MutableRates object will serialize w.r.t. each other). This class is used by RpcDetailedMetrics, which may have many hundreds of threads contending to modify these metrics. Instead we should allow updates to unrelated metrics objects to happen concurrently. To do so we can let each thread locally collect metrics, and on a snapshot, aggregate the metrics from all of the threads.
I have collected some benchmark performance numbers in HADOOP-13747 (https://issues.apache.org/jira/secure/attachment/12835043/benchmark_results) which indicate that this can bring significantly higher performance in high contention situations.
Attachments
Attachments
Issue Links
- is blocked by
-
HADOOP-13804 MutableStat mean loses accuracy if add(long, long) is used
- Resolved
- is related to
-
HADOOP-13747 Use LongAdder for more efficient metrics tracking
- Open
- is required by
-
HDFS-10872 Add MutableRate metrics for FSNamesystemLock operations
- Resolved