hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhangshilong (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4752) FairScheduler should preempt for a ResourceRequest and all preempted containers should be on the same node
Date Mon, 27 Feb 2017 03:32:45 GMT

    [ https://issues.apache.org/jira/browse/YARN-4752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15885081#comment-15885081
] 

zhangshilong commented on YARN-4752:
------------------------------------

[~kasha]  I found one problem.
In FSLeafQueue:   I think resourceUsage of app should not be changed in assignContainer because
 FairShareComparator uses resourceUsage to sort Apps.
{code:java}
private TreeSet<FSAppAttempt> fetchAppsWithDemand() {
    TreeSet<FSAppAttempt> pendingForResourceApps =
        new TreeSet<>(policy.getComparator());
    readLock.lock();
    try {
      for (FSAppAttempt app : runnableApps) {
        Resource pending = app.getAppAttemptResourceUsage().getPending();
        if (!pending.equals(none())) {
          pendingForResourceApps.add(app);
        }
      }
    } finally {
      readLock.unlock();
    }
    return pendingForResourceApps;
  }
{code}
But In FSPreemptionThread run->preemptContainers->app.trackContainerForPreemption  
preemptedResources of app will be changed without FairScheduler Lock.
So  getResourceUsage of App will be changed in function: assignContainer in FSLeafQueue.
{code:java}
@Override
  public Resource getResourceUsage() {
    /*
     * getResourcesToPreempt() returns zero, except when there are containers
     * to preempt. Avoid creating an object in the common case.
     */
    return getPreemptedResources().equals(Resources.none())
        ? getCurrentConsumption()
        : Resources.subtract(getCurrentConsumption(), getPreemptedResources());
  }
{code}

> FairScheduler should preempt for a ResourceRequest and all preempted containers should
be on the same node
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-4752
>                 URL: https://issues.apache.org/jira/browse/YARN-4752
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>    Affects Versions: 2.8.0
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>             Fix For: 2.9.0, 3.0.0-alpha2
>
>         Attachments: yarn-4752-1.patch, yarn-4752.2.patch, yarn-4752.3.patch, yarn-4752.4.patch,
yarn-4752.4.patch, YARN-4752.FairSchedulerPreemptionOverhaul.pdf, yarn-6076-branch-2.1.patch
>
>
> A number of issues have been reported with respect to preemption in FairScheduler along
the lines of:
> # FairScheduler preempts resources from nodes even if the resultant free resources cannot
fit the incoming request.
> # Preemption doesn't preempt from sibling queues
> # Preemption doesn't preempt from sibling apps under the same queue that is over its
fairshare
> # ...
> Filing this umbrella JIRA to group all the issues together and think of a comprehensive
solution.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message