Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2141C10748 for ; Sun, 9 Jun 2013 13:04:28 +0000 (UTC) Received: (qmail 1431 invoked by uid 500); 9 Jun 2013 13:04:22 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 253 invoked by uid 500); 9 Jun 2013 13:04:20 -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 243 invoked by uid 99); 9 Jun 2013 13:04:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jun 2013 13:04:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of harsh@cloudera.com designates 209.85.192.172 as permitted sender) Received: from [209.85.192.172] (HELO mail-pd0-f172.google.com) (209.85.192.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jun 2013 13:04:13 +0000 Received: by mail-pd0-f172.google.com with SMTP id z10so2921124pdj.3 for ; Sun, 09 Jun 2013 06:03:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=1q5Sbn751fQeVnANDBg/wyBtVgWVzp8s3QFmIjlIj8k=; b=lXH6QVKsjXDy7b/2ZzWeffZgzuHacrNY6Y0FENBDVhj41nR6E4na9ahTBuEcLtvzpc 2i1RU/O2Da/m30O0ELJIU3F1GoQJkqLVoDNDSRuGlBTYc7q1FghpjpkyaqmfTel1D2ar Bue41L8WnrzhIIblpuOGlOy7CkHp8VCLKY8D9sXHRPpL32kGrVVHtpQGC1+ZbT6q16OD v9qqqda8Gu/RyTP6V0Eom3LWFVLr8A6rUU8kO6xX7ebubnL9IoQmUwRfGkMMh+XbnOZ1 UqnjR49VFeO0EWL/NikmpP7iuRqeBGJ9/0yZ3T/CUHHvrmweqIm/pTXa2KyRKYTagVtW l0GA== X-Received: by 10.66.248.68 with SMTP id yk4mr10299654pac.137.1370783032207; Sun, 09 Jun 2013 06:03:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.77.230 with HTTP; Sun, 9 Jun 2013 06:03:31 -0700 (PDT) In-Reply-To: References: From: Harsh J Date: Sun, 9 Jun 2013 18:33:31 +0530 Message-ID: Subject: Re: Why my tests shows Yarn is worse than MRv1 for terasort? To: "" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQl3g21bFIF69sPTav6q0Nk6G4kdLJcosc2wcxP+32UQhQvXLVAjkvYOzDHz0EsM4qEUElFz X-Virus-Checked: Checked by ClamAV on apache.org Hi Sam, > - How to know the container number? Why you say it will be 22 containers due to a 22 GB memory? The MR2's default configuration requests 1 GB resource each for Map and Reduce containers. It requests 1.5 GB for the AM container that runs the job, additionally. This is tunable using the properties Sandy's mentioned in his post. > - My machine has 32 GB memory, how many memory is proper to be assigned to containers? This is a general question. You may use the same process you took to decide optimal number of slots in MR1 to decide this here. Every container is a new JVM, and you're limited by the CPUs you have there (if not the memory). Either increase memory requests from jobs, to lower # of concurrent containers at a given time (runtime change), or lower NM's published memory resources to control the same (config change). > - In mapred-site.xml, if I set 'mapreduce.framework.name' to be 'yarn', will other parameters for mapred-site.xml still work in yarn framework? Like 'mapreduce.task.io.sort.mb' and 'mapreduce.map.sort.spill.percent' Yes, all of these properties will still work. Old properties specific to JobTracker or TaskTracker (usually found as a keyword in the config name) will not apply anymore. On Sun, Jun 9, 2013 at 2:21 PM, sam liu wrote: > Hi Harsh, > > According to above suggestions, I removed the duplication of setting, and > reduce the value of 'yarn.nodemanager.resource.cpu-cores', > 'yarn.nodemanager.vcores-pcores-ratio' and > 'yarn.nodemanager.resource.memory-mb' to 16, 8 and 12000. Ant then, the > efficiency improved about 18%. I have questions: > > - How to know the container number? Why you say it will be 22 containers due > to a 22 GB memory? > - My machine has 32 GB memory, how many memory is proper to be assigned to > containers? > - In mapred-site.xml, if I set 'mapreduce.framework.name' to be 'yarn', will > other parameters for mapred-site.xml still work in yarn framework? Like > 'mapreduce.task.io.sort.mb' and 'mapreduce.map.sort.spill.percent' > > Thanks! > > > > 2013/6/8 Harsh J >> >> Hey Sam, >> >> Did you get a chance to retry with Sandy's suggestions? The config >> appears to be asking NMs to use roughly 22 total containers (as >> opposed to 12 total tasks in MR1 config) due to a 22 GB memory >> resource. This could impact much, given the CPU is still the same for >> both test runs. >> >> On Fri, Jun 7, 2013 at 12:23 PM, Sandy Ryza >> wrote: >> > Hey Sam, >> > >> > Thanks for sharing your results. I'm definitely curious about what's >> > causing the difference. >> > >> > A couple observations: >> > It looks like you've got yarn.nodemanager.resource.memory-mb in there >> > twice >> > with two different values. >> > >> > Your max JVM memory of 1000 MB is (dangerously?) close to the default >> > mapreduce.map/reduce.memory.mb of 1024 MB. Are any of your tasks getting >> > killed for running over resource limits? >> > >> > -Sandy >> > >> > >> > On Thu, Jun 6, 2013 at 10:21 PM, sam liu wrote: >> >> >> >> The terasort execution log shows that reduce spent about 5.5 mins from >> >> 33% >> >> to 35% as below. >> >> 13/06/10 08:02:22 INFO mapreduce.Job: map 100% reduce 31% >> >> 13/06/10 08:02:25 INFO mapreduce.Job: map 100% reduce 32% >> >> 13/06/10 08:02:46 INFO mapreduce.Job: map 100% reduce 33% >> >> 13/06/10 08:08:16 INFO mapreduce.Job: map 100% reduce 35% >> >> 13/06/10 08:08:19 INFO mapreduce.Job: map 100% reduce 40% >> >> 13/06/10 08:08:22 INFO mapreduce.Job: map 100% reduce 43% >> >> >> >> Any way, below are my configurations for your reference. Thanks! >> >> (A) core-site.xml >> >> only define 'fs.default.name' and 'hadoop.tmp.dir' >> >> >> >> (B) hdfs-site.xml >> >> >> >> dfs.replication >> >> 1 >> >> >> >> >> >> >> >> dfs.name.dir >> >> /opt/hadoop-2.0.4-alpha/temp/hadoop/dfs_name_dir >> >> >> >> >> >> >> >> dfs.data.dir >> >> /opt/hadoop-2.0.4-alpha/temp/hadoop/dfs_data_dir >> >> >> >> >> >> >> >> dfs.block.size >> >> 134217728 >> >> >> >> >> >> >> >> dfs.namenode.handler.count >> >> 64 >> >> >> >> >> >> >> >> dfs.datanode.handler.count >> >> 10 >> >> >> >> >> >> (C) mapred-site.xml >> >> >> >> mapreduce.cluster.temp.dir >> >> /opt/hadoop-2.0.4-alpha/temp/hadoop/mapreduce_temp >> >> No description >> >> true >> >> >> >> >> >> >> >> mapreduce.cluster.local.dir >> >> >> >> /opt/hadoop-2.0.4-alpha/temp/hadoop/mapreduce_local_dir >> >> No description >> >> true >> >> >> >> >> >> >> >> mapreduce.child.java.opts >> >> -Xmx1000m >> >> >> >> >> >> >> >> mapreduce.framework.name >> >> yarn >> >> >> >> >> >> >> >> mapreduce.tasktracker.map.tasks.maximum >> >> 8 >> >> >> >> >> >> >> >> mapreduce.tasktracker.reduce.tasks.maximum >> >> 4 >> >> >> >> >> >> >> >> >> >> mapreduce.tasktracker.outofband.heartbeat >> >> true >> >> >> >> >> >> (D) yarn-site.xml >> >> >> >> yarn.resourcemanager.resource-tracker.address >> >> node1:18025 >> >> host is the hostname of the resource manager and >> >> port is the port on which the NodeManagers contact the Resource >> >> Manager. >> >> >> >> >> >> >> >> >> >> The address of the RM web application. >> >> yarn.resourcemanager.webapp.address >> >> node1:18088 >> >> >> >> >> >> >> >> >> >> yarn.resourcemanager.scheduler.address >> >> node1:18030 >> >> host is the hostname of the resourcemanager and port >> >> is >> >> the port >> >> on which the Applications in the cluster talk to the Resource >> >> Manager. >> >> >> >> >> >> >> >> >> >> >> >> yarn.resourcemanager.address >> >> node1:18040 >> >> the host is the hostname of the ResourceManager and >> >> the >> >> port is the port on >> >> which the clients can talk to the Resource Manager. >> >> >> >> >> >> >> >> yarn.nodemanager.local-dirs >> >> >> >> /opt/hadoop-2.0.4-alpha/temp/hadoop/yarn_nm_local_dir >> >> the local directories used by the >> >> nodemanager >> >> >> >> >> >> >> >> yarn.nodemanager.address >> >> 0.0.0.0:18050 >> >> the nodemanagers bind to this port >> >> >> >> >> >> >> >> yarn.nodemanager.resource.memory-mb >> >> 10240 >> >> the amount of memory on the NodeManager in >> >> GB >> >> >> >> >> >> >> >> yarn.nodemanager.remote-app-log-dir >> >> /opt/hadoop-2.0.4-alpha/temp/hadoop/yarn_nm_app-logs >> >> directory on hdfs where the application logs are moved >> >> to >> >> >> >> >> >> >> >> >> >> yarn.nodemanager.log-dirs >> >> /opt/hadoop-2.0.4-alpha/temp/hadoop/yarn_nm_log >> >> the directories used by Nodemanagers as log >> >> directories >> >> >> >> >> >> >> >> yarn.nodemanager.aux-services >> >> mapreduce.shuffle >> >> shuffle service that needs to be set for Map Reduce to >> >> run >> >> >> >> >> >> >> >> yarn.resourcemanager.client.thread-count >> >> 64 >> >> >> >> >> >> >> >> yarn.nodemanager.resource.cpu-cores >> >> 24 >> >> >> >> >> >> >> >> yarn.nodemanager.vcores-pcores-ratio >> >> 3 >> >> >> >> >> >> >> >> yarn.nodemanager.resource.memory-mb >> >> 22000 >> >> >> >> >> >> >> >> yarn.nodemanager.vmem-pmem-ratio >> >> 2.1 >> >> >> >> >> >> >> >> >> >> 2013/6/7 Harsh J >> >>> >> >>> Not tuning configurations at all is wrong. YARN uses memory resource >> >>> based scheduling and hence MR2 would be requesting 1 GB minimum by >> >>> default, causing, on base configs, to max out at 8 (due to 8 GB NM >> >>> memory resource config) total containers. Do share your configs as at >> >>> this point none of us can tell what it is. >> >>> >> >>> Obviously, it isn't our goal to make MR2 slower for users and to not >> >>> care about such things :) >> >>> >> >>> On Fri, Jun 7, 2013 at 8:45 AM, sam liu >> >>> wrote: >> >>> > At the begining, I just want to do a fast comparision of MRv1 and >> >>> > Yarn. >> >>> > But >> >>> > they have many differences, and to be fair for comparison I did not >> >>> > tune >> >>> > their configurations at all. So I got above test results. After >> >>> > analyzing >> >>> > the test result, no doubt, I will configure them and do comparison >> >>> > again. >> >>> > >> >>> > Do you have any idea on current test result? I think, to compare >> >>> > with >> >>> > MRv1, >> >>> > Yarn is better on Map phase(teragen test), but worse on Reduce >> >>> > phase(terasort test). >> >>> > And any detailed suggestions/comments/materials on Yarn performance >> >>> > tunning? >> >>> > >> >>> > Thanks! >> >>> > >> >>> > >> >>> > 2013/6/7 Marcos Luis Ortiz Valmaseda >> >>> >> >> >>> >> Why not to tune the configurations? >> >>> >> Both frameworks have many areas to tune: >> >>> >> - Combiners, Shuffle optimization, Block size, etc >> >>> >> >> >>> >> >> >>> >> >> >>> >> 2013/6/6 sam liu >> >>> >>> >> >>> >>> Hi Experts, >> >>> >>> >> >>> >>> We are thinking about whether to use Yarn or not in the near >> >>> >>> future, >> >>> >>> and >> >>> >>> I ran teragen/terasort on Yarn and MRv1 for comprison. >> >>> >>> >> >>> >>> My env is three nodes cluster, and each node has similar hardware: >> >>> >>> 2 >> >>> >>> cpu(4 core), 32 mem. Both Yarn and MRv1 cluster are set on the >> >>> >>> same >> >>> >>> env. To >> >>> >>> be fair, I did not make any performance tuning on their >> >>> >>> configurations, but >> >>> >>> use the default configuration values. >> >>> >>> >> >>> >>> Before testing, I think Yarn will be much better than MRv1, if >> >>> >>> they >> >>> >>> all >> >>> >>> use default configuration, because Yarn is a better framework than >> >>> >>> MRv1. >> >>> >>> However, the test result shows some differences: >> >>> >>> >> >>> >>> MRv1: Hadoop-1.1.1 >> >>> >>> Yarn: Hadoop-2.0.4 >> >>> >>> >> >>> >>> (A) Teragen: generate 10 GB data: >> >>> >>> - MRv1: 193 sec >> >>> >>> - Yarn: 69 sec >> >>> >>> Yarn is 2.8 times better than MRv1 >> >>> >>> >> >>> >>> (B) Terasort: sort 10 GB data: >> >>> >>> - MRv1: 451 sec >> >>> >>> - Yarn: 1136 sec >> >>> >>> Yarn is 2.5 times worse than MRv1 >> >>> >>> >> >>> >>> After a fast analysis, I think the direct cause might be that Yarn >> >>> >>> is >> >>> >>> much faster than MRv1 on Map phase, but much worse on Reduce >> >>> >>> phase. >> >>> >>> >> >>> >>> Here I have two questions: >> >>> >>> - Why my tests shows Yarn is worse than MRv1 for terasort? >> >>> >>> - What's the stratage for tuning Yarn performance? Is any >> >>> >>> materials? >> >>> >>> >> >>> >>> Thanks! >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> -- >> >>> >> Marcos Ortiz Valmaseda >> >>> >> Product Manager at PDVSA >> >>> >> http://about.me/marcosortiz >> >>> >> >> >>> > >> >>> >> >>> >> >>> >> >>> -- >> >>> Harsh J >> >> >> >> >> > >> >> >> >> -- >> Harsh J > > -- Harsh J