[jira] [Commented] (YARN-6869) Resources.lessThan() et al should not use ResourceCalculator.compare()

2017-07-25 Thread Daniel Templeton (JIRA)

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

Daniel Templeton commented on YARN-6869:


The other thing I'm seeing here is that many of the uses of these methods are 
broken when DRF is used, because they're using them to check limits.  If I set 
a limit of 8GB of memory, I don't care how many CPUs are requested, the limit 
of 8GB of memory should be enforced.  There are very few uses where dominance 
needs to be considered.  In those cases, they can just call {{compare()}} 
directly.  There are also a few uses of {{lessThan*()}} to look for 0 or 
negative resource values, which could be replaced with a method that explicitly 
does that check/correction.

> Resources.lessThan() et al should not use ResourceCalculator.compare()
> --
>
> Key: YARN-6869
> URL: https://issues.apache.org/jira/browse/YARN-6869
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: resourcemanager
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Daniel Templeton
>
> If you look at what the callers of {{lessThan()}}, {{lessThanOrEqual()}}, 
> {{greaterThan()}}, and {{greaterThanOrEqual()}} expect the calls to do, 
> there's no reason why the comparison should be done in context of the total 
> resources.  Skipping the division and doing a direct comparison should 
> improve performance.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (YARN-6869) Resources.lessThan() et al should not use ResourceCalculator.compare()

2017-07-25 Thread Sunil G (JIRA)

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

Sunil G commented on YARN-6869:
---

Thanks [~templedf]
While doing preemption, we ran into this issue. But I was thinking this api is 
needed a compare kind of method to get to know if there is any dominance or not 
for any resource type. Indeed it can have impact on these apis. If its a 
vanilla checks like lessThan, greaterThan etc, we can have api like 
absoluteLessThan, absoluteGreaterThan. And if dominance is mandatory to handle 
in these apis, we can leave these as it is. I am not having much of context 
regarding how important to see dominant check is needed for these api, so 
please feel free me to correct me. 

> Resources.lessThan() et al should not use ResourceCalculator.compare()
> --
>
> Key: YARN-6869
> URL: https://issues.apache.org/jira/browse/YARN-6869
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: resourcemanager
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>
> If you look at what the callers of {{lessThan()}}, {{lessThanOrEqual()}}, 
> {{greaterThan()}}, and {{greaterThanOrEqual()}} expect the calls to do, 
> there's no reason why the comparison should be done in context of the total 
> resources.  Skipping the division and doing a direct comparison should 
> improve performance.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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