Re: Review Request 41791: Updated allocation slack when dynamic reservation reserve some new resources.

2016-01-08 Thread Klaus Ma


> On Jan. 3, 2016, 6:43 p.m., Klaus Ma wrote:
> > I think it's too early to update total allocation slack here; my suggestion 
> > to handle dynamic reservation:
> > 
> > 1. Did not reduce total allocation slack in 
> > updateAllocation/updateAvailable; but if no allocated ALLOCATIONS_SLACK, 
> > it's fine to shrink it.
> > 2. In agent, if new checkpointed resources is smaller, evict executors if 
> > necessary.
> > 3. In allocator, did not send evicting unreserved resources 
> > (allocationSlack - stateless.reserved)
> > 4. In Allocator::recoverResources, if total allocation slack is smaller 
> > than stateless.reserved, shrink total allocation slack.
> 
> Joseph Wu wrote:
> I agree except for 2).
> 
> If a lender framework *unreserves* resources, the tenant framework 
> effectively becomes the sole user of said resources.  The allocator could 
> treat these revocable resources as normal resources.  There's no reason to 
> evict in this case.
> 
> Guangya Liu wrote:
> I think that should evict those tasks as there might be resource 
> conflicit, such as port resources for allocation slack, there might be port 
> conflicit if do not kill those tasks.
> 
> Actually, we also have some discussion in working group, we still need to 
> update the allocation slack in updateAllocaiton/updateAllocation when 
> increasing the dynamic reservations to make sure the borrow framework can get 
> resource quickly.
> 
> Not sure if 4) needed, will check it when updating this patch.

re 2), besides the port, it'll also over use the resources if did not evict the 
`ALLOCATION_SLACK` executors; it may exhaust agent resources.
re 4), we need to update `total` to make `total` equals `unreserved + reserved 
+ ALLOCATION + USAGE_SLACK`. But whether in `Allocator::recoverResources`, we 
can revisit it in the new patch.


- Klaus


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


On Jan. 8, 2016, 3:11 p.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41791/
> ---
> 
> (Updated Jan. 8, 2016, 3:11 p.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
> ---
> 
> Only update allocation slack resources if reserve some new stateless reserved 
> resources.
> 
> 
> Diffs
> -
> 
>   src/master/allocator/mesos/hierarchical.cpp 
> df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/tests/hierarchical_allocator_tests.cpp 
> e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/41791/diff/
> 
> 
> Testing
> ---
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 41791: Updated allocation slack when dynamic reservation reserve some new resources.

2016-01-07 Thread Guangya Liu

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

(Updated 一月 8, 2016, 7:11 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, 
Joseph Wu, Klaus Ma, and Jian Qiu.


Summary (updated)
-

Updated allocation slack when dynamic reservation reserve some new resources.


Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145


Repository: mesos


Description (updated)
---

Only update allocation slack resources if reserve some new stateless reserved 
resources.


Diffs (updated)
-

  src/master/allocator/mesos/hierarchical.cpp 
df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/tests/hierarchical_allocator_tests.cpp 
e044f832c2c16e53e663c6ced5452649bb0dcb59 

Diff: https://reviews.apache.org/r/41791/diff/


Testing
---

make
make check


Thanks,

Guangya Liu