Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C303E41A for ; Mon, 14 Jan 2013 21:41:00 +0000 (UTC) Received: (qmail 84469 invoked by uid 500); 14 Jan 2013 21:40:55 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 84353 invoked by uid 500); 14 Jan 2013 21:40:55 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 84337 invoked by uid 99); 14 Jan 2013 21:40:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 21:40:55 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=DEAR_SOMETHING,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adi@cloudera.com designates 209.85.223.175 as permitted sender) Received: from [209.85.223.175] (HELO mail-ie0-f175.google.com) (209.85.223.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 21:40:48 +0000 Received: by mail-ie0-f175.google.com with SMTP id qd14so5816073ieb.20 for ; Mon, 14 Jan 2013 13:40:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=KQhp3A2A48vDSkscQptKKel6gDULJTpSYuPyEgaIYYc=; b=SDZDcupnBVIpG5i1QWwQbEC04SiU0h9ecouaqBxRdrthJwd32EDcWFYaxiB1EduKbm z9Jw7/iVw8TTpyy2k+500fpTo4XPOBnFQCU00SUCY8AgwCYKde3uSGNqlTUrq40iia4G K1Tunsc24grzg7/6xWx7lLlaUywBpy8k40xaJxZXlkVdlVUWBCaGqs/QDRUSxhF9C8hC ZWxJsT6V4f3btA5WCMjsxhJUXdmqn/I+a0AzEqrVT1CZDqoIV88mSYIMH4y04YgArBzw LBBckMBwRiHvvnYNT/jLg3GZQo8dxAMGojFdsrefRt26bqUrfqlaMprK+XlK78BkNm9y 6gsg== MIME-Version: 1.0 Received: by 10.42.19.197 with SMTP id d5mr16411960icb.29.1358199627591; Mon, 14 Jan 2013 13:40:27 -0800 (PST) Received: by 10.64.13.207 with HTTP; Mon, 14 Jan 2013 13:40:27 -0800 (PST) In-Reply-To: <3E657120E422654A9EB626F537B8AA910FDB9214@SHSMSX102.ccr.corp.intel.com> References: <3E657120E422654A9EB626F537B8AA910FDB5622@SHSMSX102.ccr.corp.intel.com> <3E657120E422654A9EB626F537B8AA910FDB9214@SHSMSX102.ccr.corp.intel.com> Date: Mon, 14 Jan 2013 13:40:27 -0800 Message-ID: Subject: Re: Some mappers are much slower than others in reading data from HDFS From: Andy Isaacson To: user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkYtsd+qFu1jae8TSWYBMJOTroaAtWHOfKD9rtJxg46pX6x9giPmip+ASXyftFBSSxpq/m8 X-Virus-Checked: Checked by ClamAV on apache.org It's hard to speculate on the minimal information you've provided so far. Seems like it's time to break out the performance analysis toolkit and see what's going on differently between the fast and the slow nodes. I'd look at raw performance with dd, then watch behavior during mapper runs with vmstat or iostat and top, and investigate any configuration differences between the nodes. -andy On Sun, Jan 13, 2013 at 6:05 PM, Chen, Haifeng wro= te: > Thank for your response, Andy. > > I think node2 has more mappers than others because the mappers on node2 m= ove on faster and finish earlier than the mappers on node3 and node4. When = the first wave of mappers on node2 (00018, 00019, ...) finished and there a= re more mappers to run, then the resource manager allocated another wave of= the mappers to node2 (00025, 00026, ...). And still, the mappers on node2 = are the ones runs fastest. > > Is it possible that it is because of cache distribution(disk cache?) Does= data node hold any cache of recently accessed data? > > Regards, > Haifeng > > > -----Original Message----- > From: Andy Isaacson [mailto:adi@cloudera.com] > Sent: Wednesday, January 09, 2013 5:46 AM > To: user@hadoop.apache.org > Subject: Re: Some mappers are much slower than others in reading data fro= m HDFS > > Your output shows that node2 has 13 mappers and the reducer, while > node3 and node4 had only 8 mappers each. So I'd expect some > disparity. Since it's hard to correlate the mapper throughput against > the reducer throughput, it's possible that node3 got just as much work > done. > > That doesn't explain why node4 is slower than node3, though. > > -andy > > On Mon, Jan 7, 2013 at 7:07 PM, Chen, Haifeng wr= ote: >> Dear sir, >> >> I encountered a strange problem that all the mappers on some nodes are m= uch >> slower than the mappers on other nodes as following some times (not alwa= ys). >> I didn't see any reasons why they should slow down in this pattern. >> >> >> >> 000013(MAP on node4): --------(8.115) >> >> 000014(MAP on node4): --------(8.570) >> >> 000011(MAP on node4): --------(8.5) >> >> 000016(MAP on node4): --------(8.344) >> >> 000010(MAP on node4): --------(8.585) >> >> 000015(MAP on node4): --------(8.179) >> >> 000017(MAP on node4): --------(8.445) >> >> 000012(MAP on node4): --------(8.312) >> >> 000018(MAP on node2): ---(3.367) >> >> 000020(MAP on node2): ---(3.335) >> >> 000019(MAP on node2): ---(3.320) >> >> 000023(MAP on node2): ---(3.91) >> >> 000022(MAP on node2): ---(3.371) >> >> 000021(MAP on node2): ---(3.458) >> >> 000004(MAP on node3): -------------------(19.624) >> >> 000007(MAP on node3): -------------------(19.92) >> >> 000005(MAP on node3): --------------------(20.613) >> >> 000008(MAP on node3): --------------------(20.316) >> >> 000003(MAP on node3): --------------------(20.574) >> >> 000006(MAP on node3): --------------------(20.654) >> >> 000002(MAP on node3): -------------------(19.935) >> >> 000009(MAP on node3): --------------------(20.489) >> >> 000025(MAP on node2): --(2.877) >> >> 000026(MAP on node2): ---(3.112) >> >> 000027(MAP on node2): --(2.959) >> >> 000024(MAP on node2): --(2.845) >> >> 000029(MAP on node2): --(2.863) >> >> 000028(MAP on node2): --(2.933) >> >> 000031(MAP on node2): --(2.596) >> >> 000030(RED on node2): -------------(13.378) >> >> >> >> The testing is as following: >> >> I have a 4 nodes cluster and all of them has the same hardware and softw= are >> configurations. One node acts as name node and yarn resource manager. O= ther >> three nodes act as both data node and yarn node manager. >> >> >> >> The test input file is around 7GB file on the HDFS cluster and the >> replication number is 3. (This means that each data node has a copy of e= very >> block of the file) >> >> >> >> The mapper did nothing and didn't write out any records: >> >> >> >> public static class KeyMapper >> >> extends Mapper{ >> >> public void map(Object key, Text value, Context context >> >> ) throws IOException, InterruptedException { >> >> >> >> } >> >> } >> >> >> >> So this mapper logically is reading and iterating through its splits of = data >> and then finish the job. >> >> I didn't see any factors in the above configurations that will cause the >> above phenomenon. >> >> I turned on the debug log for each mapper task and it also showed that a= ll >> the mapper's DFSClient read data from its local data node. >> >> >> >> Can any experts help give some hints for this? I attached the log and cl= ient >> code for analysis. >> >> >> >> Thanks, >> >> Haifeng