当前位置:网站首页>【yarn】CDP集群 Yarn配置capacity调度器批量分配
【yarn】CDP集群 Yarn配置capacity调度器批量分配
2022-07-06 09:15:00 【kiraraLou】
一、前言
最近要升级 CDH 集群成 CDP 集群,CDH 集群中 Yarn 服务默认使用的是 fair 调度器,CDP 集群使用的是 capacity 调度器,我们之前淌过 调度器因为批量分配设置不合理,导致任务集中分配到了某几台节点,使集群资源负载极度不均衡。
为了避免同样的问题出现在 CDP 集群上,我们提前进行调研。看看使用 调度器会不会也有集中分配的现象。但是调研过程中,出现了一些不和预期的现象,等待后续跟进。
二、CDH集中分配
前面介绍过,CDH 5.8-Hadoop2.6.0 版本后,针对公平调度,有如下几个配置,来针对任务类型(小任务)加快分配的优化。
| 配置名 | 解释 |
|---|---|
yarn.scheduler.fair.max.assign | 最大分配数:如果 assignmultiple 为 true 且 dynamic.max.assign 为 false,则一个心跳中可以分配的最大容器数。 |
yarn.scheduler.fair.assignmultiple | 分配多个:是否允许在一个心跳中分配多个容器。 |
yarn.scheduler.fair.dynamic.max.assign | 如果assignmultiple为真,是否动态确定一个心跳可以分配的资源量。开启后,节点上大约一半的未分配资源会在一次心跳中分配给容器。默认为真。 |
通过合理的配置,我们就可以即使用集中分配的方式,又不会扩大集群负载差异。
CDH 集群如何配置这里不展开介绍。
三、CDP集中分配
CDP 集群中已经使用容量调度来作为默认的调度器,通过查阅官方和Cloudera 文件,发现 调度也是有通过心跳为 NodeManager 分配多个容器。相关配置如下:
| 配置名 | 解释 |
|---|---|
yarn.scheduler.capacity.per-node-heartbeat.multiple-assignments-enabled | 是否允许在一个 NodeManager 心跳中分配多个容器。默认为真。 |
yarn.scheduler.capacity.per-node-heartbeat.maximum-container-assignments | 如果multiple-assignments-enabled为 true,则在一个 NodeManager 心跳中可以分配的最大容器数量。默认为 -1,不设置限制。 |
yarn.scheduler.capacity.per-node-heartbeat.maximum-offswitch-assignments | 如果multiple-assignments-enabled为 true,则在一个 NodeManager 心跳中可以分配的最大 off-switch 容器数量。默认为 1,表示一个心跳中只允许一个关闭开关分配。 |
如何配置
在
Cloudera Manager中,选择集群 >YARN 队列管理器 UI 服务。
在
YARN队列管理器窗口中,单击调度程序配置选项卡。
在“调度程序配置”窗口中

选中
Enable Multiple Assignments Per Heartbeat复选框以允许在一个NodeManager心跳中分配多个容器配置以下
NodeManager心跳属性:
Maximum Container Assignments Per Heartbeat: 在一个NodeManager心跳中可以分配的最大容器数。将此值设置为 -1 将禁用此限制。Maximum Off-Switch Assignments Per Heartbeat: 可以在一个NodeManager心跳中分配的关闭开关容器的最大数量。
三、总结
capacity调度器也有类似fair调度器的心跳批量分配配置。- CDP 集群
capacity调度器默认开启了批量分配,并且分配数量为 100,这个值需要调小。 - 目前测试下来,发现配置好像没有生效,这个需要后续联系专家跟进下。
参考
https://docs.cloudera.com/cdp-private-cloud-base/7.1.7/yarn-allocate-resources/topics/yarn-set-user-limits.htmlhttps://docs.cloudera.com/cdp-private-cloud-base/7.1.7/yarn-allocate-resources/topics/yarn-configure-nm-heartbeat.htmlhttps://hadoop.apache.org/docs/r3.1.1/hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html#Reviewing_the_configuration_of_the_CapacityScheduler
边栏推荐
- Neo4j installation tutorial
- What does BSP mean
- [Bluebridge cup 2020 preliminary] horizontal segmentation
- MySQL与c语言连接(vs2019版)
- Attention apply personal understanding to images
- QT creator specifies dependencies
- Error reporting solution - io UnsupportedOperation: can‘t do nonzero end-relative seeks
- L2-006 树的遍历 (25 分)
- DICOM: Overview
- Solution of deleting path variable by mistake
猜你喜欢
随机推荐
图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
Why can't I use the @test annotation after introducing JUnit
C语言读取BMP文件
Codeforces Round #753 (Div. 3)
02 staff information management after the actual project
Remember the interview algorithm of a company: find the number of times a number appears in an ordered array
ES6 promise object
[BSidesCF_2020]Had_a_bad_day
Picture coloring project - deoldify
Are you monitored by the company for sending resumes and logging in to job search websites? Deeply convinced that the product of "behavior awareness system ba" has not been retrieved on the official w
Introduction to the easy copy module
AI benchmark V5 ranking
Julia 1.6 1.7 common problem solving
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
Summary of numpy installation problems
How to configure flymcu (STM32 serial port download software) is shown in super detail
Image recognition - pyteseract TesseractNotFoundError: tesseract is not installed or it‘s not in your path
安装numpy问题总结
wangeditor富文本引用、表格使用问题
QT creator test








