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

Sunil G commented on YARN-2113:
-------------------------------

bq.Is it possible that one app's toBePreemptFromOther > 0 and 
actuallyToBePreempted > 0 at the same time?
Its an interesting case. I am seeing 2 scenarios, and with scenario 1, I think 
its not possible. Scenario2 seems more interesting. And it may be possible.
*Example 1:* (app which met UL quota)
(toBePreemptFromOther > 0) will be happening for an app with high priority. Now 
whether same app can meet (actuallyToBePreempted > 0) or not. It can happen 
only if this app's used is more than real user limit. But if this app's used is 
more than userlimit, then toBePreemptFromOther will be 0 as this app is already 
abusing user-limit and its pending need not be considered for idealAssigned.

*Example 2:* (app which is under UL quota)
{noformat}
    // queueName\t(priority,resource,host,expression,#used,reserved,pending)
            "a\t" 
            + "(3,1,n1,,30,false,30,user1);" + // app1 in a
            "a\t" // app2 in a
            + "(1,1,n1,,20,false,20,user2);" + // app2 in a
            "a\t" // app3 in a
            + "(4,1,n1,,30,false,0,user1);" + // app3 in a
            "a\t" // app4 in a
            + "(2,1,n1,,0,false,25,user2)"; // app4 in a
{noformat}

Consider UL as 50 here. *user1* is using 60 (app1 and app3), hence 10 is 
preemptable from app1 (lower priority compared to app3). Coming to *user2*. 
*app2* can get 5 more resources ideally (current used 20) since *app4* needs 
only 25. Hence *app2*'s *toBePreemptFromOther* will be 5.
On the same note, *app4* can get 10 from app1/3 of user1 based UL preemption 
calculation. Still 15 more are demanding, and ideally *app2* has to give back 
some resources for *app4*. Hence actuallyToBePreempted>0 is possible.

I would like you also to go over this case one more time.

> 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: YARN-2113.0001.patch, YARN-2113.0002.patch, 
> YARN-2113.0003.patch, 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]

Reply via email to