[
https://issues.apache.org/jira/browse/HADOOP-18920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17772783#comment-17772783
]
ASF GitHub Bot commented on HADOOP-18920:
-----------------------------------------
haiyang1987 commented on code in PR #6146:
URL: https://github.com/apache/hadoop/pull/6146#discussion_r1349497618
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java:
##########
@@ -568,12 +579,15 @@ public long getPurgeIntervalNanos() {
* @param methodName - RPC Request method name
* @param details - Processing Detail.
*
- * if this request took too much time relative to other requests
- * we consider that as a slow RPC. 3 is a magic number that comes
- * from 3 sigma deviation. A very simple explanation can be found
- * by searching for 68-95-99.7 rule. We flag an RPC as slow RPC
- * if and only if it falls above 99.7% of requests. We start this logic
- * only once we have enough sample size.
+ * if this request took too much time relative to other requests,
+ * and it took time exceed `logSlowRPCThresholdMs` we consider that as a
slow RPC.
Review Comment:
Thanks @xinglin for your suggestion, i will update it later.
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java:
##########
@@ -587,10 +601,10 @@ void logSlowRpcCalls(String methodName, Call call,
final double threeSigma = rpcMetrics.getProcessingMean() +
(rpcMetrics.getProcessingStdDev() * deviation);
- long processingTime =
- details.get(Timing.PROCESSING, rpcMetrics.getMetricsTimeUnit());
+ long processingTime = details.get(Timing.PROCESSING,
rpcMetrics.getMetricsTimeUnit());
Review Comment:
Get it.
> RPC Metrics : Optimize logic for log slow RPCs
> ----------------------------------------------
>
> Key: HADOOP-18920
> URL: https://issues.apache.org/jira/browse/HADOOP-18920
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Haiyang Hu
> Assignee: Haiyang Hu
> Priority: Major
> Labels: pull-request-available
>
> HADOOP-12325 implement a capability where "slow" RPCs are logged in NN log.
> Current processing logic is the "slow" RPCs are to be those whose processing
> time is outside 3 standard deviation.
> However, in practice it is found that many logs of slow rpc are currently
> output, and sometimes RPCs with a processing time of 1ms are also declared as
> slow, this is not in line with actual expectations.
> Therefore, consider optimize the logic conditions of slow RPC and add a
> `logSlowRPCThresholdMs` variable to judge whether the current RPCas slow so
> that the expected slow RPC log can be logger.
> for `logSlowRPCThresholdMs`, we can support dynamic refresh to facilitate
> adjustments based on the actual operating conditions of the hdfs cluster.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]