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




src/master/allocator/sorter/drf/sorter.cpp (lines 137 - 142)
<https://reviews.apache.org/r/48579/#comment202259>

    Dup the comments from JIRA:
    
    In {{DRFSorter::allocated()}}, the {{allocations}} of client was updated so 
{{dirty}} should be true to trigger {{sort()}} and {{update(name)}} seems not 
necessary as the {{share}} will be re-calculated in {{sort()}}.
     
    Further more, I'm thinking how many performance contribution will {{dirty}} 
help? In each allocator loop, the allocation maybe changed so the sorter should 
re-calculate the order.
    
    To improve the performance, I think we can only update the single client in 
{{allocated}} & {{unallocated}}; and only return clients list in {{sort()}} 
(the client was sorted when inserted in {{allocated}} & {{unallocated}}).


- Klaus Ma


On June 11, 2016, 11:42 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48579/
> -----------------------------------------------------------
> 
> (Updated June 11, 2016, 11:42 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Klaus Ma.
> 
> 
> Bugs: MESOS-5600
>     https://issues.apache.org/jira/browse/MESOS-5600
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The "dirty" was set to "true" when the total resources in cluster was
> updated. But in sorter, the "dirty" was never set back as "false" after
> re-calculate share for each clients.
> 
> This patch reset the "dirty" to "false" in sort(), this can make sure
> only one client share was updated when there are allocation changes but
> not all clients in the cluster.
> 
> This can improve the performance of sorter.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 65d473a5da0d846214c930c14d333040b2085b13 
>   src/tests/sorter_tests.cpp eb207a36c18198588cd8a98b3860a66c2ff7a641 
> 
> Diff: https://reviews.apache.org/r/48579/diff/
> 
> 
> Testing
> -------
> 
> [==========] Running 9 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 9 tests from SorterTest
> [ RUN      ] SorterTest.DRFSorter
> [       OK ] SorterTest.DRFSorter (1 ms)
> [ RUN      ] SorterTest.WDRFSorter
> [       OK ] SorterTest.WDRFSorter (1 ms)
> [ RUN      ] SorterTest.SplitResourceShares
> [       OK ] SorterTest.SplitResourceShares (0 ms)
> [ RUN      ] SorterTest.UpdateAllocation
> [       OK ] SorterTest.UpdateAllocation (0 ms)
> [ RUN      ] SorterTest.MultipleSlaves
> [       OK ] SorterTest.MultipleSlaves (0 ms)
> [ RUN      ] SorterTest.MultipleSlavesUpdateAllocation
> [       OK ] SorterTest.MultipleSlavesUpdateAllocation (1 ms)
> [ RUN      ] SorterTest.UpdateTotal
> [       OK ] SorterTest.UpdateTotal (0 ms)
> [ RUN      ] SorterTest.MultipleSlavesUpdateTotal
> [       OK ] SorterTest.MultipleSlavesUpdateTotal (0 ms)
> [ RUN      ] SorterTest.RevocableResources
> [       OK ] SorterTest.RevocableResources (0 ms)
> [----------] 9 tests from SorterTest (37 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 9 tests from 1 test case ran. (48 ms total)
> [  PASSED  ] 9 tests.
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>

Reply via email to