[ 
https://issues.apache.org/jira/browse/HADOOP-13747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15610649#comment-15610649
 ] 

Erik Krogen commented on HADOOP-13747:
--------------------------------------

[~zhz] good point that this implementation will lose metrics from Thread A that 
were created in the period between the previous metric aggregation and the time 
Thread A dies. I think one question is if we want to replace the current 
{{MutableRates}} completely with my new implementation, or if we should leave 
the old one as well. Leaving both would allow a solution for shorter lived 
threads as well as a solution for long running threads with high contention, 
and we could explain the differences in the Javadoc, though at this time the 
original {{MutableRates}} would go completely unused so would be a bit of a 
code clutter.

[~andrew.wang], any thoughts on the patch or on this matter?

> Use LongAdder for more efficient metrics tracking
> -------------------------------------------------
>
>                 Key: HADOOP-13747
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13747
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Zhe Zhang
>            Assignee: Erik Krogen
>         Attachments: HADOOP-13747.patch, benchmark_results
>
>
> Currently many metrics, including {{RpcMetrics}} and {{RpcDetailedMetrics}}, 
> use a synchronized counter to be updated by all handler threads (multiple 
> hundreds in large production clusters). As [~andrew.wang] suggested, it'd be 
> more efficient to use the [LongAdder | 
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/LongAdder.java?view=co]
>  library which dynamically create intermediate-result variables.
> Assigning to [~xkrogen] who has already done some investigation on this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to