----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56352/ -----------------------------------------------------------
(Updated Feb. 6, 2017, 11:21 p.m.) Review request for mesos and Michael Park. Repository: mesos Description ------- When an allocation is made to a client, we want to update the share and the count of allocations made to that client. This was previously done separately, resulting in two std::set lookups, removals, and reinsertions. By improving `DRFSorter::updateShare` to support incrementing the number of client-allocations, we can do both updates with a single sequence of std::set lookup/remove/insert operations. Diffs ----- src/master/allocator/sorter/drf/sorter.hpp 5bed53a1641fee0c09862f77b394a0e9ec131990 src/master/allocator/sorter/drf/sorter.cpp 5681a5d78a7bdde820c3a8633d742d9d6412f1c7 Diff: https://reviews.apache.org/r/56352/diff/ Testing (updated) ------- `make check` Running the sorter benchmarks with an optimized build, this results in a modest improvement (~10%). With the change: ``` [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/0 (343 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/1 (333 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/2 (329 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/3 (331 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/4 (335 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/5 (346 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/6 (1660 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/7 (1739 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/8 (1682 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/9 (1673 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/10 (1694 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/11 (1733 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/12 (3223 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/13 (3311 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/14 (3319 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/15 (3303 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/16 (3368 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/17 (3410 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/18 (6538 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/19 (6646 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/20 (6532 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/21 (6668 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/22 (6689 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/23 (6754 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/24 (9652 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/25 (9886 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/26 (9930 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/27 (10024 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/28 (10094 ms) ``` Without the change: ``` [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/0 (346 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/1 (339 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/2 (346 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/3 (352 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/4 (343 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/5 (356 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/6 (1646 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/7 (1723 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/8 (1734 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/9 (1712 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/10 (1767 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/11 (2333 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/12 (3382 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/13 (3341 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/14 (3328 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/15 (3609 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/16 (3442 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/17 (3408 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/18 (6780 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/19 (6662 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/20 (7044 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/21 (7208 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/22 (7379 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/23 (7036 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/24 (9941 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/25 (10547 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/26 (10821 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/27 (11182 ms) [ OK ] AgentAndClientCount/Sorter_BENCHMARK_Test.FullSort/28 (11077 ms) ``` Thanks, Neil Conway