hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13747) Use LongAdder for more efficient metrics tracking
Date Fri, 21 Oct 2016 18:25:59 GMT

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

Steve Loughran commented on HADOOP-13747:
-----------------------------------------

Coda Hale metrics has an implementation of this in {{com.codahale.metrics.LongAdder}}; there's
something in Guava, and it's in Java 8 under  {{java.util.concurrent.atomic.LongAdder}}

so...we don't need a new library. If targeting java 8+, it's built in, otherwise look@guava

And, if anyone is thinking of metrics rework, I encourage them to play with Coda Hale first.
One thing it does very nicely is callback-based counters and gauges. That is: unless your
code incrementing values, coda hale calls your function. Which in a world of java 8 lambdas,
is as simple as code like {{() -> buffers.length}}. It does change how you measure things:
a set of probes, rather than just a set of counters you have to keep updating.

> 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
>
> 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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message