Hadoop资源怎么管理-创新互联

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

10年积累的成都网站设计、网站建设、外贸网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站策划后付款的网站建设流程,更有天心免费网站建设让你可以放心的选择与我们合作。

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资源怎么管理”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联-成都网站建设公司网站,小编会继续努力为大家带来更多实用的文章!


网页名称:Hadoop资源怎么管理-创新互联
文章路径:http://pwwzsj.com/article/dgdjgs.html