haoop集群  做好内存管理跟重要,不然经常会给抛出个 OutMemory   ,内存溢出

以horntonworks给出推荐配置为样本,给出一种常见的Hadoop集群上各组件的内存分配方案。配置时通过 ambari对应修改,或者后台同步修改 。

【样本】

he final calculation is to determine the amount of RAM per container:

RAM-per-Container = maximum of (MIN_CONTAINER_SIZE, (Total Available RAM) / Containers))

With these calculations, the YARN and MapReduce configurations can be set:

Configuration File Configuration Setting Value Calculation
yarn-site.xml yarn.nodemanager.resource.memory-mb = Containers * RAM-per-Container
yarn-site.xml yarn.scheduler.minimum-allocation-mb = RAM-per-Container
yarn-site.xml yarn.scheduler.maximum-allocation-mb = containers * RAM-per-Container
mapred-site.xml mapreduce.map.memory.mb = RAM-per-Container
mapred-site.xml mapreduce.reduce.memory.mb = 2 * RAM-per-Container
mapred-site.xml mapreduce.map.java.opts = 0.8 * RAM-per-Container
mapred-site.xml mapreduce.reduce.java.opts = 0.8 * 2 * RAM-per-Container
yarn-site.xml (check) yarn.app.mapreduce.am.resource.mb = 2 * RAM-per-Container
yarn-site.xml (check) yarn.app.mapreduce.am.command-opts = 0.8 * 2 * RAM-per-Container

Note: After installation, both yarn-site.xml and mapred-site.xml are located in the /etc/hadoop/conf folder.

Configuration File Configuration Setting Value Calculation M
yarn-site.xml yarn.nodemanager.resource.memory-mb = Containers * RAM-per-Container(54G)
yarn-site.xml yarn.scheduler.minimum-allocation-mb = 2048
yarn-site.xml yarn.scheduler.maximum-allocation-mb = containers * RAM-per-Container (54G)
mapred-site.xml mapreduce.map.memory.mb = 2048
mapred-site.xml mapreduce.reduce.memory.mb = 4096
mapred-site.xml mapreduce.map.java.opts = 1638
mapred-site.xml mapreduce.reduce.java.opts = 3276
yarn-site.xml (check) yarn.app.mapreduce.am.resource.mb = 2048
yarn-site.xml (check) yarn.app.mapreduce.am.command-opts = 3276

【样例1】

Configuration File Configuration Setting Value Calculation
yarn-site.xml yarn.nodemanager.resource.memory-mb = Containers * RAM-per-Container
yarn-site.xml yarn.scheduler.minimum-allocation-mb = RAM-per-Container
yarn-site.xml yarn.scheduler.maximum-allocation-mb = containers * RAM-per-Container
mapred-site.xml mapreduce.map.memory.mb = RAM-per-Container
mapred-site.xml mapreduce.reduce.memory.mb = 2 * RAM-per-Container
mapred-site.xml mapreduce.map.java.opts = 0.8 * RAM-per-Container
mapred-site.xml mapreduce.reduce.java.opts = 0.8 * 2 * RAM-per-Container
yarn-site.xml (check) yarn.app.mapreduce.am.resource.mb = 2 * RAM-per-Container
yarn-site.xml (check) yarn.app.mapreduce.am.command-opts = 0.8 * 2 * RAM-per-Container

【样例2】

方案最右侧一栏是一个8G VM的分配方案,方案预留1-2G的内存给操作系统,分配4G给Yarn/MapReduce,当然也包括了HIVE,剩余的2-3G是在需要使用HBase时预留给HBase的。 参考:http://blog.csdn.net/bluishglc/article/details/42436321

【备注】

另外自己通过thrift链接时 ,留意自己加载时 重设配置,造成任务类似失败 <set mapreduce.map.java.opts=-Xmx1024m;>   当hive提交任务

eg:select count(*) from test; 没问题,但是  自己平台提交有问题 。仔细比对配置  例如搜索关键词 :memory ,opts

参考:http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.0.9.1/bk_installing_manually_book/content/rpm-chap1-11.html

bigdata_hadoop集群配置_内存分配的更多相关文章

  1. redis集群配置

    客户端分片 程序端实现 代理proxy,访问proxy,proxy指定redis保存位置. Twemproxy Redis cluster ,会造成一部分数据丢失,无中心化1.将数据自动切分(spli ...

  2. nginx+tomcat集群配置(1)---根目录设定和多后端分发配置

    前言: 对于javaer而言, nginx+tomcat集群配置, 已然成了web应用部署的主流. 大公司如此, 小公司亦然. 对于个人开发者而言, 资源有限, 往往多个web应用混部于一台服务器(云 ...

  3. ES2:ElasticSearch 集群配置

    ElasticSearch共有两个配置文件,都位于config目录下,分别是elasticsearch.yml和logging.yml,其中,elasticsearch.yml 用来配置Elastic ...

  4. 即时通信系统Openfire分析之七:集群配置

    前言 写这章之前,我犹豫了一会.在这个时候提集群,从章节安排上来讲,是否合适?但想到上一章<路由表>的相关内容,应该不至于太突兀.既然这样,那就撸起袖子干吧. Openfire的单机并发量 ...

  5. redis主从同步故障切换及集群配置

    一.redis是一中高性能的缓存数据库, 原理:1. 从服务器向主服务器发送 SYNC 命令.2. 接到 SYNC 命令的主服务器会调用BGSAVE 命令,创建一个 RDB 文件,并使用缓冲区记录接下 ...

  6. ElasticSearch入门 第二篇:集群配置

    这是ElasticSearch 2.4 版本系列的第二篇: ElasticSearch入门 第一篇:Windows下安装ElasticSearch ElasticSearch入门 第二篇:集群配置 E ...

  7. Redis-5.0.0集群配置

    版本:redis-5.0.0 参考:http://redis.io/topics/cluster-tutorial. 集群部署交互式命令行工具:https://github.com/eyjian/re ...

  8. CentOS7.1.x+Druid 0.12 集群配置

    原文转载自:https://blog.csdn.net/bigtree_3721/article/details/79583008 先决条件:安装版本列表 本次安装满足下面的条件: CentOS v7 ...

  9. Centos6 安装 Redis 和集群配置

    Redis安装 先确认gcc和tcl已经安装 sudo yum install gcc-c++ sudo yum install tcl 解压, 编译和安装 .tar.gz /usr/src/ cd ...

随机推荐

  1. Matlab强迫症产生的图像

    最近流行的网络迷恋的照片做头像,闲来无事,取matlab获取一个建设者,它可以产生包括0-9以及99+OCD. 原理很easy,图叠加,这里为了降低文件,将数字图片保存在.mat二进制文件里. === ...

  2. hdu 4296 Buildings(贪婪)

    主题链接:http://acm.hdu.edu.cn/showproblem.php? pid=4296 Buildings Time Limit: 5000/2000 MS (Java/Others ...

  3. 杭电1171 Big Event in HDU(母函数+多重背包解法)

    Big Event in HDU Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  4. 王立平--怎么查看Unity的版本号

    1.打开Unity,Help->About Unity 2.版本

  5. Leetcode 实施细节 Rotate Image

    本文senlie原版的,转载请保留此地址:http://blog.csdn.net/zhengsenlie Rotate Image Total Accepted: 15609 Total Submi ...

  6. 阿里2015回顾面试招收学历(获得成功offer)

    1. 引言 继上次"百度2015校园招聘面试题回顾录(成功拿到offer)"文章过后,大家都希望除了题目之外.最好能给出自己当时的回答情况,看看有没有什么回答技巧,这样更有參考价值 ...

  7. HDU 5002 Tree

    题意: 一棵树  支持删边加边.路径权值加值.路径权值改值.路径求第二大的数字和其个数 思路: LCT的第二题  题意已经把功能都告诉了  比較裸 要注意的是权值加值和改值两个操作的标记下放问题  要 ...

  8. 第十七章——配置SQLServer(1)——为SQLServer配置更多的处理器

    原文:第十七章--配置SQLServer(1)--为SQLServer配置更多的处理器 前言: SQLServer提供了一个系统存储过程,SP_Configure,可以帮助你管理实例级别的配置.微软建 ...

  9. 【微信公众平台开发】百度周边搜索接口php封装

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcWl2YW4=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/d ...

  10. 有关XCode6(iOS8)UITableViewCell与iOS7在UITableViewCell问题

    简而言之: iOS6在cell的层次关系2层,但在iOS7层次结构成为3层,但在iOS8的SDK在UITableViewCell层次结构发生了变化2层. 如果它们是UITableViewCell加入到 ...