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. 分布式追踪系统dapper

    http://www.cnblogs.com/LBSer/p/3390852.html 最近单位需要做自己的分布式监控系统,因此看了一些资料,其中就有google的分布式追踪系统dapper的论文:h ...

  2. 【Java EE 学习 49 下】【Spring学习第一天】【MVC】【注解回顾】

    一.MVC 1.使用Spring有一个非常大的好处,那就是能够实现完全面向接口编程,传统的使用Dao.Service并不能实现完全的面向接口编程. 2.示例:https://github.com/kd ...

  3. 微软的R语言发行版本MRO及开发工具RTVS

    (此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:微软在收购R语言的开发商后,也独立发行或在自己的产品中集成了R语言,这里就介绍下它们包 ...

  4. webrtc的音频处理模块apm( audio processing)下载与编译出libwebrtc_audio_preprocessing.so

    webrtc代码在android和chromium项目中都有.但是android中的那个带有Android.mk,稍微修改下就能用ndk-build编译出libwebrtc_audio_preproc ...

  5. 关于Java导出100万行数据到Excel的优化方案

    1>场景 项目中需要从数据库中导出100万行数据,以excel形式下载并且只要一张sheet(打开这么大文件有多慢另说,呵呵). ps:xlsx最大容纳1048576行 ,csv最大容纳1048 ...

  6. iOS NSDate本地化

    1. NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setLocale:[NS ...

  7. 关于action和category的认知区别

    在我的了解, action: intent 有一个或多个action,如果过滤规则中能够匹配到其中一个,是可以成功的 category: intent有一个或多个category,过滤规则需要满足对应 ...

  8. 缓存依赖中cachedependency对象

    缓存依赖主要提供以下功能:1.SQL 缓存依赖项可用于应用程序缓存和页输出缓存.2.可在 SQL Server 7.0 及更高版本中使用 SQL 缓存依赖项.3.可以在网络园(一台服务器上存在多个处理 ...

  9. Leetcode Longest Common Prefix

    Write a function to find the longest common prefix string amongst an array of strings. class Solutio ...

  10. php 执行程序分析

    记录程序运行细节 记录程序运行时间 <?php $start = microtime(true); //index.php $end = microtime(true); $time = num ...