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

Zhe Zhang commented on HDFS-10872:
----------------------------------

Thanks for the discussion Andrew and Erik.

I agree that moving the multi-threading logic to Metrics classes is a good 
idea. I'm actually pretty curious how that will improve the performance of 
existing RPC metrics collection; it seems pretty expensive. We should probably 
do that as a prerequisite and then rebase this patch.

Using {{LongAdder}} is an interesting idea. [~andrew.wang] This is actually the 
first time I learn about it :) Are we aware of any production usage of this 
library? I took a look at the test coverage; it seems a little weak considering 
the complexity of the main logic. We can probably consider adding some more 
unit tests in Hadoop to cover cases we are most interested in.

I expect that a few minutes after the NN starts, the set of operations (keys) 
in the {{opHoldtimeMetrics}} map is stablized. Afterwards, each entry is 
essentially a counter to be incremented. So on the high level I think we should 
be able to make it work with {{LongAdder}}. Agreed with [~xkrogen] that 
snapshotting/resetting is probably the trickiest part. Creating a new 
{{LongAdder}} in {{snapshot}} sounds reseaonable to me.

> Add MutableRate metrics for FSNamesystemLock operations
> -------------------------------------------------------
>
>                 Key: HDFS-10872
>                 URL: https://issues.apache.org/jira/browse/HDFS-10872
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>         Attachments: FSLockPerf.java, HDFS-10872.000.patch, 
> HDFS-10872.001.patch, HDFS-10872.002.patch, HDFS-10872.003.patch, 
> HDFS-10872.004.patch
>
>
> Add metrics for FSNamesystemLock operations to see, overall, how long each 
> operation is holding the lock for. Use MutableRate metrics for now. 



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

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

Reply via email to