mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joris Van Remoortere" <joris.van.remoort...@gmail.com>
Subject Re: Review Request 38649: Add a benchmark to simulate frameworks declining offers.
Date Fri, 25 Sep 2015 21:55:56 GMT

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


Hi James, thank you for creating this benchmark!
I will work with you closely to get this in to code base. I just wanted to share some early
feedback on a race I noticed.
I will try to come up with some guidance as to how to map this more closely to our actor pattern,
and our testing patterns.


src/tests/hierarchical_allocator_tests.cpp (line 1397)
<https://reviews.apache.org/r/38649/#comment157957>

    This causes a race that can corrupt the allocator:
    - The calls to `allocator->recoverResources` are asynchronously invoked inside the
actor (on a separate thread)
    - This call to `hproc->allocate` is synchronous and runs in the execution context of
the current thread
    - The Allocator is an Actor, and all our actors are written to be driven by libprocess
(i.e. only 1 thread invoking a function at any given point in time, only 1 execution context)
    The way this code is currently set up the `recoverResources` functions may be executed
simultaneously as the `allocate` function.
    
    Let me know if this is not clear.
    
    You want to do something along these lines:
    ```
    Future<Nothing> result = dispatch(hproc->self(), &HierarchicalDRFAllocatorProcess::allocate);
    
    result.await();
    ```
    
    However; the allocate function would need to return something other than `void` such as
`Nothing` for that to work.


- Joris Van Remoortere


On Sept. 25, 2015, 9:46 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38649/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2015, 9:46 p.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3493
>     https://issues.apache.org/jira/browse/MESOS-3493
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This benchmark starts a number of slaves and frameworks, then cycles
> the allocator. On each allocation pass, the frameworks decline all
> the offers. This leads to increasing numbers of refusal filters in
> the allocator, and the allocation slows down. After around 200
> cycles the slowdown increases out of proportion.
> 
> 
> Diffs
> -----
> 
>   src/tests/hierarchical_allocator_tests.cpp 505b9de3d8d888c296f6103c80fe9f0ef1c2ca16

> 
> Diff: https://reviews.apache.org/r/38649/diff/
> 
> 
> Testing
> -------
> 
> make check && make bench
> 
> 
> Thanks,
> 
> James Peach
> 
>


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