mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guangya Liu" <gyliu...@gmail.com>
Subject Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.
Date Wed, 20 Jan 2016 05:07:14 GMT


> On 一月 16, 2016, 2:11 a.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1291-1319
> > <https://reviews.apache.org/r/40632/diff/15/?file=1195627#file1195627line1291>
> >
> >     None of this should be necessary:
> >     
> >     1) You should have all the allocation slack inside `available`.
> >     2) We don't have allocation slack ACLs in the MVP, so all allocation slack should
fall under `available.unreserved`.  If we do have ACLs, some of the allocation slack will
be accounted for in `available.reserved(role)`.
> >     3) You shouldn't need to recalculate this during `::allocate`.
> >     
> >     If any of the above are not true, you probably have a problem in the `Resource`
helpers or in `::addSlave`.
> 
> Guangya Liu wrote:
>     We can take a look at the following cases:
>     1) total resources cpus(r1):100
>     2) register a framework f1, cycle 1: allocated cpus(r1):100;cpu(*){ALLOCATION_SLACK}:100
to f1
>     3) f1 recovered cpu(*){ALLOCATION_SLACK}:100 back
>     4) register another framwork f2, f2 get nothing here as f1 used up all reserved resoures
and there is no allocation slack now.
>     
>     The above logic make sure that step 4) can always get the latest remaining allocation
slack.
> 
> Joseph Wu wrote:
>     The step 3) in your case is presumably because you haven't implemented all the allocator
methods yet (as of this review in the chain), like `recoverResources`, `updateAllocation`,
and `updateAvailable`.
>     
>     If so, you should consider moving the test additions/changes before/after (this lets
us know what your intended behavior is) the allocator changes.

I was updating the comments here to make it more clear.

// Calculate the `remainingAllocationSlack` if the framework can
// use revocable resources and reservation oversubscription also
// enabled. The `remainingAllocationSlack` need to exclude the
// stateless reserved resources allocated in previous allocation
// cycle.


- Guangya


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40632/#review114831
-----------------------------------------------------------


On 一月 19, 2016, 8:03 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 19, 2016, 8:03 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.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations
in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (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 48acde69b1a2f305b568a7e322a58708063dd30a

>   src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863

> 
> 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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message