您好,登錄后才能下訂單哦!
這篇文章主要介紹“Hadoop資源怎么管理”,在日常操作中,相信很多人在Hadoop資源怎么管理問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”Hadoop資源怎么管理”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
Linux Control Groups(cgroups):在操作系統(tǒng)級別進行資源分配,可通過Cloudera Static Service Pools配置。
YARN調(diào)度器配置:對運行在YARN上的應(yīng)用進行資源配置,比如M/R,implala。可通過Cloudera 動態(tài)資源池進行配置。
以下資源可以通過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決定何時何處給應(yīng)用分配Containers,Containers被賦予memory,CPU等資源。
YARN支持的scheduler類型:
1.FIFO Scheduler:先進先出調(diào)度器,基于時間順序分配資源。
2.Capacity Scheduler:資源分配到資源池,各資源池中采用FIFO分配資源。
3.Fair Scheduler(default,recommend):公平調(diào)度器。資源分配到帶有權(quán)重的資源池。各資源池之間按權(quán)重分配資源。
公平調(diào)度器的分配份額永遠不會高于實際的需要。
單一考慮:應(yīng)用內(nèi)存均等的分,CPU均等的分。
綜合考慮:應(yīng)用內(nèi)存,CPU消耗內(nèi)存綜合考慮分配。
每個pool上可以設(shè)權(quán)重,可以設(shè)最小值。
YARN調(diào)度器屬性配置:yarn.resourcemanager.scheduler.class。
YARN沒指定pool,會默認初始化一個和用戶同名的pool。
YARN也支持預先指定一個pool,運行時動態(tài)指定一個pool。
YARN work node資源配置:
yarn.nodemanager.resource.memory-mb:配置NodeManager的tasks可使用的RAM。
yarn.nodemanager.resource.cpu-vcores:配置NodeManager的tasks可使用的CPU個數(shù)。
yarn.scheduler.minimum-allocation-mb :配置ResourceManager內(nèi)存。CM default: 1G。
yarn.scheduler.minimum-allocation-vcores:配置ResourceManager的CPU。CM default:1 vcore。
yarn.scheduler.increment-allocation-mb:內(nèi)存規(guī)整化單位,CM default 512M。如果資源請求1.6G,則會分配512*4=2G。
yarn.scheduler.increment-allocation-vcores:cpu規(guī)整化單位。
YARN Container資源分配:
mapreduce.map.memory.mb :Map task內(nèi)存分配,CM default 1G。
mapreduce.reduce.memory.mb :Reduce task內(nèi)存分配,CM default 1G。
yarn.app.mapreduce.am.resource.mb:ApplicationMaster內(nèi)存分配,CM default 1G。Used by NodeManagers。
yarn.app.mapreduce.am.command-opts:Java堆空間分配,默認1G。
mapreduce.map.java.opts:Java執(zhí)行Mapper時的堆大小。
mapreduce.reduce.java.opts:Java執(zhí)行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
到此,關(guān)于“Hadoop資源怎么管理”的學習就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關(guān)知識,請繼續(xù)關(guān)注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。