[
https://issues.apache.org/jira/browse/YARN-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sunil G updated YARN-2113:
--------------------------
Attachment: YARN-2113.0018.patch
Thanks [~eepayne] for investigating this.
{{when(cs.getResourceCalculator()).thenReturn(rc);}} is needed to be added.
However simply adding this still passes all my tests.
I think you have made some more changes in the tests such as increasing cluster
resource to a higher vcores. This has impacted the preemptionLimit value
(usually 10% or 20% of cluster resource) to give more dominance over vcores. I
could see that preemption is happening till vcores are satisfied (thought
memory is 0). However this is not needed.
As mentioned earlier, this issue is know in YARN-6538. I was trying to fix as
part of that to add a new api in {{Resources}} class. Usually we will have a
resource object and will deduct resources from it in every loop. At the start
of loop, {{Resources.lessThanOrEqual}} will be checked to see whether resource
has gone under {{Resources.none}}
For eg:
{code:title=AbstractPreemptableResourceCalculator.computeFixpointAllocation}
// assign all cluster resources until no more demand, or no resources are
// left
while (!orderedByNeed.isEmpty() && Resources.greaterThan(rc, totGuarant,
unassigned, Resources.none())) {
{code}
Here {{unassigned}} could be like *0 memory and 10 vcores*. However
{{Resources.greaterThan}} does work with dominance and loop will continue.
I have added a new api named {{Resources.isAnyResourceZero}} to ensure that
loop will not continue if any resource is zero in DRF. I ll extend same in
YARN-6538 as well.
> Add cross-user preemption within CapacityScheduler's leaf-queue
> ---------------------------------------------------------------
>
> Key: YARN-2113
> URL: https://issues.apache.org/jira/browse/YARN-2113
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: scheduler
> Reporter: Vinod Kumar Vavilapalli
> Assignee: Sunil G
> Attachments: IntraQueue Preemption-Impact Analysis.pdf,
> TestNoIntraQueuePreemptionIfBelowUserLimitAndDifferentPrioritiesWithExtraUsers.txt,
> YARN-2113.0001.patch, YARN-2113.0002.patch, YARN-2113.0003.patch,
> YARN-2113.0004.patch, YARN-2113.0005.patch, YARN-2113.0006.patch,
> YARN-2113.0007.patch, YARN-2113.0008.patch, YARN-2113.0009.patch,
> YARN-2113.0010.patch, YARN-2113.0011.patch, YARN-2113.0012.patch,
> YARN-2113.0013.patch, YARN-2113.0014.patch, YARN-2113.0015.patch,
> YARN-2113.0016.patch, YARN-2113.0017.patch, YARN-2113.0018.patch,
> YARN-2113.apply.onto.0012.ericp.patch, YARN-2113 Intra-QueuePreemption
> Behavior.pdf, YARN-2113.v0.patch
>
>
> Preemption today only works across queues and moves around resources across
> queues per demand and usage. We should also have user-level preemption within
> a queue, to balance capacity across users in a predictable manner.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]