Hadoop资源怎么管理

发布时间:2021-12-10 14:09:17 作者:iii
来源:亿速云 阅读:137

这篇文章主要介绍“Hadoop资源怎么管理”,在日常操作中,相信很多人在Hadoop资源怎么管理问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Hadoop资源怎么管理”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

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 

到此,关于“Hadoop资源怎么管理”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!

推荐阅读:
  1. 使用vAPP管理资源
  2. Greenplum -- 资源队列管理

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

hadoop

上一篇:Hive如何更改表的属性

下一篇:hive-1.1.0-cdh5.7.0如何编译

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》