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

Naganarasimha G R commented on YARN-3945:
-----------------------------------------

Thanks for the reply [~wangda],
bq. I would prefer this proposal.
So this implies {{#apps per user in the queue}} = {{#apps per queue}}, if ok 
then will rework on it.

bq. Changing max value of ULF will be an incompatible changes, since lots of 
cluster are using very high ULF (e.g. 100).
Sorry understood the code wrongly ULF multiplied with Queue's capacity and not 
the max capacity so you are right we need to just ensure that the final 
resource limit is not greater than the max limit of the queue when multipled 
with ULF. 

[~wangda], would like to know whether the query i had asked earlier is valid, 
In *getUserAMResourceLimitPerPartition*
we are calculating *am resource limit* as  
{code}
Resources.multiplyAndNormalizeUp(resourceCalculator,
        queuePartitionResource,
        queueCapacities.getMaxAMResourcePercentage(nodePartition)
            * effectiveUserLimit * userLimitFactor, minimumAllocation);
{code}
should the computation logic not be similar to *computeUserLimit*
i.e. IMO  *getUserAMResourceLimitPerPartition* calculation should be :
{code}
queuePartitionAMResource = queuePartitionResource *  
queueCapacities.getMaxAMResourcePercentage(nodePartition);
maxUserAMLimit= queuePartitionAMResource * userLimitFactor;
userAMLimitResource=currentAMCapacity * max(1 / #activeUsers, 1 * 
user-limit-percentage%)

queuePartitionUserAMResource = min( userAMLimitResource, maxUserAMLimit);
{code}
Not able to digest/understand the logic of multiplication : *effectiveUserLimit 
* userLimitFactor*


> maxApplicationsPerUser is wrongly calculated
> --------------------------------------------
>
>                 Key: YARN-3945
>                 URL: https://issues.apache.org/jira/browse/YARN-3945
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: capacityscheduler
>    Affects Versions: 2.7.1
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>         Attachments: YARN-3945.20150728-1.patch, YARN-3945.20150729-1.patch, 
> YARN-3945.V1.003.patch
>
>
> maxApplicationsPerUser is currently calculated based on the formula
> {{maxApplicationsPerUser = (int)(maxApplications * (userLimit / 100.0f) * 
> userLimitFactor)}} but description of userlimit is 
> {quote}
> Each queue enforces a limit on the percentage of resources allocated to a 
> user at any given time, if there is demand for resources. The user limit can 
> vary between a minimum and maximum value.{color:red} The the former (the 
> minimum value) is set to this property value {color} and the latter (the 
> maximum value) depends on the number of users who have submitted 
> applications. For e.g., suppose the value of this property is 25. If two 
> users have submitted applications to a queue, no single user can use more 
> than 50% of the queue resources. If a third user submits an application, no 
> single user can use more than 33% of the queue resources. With 4 or more 
> users, no user can use more than 25% of the queues resources. A value of 100 
> implies no user limits are imposed. The default is 100. Value is specified as 
> a integer.
> {quote}
> configuration related to minimum limit should not be made used in a formula 
> to calculate max applications for a user



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to