Hadoop- MapReduce在实际应用中常见的调优
1、Reduce Task Number
通常来说一个block就对应一个map任务进行处理,reduce任务如果人工不去设置干预的话就一个reduce。reduce任务的个数可以通过在程序中设置 job.setNumReduceTasks(个数); ,也可在配置文件上设置reduce任务个数,默认为1, 或者在代码config中配置
Configuration configuration = new Configuration();
configuration.set("mapreduce.job.reduces","");//这个数字根据实际测试和调试来决定
2、Map Task 输出压缩
默认一个块对应一个map任务进行,没办法干预,那么就可以从输出的结果去优化,将结果压缩,如设置Map Task 输出压缩的格式:
Configuration configuration = new Configuration();
configuration.set("mapreduce.map.output.codec","org.apache.hadoop.io.compress.SnappyCodec")
3、shuffle phase 参数
| mapreduce.task.io.sort.factor | 10 | The number of streams to merge at once while sorting files. This determines the number of open file handles. |
| mapreduce.task.io.sort.mb | 100 | The total amount of buffer memory to use while sorting files, in megabytes. By default, gives each merge stream 1MB, which should minimize seeks. |
| mapreduce.map.sort.spill.percent | 0.80 | The soft limit in the serialization buffer. Once reached, a thread will begin to spill the contents to disk in the background. Note that collection will not block if this threshold is exceeded while a spill is already in progress, so spills may be larger than this threshold when it is set to less than .5 |
| mapreduce.map.cpu.vcores | 1 | The number of virtual cores to request from the scheduler for each map task. |
| mapreduce.reduce.memory.mb | 1024 | The amount of memory to request from the scheduler for each reduce task. |
| mapreduce.reduce.cpu.vcores | 1 | The number of virtual cores to request from the scheduler for each reduce task. |
Hadoop- MapReduce在实际应用中常见的调优的更多相关文章
- (转)WebSphere 中池资源调优 - 线程池、连接池和 ORB
WebSphere 中池资源调优 - 线程池.连接池和 ORB 来自:https://www.ibm.com/developerworks/cn/websphere/library/techartic ...
- MapReduce编程实战之“调试”和"调优"
本篇内容 在上一篇的"初识"环节,我们已经在本地和Hadoop集群中,成功的执行了几个MapReduce程序,对MapReduce编程,已经有了最初的理解. 在本篇文章中,我们对M ...
- HBase 中读 HDFS 调优
HDFS Read调优 在基于 HDFS 存储的 HBase 中,主要有两种调优方式: 绕过RPC的选项,称为short circuit reads 开启让HDFS推测性地从多个datanode读数据 ...
- Hadoop企业开发场景案例,虚拟机服务器调优
Hadoop企业开发场景案例 1 案例需求 (1)需求:从1G数据中,统计每个单词出现次数.服务器3台,每台配置4G内存,4核CPU,4线程. (2)需求分析: 1G/128m = 8个M ...
- 数据迁移过程中hive sql调优
本文记录的是,在数据处理过程中,遇到了一个sql执行很慢,对一些大型的hive表还会出现OOM,一步一步通过参数的设置和sql优化,将其调优的过程. 先上sql ) t where t.num =1) ...
- 013 Spark中的资源调优
1.平常的资源使用情况 2.官网 3.资源参数调优 cores memory JVM 4.具体参数 可以在--conf参数中给定资源配置相关信息(配置的一般是JVM的一些垃圾回收机制) --drive ...
- 2.28 MapReduce在实际应用中常见的优化
一.优化的点 Reduce Task Number Map Task输出压缩 Shuffle Phase 参数 map.reduce分配的虚拟CPU 二.Reduce Task Number Redu ...
- Linux网络数据包的揭秘以及常见的调优方式总结
https://mp.weixin.qq.com/s/boRWlx1R7TX0NLuI2sZBfQ 作为业务 SRE,我们所运维的业务,常常以 Linux+TCP/UDP daemon 的形式对外提供 ...
- Hadoop MapReduce 一文详解MapReduce及工作机制
@ 目录 前言-MR概述 1.Hadoop MapReduce设计思想及优缺点 设计思想 优点: 缺点: 2. Hadoop MapReduce核心思想 3.MapReduce工作机制 剖析MapRe ...
随机推荐
- PowerMockito的简单的介绍
转载:http://blog.csdn.net/u012881904/article/details/51334747 我们的依赖的配置 <properties> <powermoc ...
- Android性能优化Google课程翻译一:Render----OverDraw实战
Context 近期实战了下OverDraw,加深了下理解.在上篇文章里Android性能优化Google课程翻译一:Render----OverDraw 写过详细方法. OverDraw解决方法离不 ...
- 【Python】继承
子类的方法__init__() 创建子类的实例时,Python首先需要完成的任务是给父类所有属性赋值,为此,子类的方法__init__()需要父类施以援手. class Car(): '''模拟汽车' ...
- java GC(Garbage Collector) | System.gc()
http://win.sy.blog.163.com/blog/static/94197186201151093543556/ Java垃圾回收调优
- Linux下Nginx安全证书ssl配置方法
分享下我是如何一步步在Nginx上配置SSL的.首先,确保安装了OpenSSL库,并且安装Nginx时使用了–with-http_ssl_module参数. 初学者或者菜鸟建议使用LNMP进行一键安装 ...
- SpringBoot启动流程分析(三):SpringApplication的run方法之prepareContext()方法
SpringBoot系列文章简介 SpringBoot源码阅读辅助篇: Spring IoC容器与应用上下文的设计与实现 SpringBoot启动流程源码分析: SpringBoot启动流程分析(一) ...
- ArrayList中contains,remove方法返回为false的原因
这几天做一个项目时,遇到ArrayList.remove(Object)方法失败,而ArrayList"包含"删除的对象,这其中的"包含"不是完全包含,请看下面 ...
- C#如何遍历数组?
// 一维数组 int[] arr = { 1, 2, 3, 4, 5 }; foreach (int i in arr) { Console.WriteLine(i.ToString() + &qu ...
- 【转】【Pycharm大全】
感谢:陈俊岭的程序员之路 [Pycharm大全]:http://blog.csdn.net/u013088062/article/details/50388329
- 新装上线 年度精品 XP,32/64位Win7,32/64位Win10系统【电脑城版】
随着Windows 10Build 10074 Insider Preview版发布,有理由相信,Win10离最终RTM阶段已经不远了.看来稍早前传闻的合作伙伴透露微软将在7月底正式发布Win10的消 ...