You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Eric Payne (JIRA)" <ji...@apache.org> on 2016/10/03 21:45:20 UTC
[jira] [Commented] (YARN-2009) Priority support for preemption in
ProportionalCapacityPreemptionPolicy
[ https://issues.apache.org/jira/browse/YARN-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15543523#comment-15543523 ]
Eric Payne commented on YARN-2009:
----------------------------------
Hi [~sunilg],
I noticed some odd behavior while trying the following use case:
# {{User1}} starts {{app1}} at {{priority1}} and consumes the entire queue
# {{User1}} starts {{app2}} at {{priority2}}
# preemption happens for all containers from {{app1}} except the AM container
# {{app2}} consumes all containers released by {{app1}}
# The preemption monitor preempts containers from {{_app2_}}! This continues as long as {{app2}} runs.
I believe it is caused by the following code:
{code:title=FifoIntraQueuePreemptionPolicy#getResourceDemandFromAppsPerQueue}
Collection<TempAppPerPartition> appsOrderedByPriority = tq.getApps();
Resource actualPreemptNeeded = null;
for (TempAppPerPartition a1 : appsOrderedByPriority) {
for (String label : a1.getPartitions()) {
// Updating pending resource per-partition level.
if ((actualPreemptNeeded = resToObtainByPartition.get(label)) == null) {
actualPreemptNeeded = Resources.createResource(0, 0);
resToObtainByPartition.put(label, actualPreemptNeeded);
}
Resources.addTo(actualPreemptNeeded, a1.getActuallyToBePreempted());
}
}
return resToObtainByPartition;
{code}
Since {{app1}}'s AM container is still running, the size of {{actuallyToBePreempted}} for {{app1}} is the size of the AM's container. This gets added to {{actualPreemptNeeded}} and put into {{actualPreemptNeeded}}, which then gets passed to {{IntraQueueCandidatesSelector#preemptFromLeastStarvedApp}}. {{preemptFromLeastStarvedApp}} skips {{app1}}'s AM, and then preempts from the only remaining thing with resources, which is {{app2}}.
I'm not sure exactly how I would fix this yet, except to consider the size of the AM when calculating {{actuallyToBePreempted}}.
> Priority support for preemption in ProportionalCapacityPreemptionPolicy
> -----------------------------------------------------------------------
>
> Key: YARN-2009
> URL: https://issues.apache.org/jira/browse/YARN-2009
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: capacityscheduler
> Reporter: Devaraj K
> Assignee: Sunil G
> Attachments: YARN-2009.0001.patch, YARN-2009.0002.patch, YARN-2009.0003.patch, YARN-2009.0004.patch
>
>
> While preempting containers based on the queue ideal assignment, we may need to consider preempting the low priority application containers first.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org