bigdata_hadoop集群配置_内存分配
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集群配置_内存分配的更多相关文章
- redis集群配置
客户端分片 程序端实现 代理proxy,访问proxy,proxy指定redis保存位置. Twemproxy Redis cluster ,会造成一部分数据丢失,无中心化1.将数据自动切分(spli ...
- nginx+tomcat集群配置(1)---根目录设定和多后端分发配置
前言: 对于javaer而言, nginx+tomcat集群配置, 已然成了web应用部署的主流. 大公司如此, 小公司亦然. 对于个人开发者而言, 资源有限, 往往多个web应用混部于一台服务器(云 ...
- ES2:ElasticSearch 集群配置
ElasticSearch共有两个配置文件,都位于config目录下,分别是elasticsearch.yml和logging.yml,其中,elasticsearch.yml 用来配置Elastic ...
- 即时通信系统Openfire分析之七:集群配置
前言 写这章之前,我犹豫了一会.在这个时候提集群,从章节安排上来讲,是否合适?但想到上一章<路由表>的相关内容,应该不至于太突兀.既然这样,那就撸起袖子干吧. Openfire的单机并发量 ...
- redis主从同步故障切换及集群配置
一.redis是一中高性能的缓存数据库, 原理:1. 从服务器向主服务器发送 SYNC 命令.2. 接到 SYNC 命令的主服务器会调用BGSAVE 命令,创建一个 RDB 文件,并使用缓冲区记录接下 ...
- ElasticSearch入门 第二篇:集群配置
这是ElasticSearch 2.4 版本系列的第二篇: ElasticSearch入门 第一篇:Windows下安装ElasticSearch ElasticSearch入门 第二篇:集群配置 E ...
- Redis-5.0.0集群配置
版本:redis-5.0.0 参考:http://redis.io/topics/cluster-tutorial. 集群部署交互式命令行工具:https://github.com/eyjian/re ...
- CentOS7.1.x+Druid 0.12 集群配置
原文转载自:https://blog.csdn.net/bigtree_3721/article/details/79583008 先决条件:安装版本列表 本次安装满足下面的条件: CentOS v7 ...
- Centos6 安装 Redis 和集群配置
Redis安装 先确认gcc和tcl已经安装 sudo yum install gcc-c++ sudo yum install tcl 解压, 编译和安装 .tar.gz /usr/src/ cd ...
随机推荐
- Android动画之二:View Animation
作为一个博客<Android其中的动画:Drawable Animation>.android动画主要分为三大部分.上一篇博客已经解说Drawable Animation的使用方法,即逐帧 ...
- 两个文件中的配置项设置方法和C比较程序处理
在实际的软件开发项目.程序经常需要翻阅了一些资料可能会改变从外部,我们需要读出的信息到一个统一的文件(一般ini档),而此文件被称为个人资料. 考虑这样一个场景,程序须要与多个数据库打交道,要从配置文 ...
- (转)Maven最佳实践:划分模块
“分天下为三十六郡,郡置守,尉,监” —— <史记·秦始皇本纪> 所有用Maven管理的真实的项目都应该是分模块的,每个模块都对应着一个pom.xml.它们之间通过继承和聚合(也称作多模块 ...
- PHPSingleton模式的例子
在这篇文章中PHPSingleton模式的解释不一定好!仅举它的一个例子.其目的是为了让自己通过一个例子来加深对Singleton模式的理解!这里,以供参考! 单例:能够简单的理解是通过一个类,仅仅能 ...
- hdu1506——Largest Rectangle in a Histogram
Largest Rectangle in a Histogram Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 ...
- ZOJ3827 ACM-ICPC 2014 亚洲区域赛的比赛现场牡丹江I称号 Information Entropy 水的问题
Information Entropy Time Limit: 2 Seconds Memory Limit: 131072 KB Special Judge Informatio ...
- [LeetCode217]Contains Duplicate
题目:Given an array of integers, find if the array contains any duplicates. Your function should retur ...
- HDU 3126 Nova [2009 Asia Wuhan Regional Contest Online]
标题效果 有着n巫妖.m精灵.k木.他们都有自己的位置坐标表示.冷却时间,树有覆盖范围. 假设某个巫妖攻击精灵的路线(他俩之间的连线)经过树的覆盖范围,表示精灵被树挡住巫妖攻击不到.求巫妖杀死所有精灵 ...
- FastDFS设备、构造、配置()一-安装和部署
FastDFS是一个开源的.高性能的的分布式文件系统,他基本的功能包含:文件存储.同步和訪问,设计基于高可用和负载均衡,FastDFS很适用于基于文件服务的站点.比如图片分享和视频分享站点 FastD ...
- 11gRAC CHM 管理
Cluster Health Monitor(缩写CHM)是Oracle提供的工具,自己主动的资源来收集操作系统(CPU.内存.SWAP.过程.I/O与网络)用法. CHM数据被收集每秒一次,11.2 ...