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 ...
随机推荐
- 【翻译mos文章】Linux x86 and x86-64 系统SHMMAX最大
Linux x86 and x86-64 系统SHMMAX最大值 参考原始: Maximum SHMMAX values for Linux x86 and x86-64 (文件 ID 567506. ...
- Matlab强迫症产生的图像
最近流行的网络迷恋的照片做头像,闲来无事,取matlab获取一个建设者,它可以产生包括0-9以及99+OCD. 原理很easy,图叠加,这里为了降低文件,将数字图片保存在.mat二进制文件里. === ...
- Gradle构建多模块项目(转)
废话不多说,直接进入主题. 1. 创建项目 首先创建项目,名称为 test: mkdir test && cd test gradle init 这时候的项目结构如下: ➜ test ...
- Linux鸟哥的私房菜(3)— 总体规划和磁盘分区 读书笔记
1.每个硬件设备Linux中的文件名称 在Linux系统中.每一个设备都被当成一个文件来对待.而且差点儿全部的硬件设备文件都在/dev文件夹下 常见设备与其对于文件名称 2.磁盘连接的方式与设备文件名 ...
- c# winfrom DataGridView使行高不可改变,使列头高度不可改变,
// 禁止用户改变DataGridView1的所有列的列宽 //DataGridView1.AllowUserToResizeColumns = false; //禁止用户改变DataGridView ...
- CentOS-6.5-x86_64 最小化安装后,怎样安装 man 程序?
CentOS-6.5-x86_64 最小化安装后.怎样安装man 程序? CentOS-6.5-x86_64 最小化安装后,没有man 程序,没它还真的不方便. man 是 manual(手冊)的意思 ...
- opencv2对于读书笔记——背投影图像的直方图来检测待处理的内容
一些小的概念 1.直方图是图像内容的一个重要特性. 2.假设一幅图像的区域中显示的是一种独特的纹理或是一个独特的物体,那么这个区域的直方图能够看作是一个概率函数,它给出的是某个像素属于该纹理或物体的概 ...
- struts 1.x 原理
Struts 当我接触到这个框架的时候.我就在想为什么是struts,而不是什么CraigFramework.结构.支撑,这样来理解也不难怪了. 为什么须要struts? 在struts in act ...
- 【转】linux建立软链接
实例:ln -s /home/gamestat /gamestat linux下的软链接类似于windows下的快捷方式 ln -s a b 中的 a 就是源文件,b是链接文件名,其作用是当进入 ...
- 跳转表C语言,不比redis版本号
本来跳表的原理很easy的(相对于红 - 黑树),但国庆间歇性地搞5天才捞起来-- 我学会了跳之前写表的链式结构完全基于,我看着写的过程中redis实现,它的每个键列都是用数组来表示的.细致想了想发现 ...