> On Oct. 26, 2015, 1:49 p.m., Qian Zhang wrote: > > For this patch, it seems that we add the code related to quota support in > > the slave foreach loop in the HierarchicalAllocatorProcess::allocate(const > > hashset<SlaveID>& slaveIds_) method, so that means for **each slave**, we > > handle quota first and then the existing DRF fair share. I think there > > might be an issue for this approach: let say for the first slave, its > > available unreserved non-revocable resources can not satisfy a role’s quota > > due to the framework in this role has a filter for this slave, and then we > > lay aside the filtered resources of this slave for this role immediately. I > > think it might be too early for doing this since the other slaves may have > > resources which can satisfy this role’s quota. But if we lay aside this > > slave's resource for this role at this point, then the result is the > > framework of this role will not use these resources (due to the filter) AND > > all other role’s frameworks can not be offered with these resources too, > > this is kind of wasting resource s. > > > > I think maybe we can handle this quota support in this way: In > > HierarchicalAllocatorProcess::allocate(const hashset<SlaveID>& slaveIds_), > > leave the existing 3 levels foreach loops (slave/role/framework) as they > > are, and add the quota related code separately before them in this way: > > traverse all quota’ed roles, for each of them, traverse all the slaves, and > > allocate each slave’s available unreserved non-revocable resources to the > > role’s framework (take filter and suppress into account) until the role’s > > quota is satisfied. After all the quota’ed role has been traversed, if > > there are still some role’s quotas are not satisfied, then lay aside > > resources (should be the resources filtered or suppressed) for them. In > > this way, before laying aside resources, we have tried our best to use all > > slave's the available resources to satisfy the quotas first, there should > > be less resources wasted.
I'm not sure I got your point. If my mental compiler is correct, if a framework in quota'ed role opts out, we do not immediately lay aside resources. We do that after we have checked all the frameworks in the role in a separate loop. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39401/#review104012 ----------------------------------------------------------- On Oct. 23, 2015, 4:38 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39401/ > ----------------------------------------------------------- > > (Updated Oct. 23, 2015, 4:38 p.m.) > > > Review request for mesos, Bernd Mathiske, Joerg Schad, and Joris Van > Remoortere. > > > Bugs: MESOS-3718 > https://issues.apache.org/jira/browse/MESOS-3718 > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.cpp > f4e4a123d3da0442e8b0b0ad14d1ee760752ba36 > > Diff: https://reviews.apache.org/r/39401/diff/ > > > Testing > ------- > > make check (Mac OS X 10.10.4) > > > Thanks, > > Alexander Rukletsov > >
