Linux Control Groups(cgroups):在操作系统级别进行资源分配,可通过Cloudera Static Service Pools配置。

YARN调度器配置:对运行在YARN上的应用进行资源配置,比如M/R,implala。可通过Cloudera 动态资源池进行配置。

以下资源可以通过cgroups配置进行限制:

Memory Hard Limit

– If a process exceeds this limit, the kernel swaps out some of the process’s memory; if it cannot do so, the process will be killed

Memory Soft Limit

– When memory contenFon exists on the host, the OS targets the process to not exceed this limit

CPU Shares

– When CPU contenFon exists on the host, processes with higher CPU shares will be given more CPU time

I/O Weight 

– Specify the proportion of I/O access available to the read requests performed by a process

通过YARN进行资源配置:

YARN scheduler决定何时何处给应用分配Containers,Containers被赋予memory,CPU等资源。

YARN支持的scheduler类型:

1.FIFO Scheduler:先进先出调度器,基于时间顺序分配资源。

2.Capacity Scheduler:资源分配到资源池,各资源池中采用FIFO分配资源。

3.Fair Scheduler(default,recommend):公平调度器。资源分配到带有权重的资源池。各资源池之间按权重分配资源。

公平调度器的分配份额永远不会高于实际的需要。
单一考虑:应用内存均等的分,CPU均等的分。
综合考虑:应用内存,CPU消耗内存综合考虑分配。
每个pool上可以设权重,可以设最小值。
 

YARN调度器属性配置:yarn.resourcemanager.scheduler.class。

YARN没指定pool,会默认初始化一个和用户同名的pool。
YARN也支持预先指定一个pool,运行时动态指定一个pool。
 
YARN work node资源配置:
yarn.nodemanager.resource.memory-mb:配置NodeManager的tasks可使用的RAM。
yarn.nodemanager.resource.cpu-vcores:配置NodeManager的tasks可使用的CPU个数。
 
yarn.scheduler.minimum-allocation-mb :配置ResourceManager内存。CM default: 1G。
yarn.scheduler.minimum-allocation-vcores:配置ResourceManager的CPU。CM default:1 vcore。
 
yarn.scheduler.increment-allocation-mb:内存规整化单位,CM default 512M。如果资源请求1.6G,则会分配512*4=2G。
yarn.scheduler.increment-allocation-vcores:cpu规整化单位。

YARN Container资源分配:

mapreduce.map.memory.mb :Map task内存分配,CM default 1G。

mapreduce.reduce.memory.mb :Reduce task内存分配,CM default 1G。
yarn.app.mapreduce.am.resource.mb:ApplicationMaster内存分配,CM default 1G。Used by NodeManagers。
yarn.app.mapreduce.am.command-opts:Java堆空间分配,默认1G。
mapreduce.map.java.opts:Java执行Mapper时的堆大小。
mapreduce.reduce.java.opts:Java执行Reducer时的堆大小。
 
YARN tuning:

Calculate the resources needed for other processes:

– Reserve 3GB or 20% of total memory for the OS

– Reserve resources for any non-Hadoop applicaFons

– Reserve resources for other any Hadoop components

– HDFS caching (if configured), NodeManager, DataNode

– Impalad, HBase RegionServer, Solr, etc.

Configure the YARN scheduler and application framework settings

– Based on the worker node profile determined above

– Determine the number of containers needed to best support YARN applicaFons based on the type of workload

– Monitor usage and tune estimated values to find optimal settings

 

cloudera learning7:Hadoop资源管理的更多相关文章

  1. cloudera learning4:Hadoop集群规划

    涉及到一些关于硬件的东西,我也不是很懂,记录下来有待以后学习. Hadoop集群一般都是由小到大,刚开始可能只有4到6个节点,随着存储数据的增加,计算量的增大,内存需求的增加,集群慢慢变大. 比如按照 ...

  2. cloudera learning3:Hadoop配置和守护进程logs

    Services:Haddoop cluster上可以部署的组件,比如HDFS,YARN,HBase等. Roles:在service配置时,由Cloudera Manager创建.比如NameNod ...

  3. 通过Cloudera在hadoop生态圈中安装Sentry服务。

    写在张文章时,差点辣死我了.把sentry数据库密码搞掉了,导致hive,impala,hue都挂了.此事要引以为戒,以后要小心操作了. 安装Sentry服务 a)                在c ...

  4. 安装CDH4 (Cloudera Distribution Hadoop)步骤

    安装流程 机器和系统 3台服务器,安装centos 6.4 64bit系统,内存8G,磁盘60G,cpu单核 已配置好静态ip,并配置好/etc/hosts 下载cdh4版本 https://www. ...

  5. cloudera learning6:Hadoop Security

    保证Hadoop安全的最有效方法是对cluster进行隔离(isolation,常用方法是把大集群划分若干个小集群). Hadoop安全措施的目的是防止好的人不小心做了坏的事,而非防止坏人坏事. Ke ...

  6. cloudera learning5:Hadoop集群高级配置

    HDFS-NameNode Tuning: dfs.namenode.handler.count: NameNode可开启的thread number,thread为从NameNode到DataNod ...

  7. cloudera安装hadoop集群和相关服务

    一.软件准备: 1.下载cloudera-manager-installer.bin(安装...-server),cdh4.cm(这是...-agent),另外还有些需要的关联软件下步添加. 2.先建 ...

  8. Cloudera Hadoop什么是CDH及CDH版本介绍

    本文引用自:Cloudera Hadoop什么是CDH及CDH版本介绍http://www.aboutyun.com/thread-6788-1-1.html(出处: about云开发) 云技术新兴的 ...

  9. 大数据架构师基础:hadoop家族,Cloudera产品系列等各种技术

    大数据我们都知道hadoop,可是还会各种各样的技术进入我们的视野:Spark,Storm,impala,让我们都反映不过来.为了能够更好的架构大数据项目,这里整理一下,供技术人员,项目经理,架构师选 ...

随机推荐

  1. Quartz资源收藏

    项目中使用Quartz集群分享 : http://hot66hot.iteye.com/blog/1726143 发布 Quartz Job Scheduling Framework 中文 PDF 版 ...

  2. [转]odoo常用openerp-server.conf配置参数详解

    参数 说明 用法 addons_path addons模块的查找路径,多个路径用逗号分隔 addons_path = E:\GreenOdoo8.0\source\openerp\addons csv ...

  3. [BI项目记]-搭建代码管理环境之服务端

    上一篇介绍如何搭建环境进行文档版本的管理,这篇主要介绍搭建环境进行代码版本的管理. 即使是BI项目也要进行代码版本管理.代码版本管理的工具有很多,VSS, SVN等都是当下大家经常提起的,这里主要介绍 ...

  4. WPF MVVM中在ViewModel中关闭或者打开Window

    这篇博客将介绍在MVVM模式ViewModel中关闭和打开View的方法. 1. ViewModel中关闭View public class MainViewModel { public Delega ...

  5. 【淘淘】Quartz之集群利弊

    一.前言: 虽然单个Quartz实例能给予我们很好的任务job调度能力,但它不能满足典型的企业需求,如可伸缩性.高可靠性满足.假如你需要故障转移的能力并能运行日益增多的 Job,Quartz集群势必成 ...

  6. python 线程之 数据同步 Queue

    Queue:将数据从一个线程发往另外一个线程比较通用的方式是使用queue模块的Queue类 1, 首先创建一个Queue模块的对象,创建Queue对象可以传递maxsize也可以不传递 2. 使用对 ...

  7. Linux之head、tail、grep、cut等命令详解

    http://jingyan.baidu.com/article/5225f26b6ab230e6fa0908be.html

  8. 计算机视觉中的词袋模型(Bow,Bag-of-words)

    计算机视觉中的词袋模型(Bow,Bag-of-words) Bag-of-words 读 'xw20084898的专栏'的blogBag-of-words model in computer visi ...

  9. [转]passport.js学习笔记

    概述 passport.js是Nodejs中的一个做登录验证的中间件,极其灵活和模块化,并且可与Express.Sails等Web框架无缝集成.Passport功能单一,即只能做登录验证,但非常强大, ...

  10. 从零开始山寨Caffe·肆:线程系统

    不精通多线程优化的程序员,不是好程序员,连码农都不是. ——并行计算时代掌握多线程的重要性 线程与操作系统 用户线程与内核线程 广义上线程分为用户线程和内核线程. 前者已经绝迹,它一般只存在于早期不支 ...