> On May 20, 2019, 12:18 p.m., Meng Zhu wrote: > > src/master/allocator/mesos/hierarchical.cpp > > Lines 1708-1709 (original), 1706-1709 (patched) > > <https://reviews.apache.org/r/70618/diff/3/?file=2145504#file2145504line1712> > > > > The logic here is not related to this patch. > > I am OK with either doing this in the previous patch or keep it as is.
I cannot keep it as it is - RoleInfo has no default constructor now (for the purpose of maintaining RoleInfo's only - as for now - class invariant: that it always has a framework sorter). On the other side, doing this change in the previous patch will improve readability, I'll do that. - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70618/#review215354 ----------------------------------------------------------- On May 16, 2019, 2:17 p.m., Andrei Sekretenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70618/ > ----------------------------------------------------------- > > (Updated May 16, 2019, 2:17 p.m.) > > > Review request for mesos, Benjamin Mahler and Meng Zhu. > > > Bugs: MESOS-9701 > https://issues.apache.org/jira/browse/MESOS-9701 > > > Repository: mesos > > > Description > ------- > > This patch replaces a hashmap<Owned<Sorter>> used for tracking > framework sorters with a unique_ptr<Sorter> inside of the RoleInfo. > This simplifies the framework tracking logic and slightly improves > performance. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.hpp > c2058baca5159da4cdcab77afd5de3c0d5ae6c48 > src/master/allocator/mesos/hierarchical.cpp > 875cfcd091f5f58afb89e752da5100a75828dd67 > > > Diff: https://reviews.apache.org/r/70618/diff/3/ > > > Testing > ------- > > make check > > Benchmarking: 5 runs of > BENCHMARK_HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota/5 with the > optimized build. > > BEFORE (master): > > Added 3000 agents in 57.444301ms > Added 3000 frameworks in 15.100499419secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 13.359926851secs > Made 0 allocation in 12.147765014secs > > Added 3000 agents in 58.651887ms > Added 3000 frameworks in 14.485925735secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 13.6526783secs > Made 0 allocation in 12.138439924secs > > Added 3000 agents in 59.028581ms > Added 3000 frameworks in 14.72945866secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 12.739135078secs > Made 0 allocation in 12.673302496secs > > Added 3000 agents in 59.050577ms > Added 3000 frameworks in 14.78273576secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 13.20400492secs > Made 0 allocation in 13.289808943secs > > Added 3000 agents in 58.629888ms > Added 3000 frameworks in 14.714786337secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 13.721094744secs > Made 0 allocation in 12.688377237secs > > ----------------------------------- > AFTER (master + previous patch https://reviews.apache.org/r/70591/ + this > patch): > > Added 3000 agents in 58.04155ms > Added 3000 frameworks in 13.694651977secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 12.417541213secs > Made 0 allocation in 12.130755905secs > > Added 3000 agents in 55.246813ms > Added 3000 frameworks in 13.460479936secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 12.393765514secs > Made 0 allocation in 12.196981426secs > > Added 3000 agents in 58.013477ms > Added 3000 frameworks in 13.69361015secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 12.245916159secs > Made 0 allocation in 11.699553888secs > > Added 3000 agents in 57.163681ms > Added 3000 frameworks in 13.738218369secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 12.809206431secs > Made 0 allocation in 12.400140164secs > > Added 3000 agents in 57.942087ms > Added 3000 frameworks in 13.836390727secs > Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter > Made 3856 allocations in 12.75595625secs > Made 0 allocation in 11.939263998secs > > > Thanks, > > Andrei Sekretenko > >
