[
https://issues.apache.org/jira/browse/YARN-8379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16508524#comment-16508524
]
Zian Chen commented on YARN-8379:
---------------------------------
{color:#333333}Thanks, [Eric
Payne|https://issues.apache.org/jira/secure/ViewProfile.jspa?name=eepayne] for
the explanation. Let me share my understanding about Vinod's question as
well.{color}
Since this involves with both allocation and preemption, also for this change,
we should provide crispy semantic associated with all the other combinations of
our features - like queue priority, application priority, user limit,
inter-queue preemption, intra-queue preemption, etc.
Let's talk about queue priority in details,
for resource-allocation # For two queues with the same priority
** The queue with less relative used-capacity goes first. This won’t make
conflicts with our change. For example two queues A and B, used/ guaranteed
percent of A is 20 / 50 = 0.4, B is 30 / 50 = 0.6, The overall process of
allocation here is filling the queue with as much resource as possible until
less relative used-capacity queue (queue A) get used / guaranteed percent equal
or larger than B, then allocation will fill B and continue this process to
balance utilization of A and B until there is no more available resource to
allocate.
# For two queues with different priorities
** Our change will respect this part since priority should come first in
allocation point of view. fairness should be a concept within priority, not
across different queue priorities. - today’s behavior
For resource-preemption
* We need to release the constraint that prevents queue to further accept
available resource when beyond its guaranteed resources. Achieve fairness by
calculating ideal assigned capacity based on proportional assignment.
Relation to other scheduler features
|Feature|Relationship|
|Queue capacity / max capacity|This feature still honors queue configured
capacity and queue’s max-capacity as usual.|
|Application priority|Since application priority is an intra-queue property,
this feature doesn’t impact application-priorities.|
|User limit|Same as above|
|Inter-queue proportional capacity preemption|After YARN-5864, queue priority
already been handled while calculating ideal assigned capacity for each queue
level. The only change we need to make is to release the constraint that queue
accepted capacity should not beyond max(guaranteed, used) - assigned, this
constraint will make queue imbalanced and prevent further preemption when all
queues are beyond its guaranteed.|
|Queue preemption disable|Fairness should not violate this constraint if
current queue is disabled preemption|
|Intra-queue preemption|No impact, queue fairness only apply across the queues.|
Will we encounter a case that preemption will try to preempt a queue while
allocation try to give the available resource to this queue after my change?
No, because preemption calculation always has delays(kill before wait timeout),
if allocation happens during this timeout, preemption will re-calculate the
ideal assignment before really kill containers. And the overall preemption
purpose of selecting containers and the process of allocation are the same,
which is make relatively less utilized queue (apply to both under-utilized case
and beyond guaranteed case) and make them “balance” in the end.
Current logic is allocation will make all queues balance while choose who
should be next queue to give resource, while preemption prevents this balance
further happen after all queues beyond its guarantee, after my change,
preemption will release the constraint and let further preemption happen to
ensure this balance also achieve on preemption side.
> Add an option to allow Capacity Scheduler preemption to balance satisfied
> queues
> --------------------------------------------------------------------------------
>
> Key: YARN-8379
> URL: https://issues.apache.org/jira/browse/YARN-8379
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Wangda Tan
> Assignee: Zian Chen
> Priority: Major
> Attachments: YARN-8379.001.patch, YARN-8379.002.patch
>
>
> Existing capacity scheduler only supports preemption for an underutilized
> queue to reach its guaranteed resource. In addition to that, there’s an
> requirement to get better balance between queues when all of them reach
> guaranteed resource but with different fairness resource.
> An example is, 3 queues with capacity, queue_a = 30%, queue_b = 30%, queue_c
> = 40%. At time T. queue_a is using 30%, queue_b is using 70%. Existing
> scheduler preemption won't happen. But this is unfair to queue_a since
> queue_a has the same guaranteed resources.
> Before YARN-5864, capacity scheduler do additional preemption to balance
> queues. We changed the logic since it could preempt too many containers
> between queues when all queues are satisfied.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]