> On Jan. 7, 2016, 12:22 p.m., Joseph Wu wrote: > > src/master/allocator/mesos/hierarchical.cpp, lines 1305-1313 > > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line1305> > > > > If you make the changes above, this recalculation will be unnecessary. > > `resources.allocationSlack()` should be sufficient. > > Guangya Liu wrote: > `resources.allocationSlack()` may not enough. If some task run on > stateless reserved resources, the allocator should also remove those > resources from allocation slack. > > i.e. > total resources: > `cpus(role1):100;mem(role1):100;cpus(*){ALLOCATION_SLACK}:100;mem(*){ALLOCATION_SLACK}:100` > allocated: `cpus(role1):30;mem(*){ALLOCATION_SLACK}:20` > Then the available resources should be: > `cpus(role1):70;mem(role1):100;cpus(*){ALLOCATION_SLACK}:70;mem(*){ALLOCATION_SLACK}:80` > > The allocation slack for cpus was also updated by decreasing 30 due to > stateless reserved resources are used.
I'm going to drop this since the updated diffs make this comment somewhat obsolete. - Joseph ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40632/#review113303 ----------------------------------------------------------- On Jan. 13, 2016, 4:39 a.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40632/ > ----------------------------------------------------------- > > (Updated Jan. 13, 2016, 4:39 a.m.) > > > Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van > Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu. > > > Bugs: MESOS-4145 > https://issues.apache.org/jira/browse/MESOS-4145 > > > Repository: mesos > > > Description > ------- > > Enabled oversubscribed resources for reservations in allocator. > > There are five patches handling the allocator part: > 1) This patch handles send offer, add slave and quota integration test. > 2) https://reviews.apache.org/r/41847/ Handles the case of update slave. > 3) https://reviews.apache.org/r/41791/ Handles the case of dynamic > reservations (1/3). > 4) https://reviews.apache.org/r/42113/ Handle unreserve logic for dynamic > reservation (2/3) > 5) https://reviews.apache.org/r/42194/ Handle unreserve logic for dynamic > reservation (3/3) > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.cpp > d541bfa3f4190865c65d35c9d1ffdb8a3f194056 > src/tests/hierarchical_allocator_tests.cpp > e044f832c2c16e53e663c6ced5452649bb0dcb59 > > Diff: https://reviews.apache.org/r/40632/diff/ > > > Testing > ------- > > make > make check > GLOG_v=2 ./bin/mesos-tests.sh --gtest_filter="HierarchicalAllocatorTest.*" > --verbose > > > Thanks, > > Guangya Liu > >
