H13-711 practice question 16 of 30

There are two peer queues Q1 and Q2 on YARN, both of which have a capacity of 50. There are already 10 tasks on Q1 occupying a total of 40 capacity, and 2 tasks on Q2 occupying a total of 30 capacity. Many, the scheduler will allocate resources to Q1 first.

Full set: 201 questions
Answer options
A: True
B: False
Correct Answer:
[FALSE]
Explanation

The YARN Capacity Scheduler is designed to ensure fairness and provide capacity guarantees to different queues. When making scheduling decisions among queues that are below their configured capacity, it prioritizes the queue with the lowest resource utilization relative to its guaranteed capacity. In this scenario: Queue Q1 Usage: Used Capacity / Configured Capacity = 40 / 50 = 80% Queue Q2 Usage: Used Capacity / Configured Capacity = 30 / 50 = 60% Since Queue Q2 has a lower utilization percentage (60%) compared to Queue Q1 (80%), the Capacity Scheduler will prioritize allocating the next available resources to Q2 to help it meet its guaranteed capacity. Therefore, the statement that resources will be allocated to Q1 first is incorrect.

Why Incorrect

The statement is "True" is incorrect because it contradicts the fundamental operating principle of the YARN Capacity Scheduler. The scheduler does not prioritize the queue with more tasks or higher absolute resource usage; instead, it prioritizes the queue that is furthest below its capacity guarantee, which is determined by the lowest usedcapacity / capacity ratio.

References

1. Official Vendor Documentation (Apache Hadoop): The Apache Hadoop documentation, which forms the basis for Huawei's YARN implementation, explicitly details this scheduling logic. The scheduler selects the queue with the minimum usedcapacity / capacity ratio.

Source: Apache Hadoop 3.3.6 Documentation, YARN ResourceManager, "Capacity Scheduler".

Reference Section: In the "Queue Properties" and "Resource Schedulers" sections, the documentation describes the core algorithm: "The CapacityScheduler is designed to schedule applications in a FIFO order for a given queue, but it will preempt containers from queues that are over their capacity to give to queues that are under their capacity. When multiple queues are under-utilized, the one with the minimum ratio of used-capacity to capacity is chosen for container allocation."

2. Official Vendor Documentation (Huawei): Huawei's FusionInsight documentation aligns with the standard YARN behavior.

Source: Huawei FusionInsight HD 6.5.1, Administrator Guide, "YARN Component Guide".

Reference Section: Chapter on "YARN Resource Management", sub-section "Capacity Scheduler". The guide explains that the scheduler calculates the resource usage of each queue and preferentially allocates resources to the queue with the lowest usage ratio to ensure fairness and capacity guarantees.

3. University Courseware: Reputable university courses on big data systems confirm this scheduling behavior.

Source: University of California, Berkeley, CS 186/286 Introduction to Database Systems, Lecture on "Spark and YARN".

Reference Section: The lecture notes on YARN scheduling mechanisms describe the Capacity Scheduler's goal of multi-tenancy and fairness. It is explained that resources are assigned to the queue that is "most under its fair share," which is calculated as the ratio of current usage to guaranteed capacity. The queue with the smallest ratio is selected.

Scroll to Top