> On 九月 3, 2016, 9:21 a.m., Guangya Liu wrote: > > src/master/allocator/mesos/hierarchical.cpp, lines 484-485 > > <https://reviews.apache.org/r/51027/diff/4/?file=1490734#file1490734line484> > > > > I did some test with benchmark test of > > `SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.AddAndUpdateSlave/0` > > and it failed as following: > > > > ``` > > ../../src/tests/hierarchical_allocator_tests.cpp:3459: Failure > > Value of: offerCallbacks.load() > > Actual: 5 > > Expected: slaveCount > > Which is: 1000 > > [ FAILED ] > > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.AddAndUpdateSlave/0, > > where GetParam() = (1000, 1) (497 ms) > > [----------] 1 test from > > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test (498 ms total) > > > > [----------] Global test environment tear-down > > [==========] 1 test from 1 test case ran. (512 ms total) > > [ PASSED ] 0 tests. > > [ FAILED ] 1 test, listed below: > > [ FAILED ] > > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.AddAndUpdateSlave/0, > > where GetParam() = (1000, 1) > > > > 1 FAILED TEST > > ``` > > > > The reason is that we cannot make sure all of the `_allocate()` > > finished after `addSlave` finished. > > > > Shall we do a `while` loop in the benchmark to wait till all > > allocations are got? > > Guangya Liu wrote: > Perhaps we can simply remove the `ASSERT_EQ` for offer and agent count in > `HierarchicalAllocator_BENCHMARK_Test.AddAndUpdateSlave` as this patch will > not trigger `allocate()` synchronously, so we cannot make sure the agent > count is always same as offer count. > > Jacob Janco wrote: > Good catch, I'll run the benchmarks and update > https://reviews.apache.org/r/51028/ > > Jacob Janco wrote: > I updated that review if you could take a look. Thanks!
I did not see the update, seems you did not publish your update? :-) - Guangya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51027/#review147722 ----------------------------------------------------------- On 九月 3, 2016, 6:05 a.m., Jacob Janco wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51027/ > ----------------------------------------------------------- > > (Updated 九月 3, 2016, 6:05 a.m.) > > > Review request for mesos, Benjamin Mahler, Guangya Liu, James Peach, Klaus > Ma, and Jiang Yan Xu. > > > Bugs: MESOS-3157 > https://issues.apache.org/jira/browse/MESOS-3157 > > > Repository: mesos > > > Description > ------- > > - Triggered allocations dispatch allocate() only > if there is no pending allocation in the queue. > - Allocation candidates are accumulated and only > cleared when enqueued allocations are processed. > - Batched allocations are handled synchronously. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.hpp > dd07ed221d2c1755d2478369641ffdc46ecc4471 > src/master/allocator/mesos/hierarchical.cpp > 9e5db2196c6a541dc1208ba8b9f13ef9a518bcc4 > > Diff: https://reviews.apache.org/r/51027/diff/ > > > Testing > ------- > > make check > > note: check without filters depends on https://reviews.apache.org/r/51028 > > With new benchmark https://reviews.apache.org/r/49617: > Sample output without 51027: > [ RUN ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.FrameworkFailover/22 > Using 10000 agents and 3000 frameworks > Added 3000 frameworks in 57251us > Added 10000 agents in 3.21345353333333mins > allocator settled after 1.61236038333333mins > [ OK ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.FrameworkFailover/22 > (290578 ms) > > Sample output with 51027: > [ RUN ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.FrameworkFailover/22 > Using 10000 agents and 3000 frameworks > Added 3000 frameworks in 39817us > Added 10000 agents in 3.22860541666667mins > allocator settled after 25.525654secs > [ OK ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.FrameworkFailover/22 > (220137 ms) > > > Thanks, > > Jacob Janco > >