Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB73E18BC1 for ; Tue, 5 Jan 2016 05:57:40 +0000 (UTC) Received: (qmail 28689 invoked by uid 500); 5 Jan 2016 05:57:40 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 28624 invoked by uid 500); 5 Jan 2016 05:57:40 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 28608 invoked by uid 99); 5 Jan 2016 05:57:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jan 2016 05:57:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E0EB72C1F5A for ; Tue, 5 Jan 2016 05:57:39 +0000 (UTC) Date: Tue, 5 Jan 2016 05:57:39 +0000 (UTC) From: "Harsh J (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9521) TransferFsImage.receiveFile should account and log separate times for image download and fsync to disk MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-9521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082446#comment-15082446 ] Harsh J commented on HDFS-9521: ------------------------------- Patch's approach looks good to me. Agreed with [~liuml07], that we can keep the total time also (but indicate in the message that it includes both times). Alternatively, a single combined log at the end that prints the total and divided times (along with path info as we have it in the current patch) would be better too. I do not agree on DEBUG level though. The change is a refinement of an existing, vital INFO message. Please also address the checkstyle issues, if they are relevant (sorry, am too late here and the build data's been wiped already). You can run checkstyle goal with maven to get the same results locally. The failing tests don't appear related. > 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)