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

Mingliang Liu commented on HDFS-9521:
-------------------------------------

Thanks for reporting this, I also think the detailed time will be helpful for 
troubleshooting purpose.

As the overall time is removed, though can be calculated manually, it may make 
an operator uneasy if she only needs this information. I suggest we keep 
logging the overall execution time in INFO level, and dump individual 
download/fsync time in DEBUG level.

> TransferFsImage.receiveFile should account and log separate times for image 
> download and fsync to disk 
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-9521
>                 URL: https://issues.apache.org/jira/browse/HDFS-9521
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Wellington Chevreuil
>            Assignee: Wellington Chevreuil
>            Priority: Minor
>         Attachments: HDFS-9521.patch
>
>
> Currently, TransferFsImage.receiveFile is logging total transfer time as 
> below:
> {noformat}
> double xferSec = Math.max(
>        ((float)(Time.monotonicNow() - startTime)) / 1000.0, 0.001);    
> long xferKb = received / 1024;
> LOG.info(String.format("Transfer took %.2fs at %.2f KB/s",xferSec, xferKb / 
> xferSec))
> {noformat}
> This is really useful, but it just measures the total method execution time, 
> which includes time taken to download the image and do an fsync to all the 
> namenode metadata directories.
> Sometime when troubleshooting these imager transfer problems, it's 
> interesting to know which part of the process is being the bottleneck 
> (whether network or disk write).
> This patch accounts time for image download and fsync to each disk 
> separately, logging how much time did it take on each operation.
>  



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

Reply via email to