----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70618/ -----------------------------------------------------------
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 consolidates in the `RoleInfo` the logic of tracking frameworks tied to a specific role. To do this properly, `RoleInfo` is turned into a class which wraps access to the framework sorter so that no other entity is capable of adding/removing clients (the frameworks) to/from the framework sorter. The patch introduces almost no performance impact. Diffs ----- src/master/allocator/mesos/hierarchical.hpp c2058baca5159da4cdcab77afd5de3c0d5ae6c48 src/master/allocator/mesos/hierarchical.cpp 64a076ddd29711437d539a06bb0470755828cc87 Diff: https://reviews.apache.org/r/70618/diff/1/ Testing ------- make check Benchmarking: 5 runs of BENCHMARK_HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota/5 with the optimized build. BEFORE (master): Added 3000 agents in 52.729305ms Added 3000 frameworks in 13.799200231secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.560201008secs Made 0 allocation in 12.143722849secs Added 3000 agents in 64.789364ms Added 3000 frameworks in 14.175436362secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.505877513secs Made 0 allocation in 12.424587206secs Added 3000 agents in 50.942631ms Added 3000 frameworks in 14.26206239secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.220950624secs Made 0 allocation in 12.495832704secs Added 3000 agents in 50.660372ms Added 3000 frameworks in 14.246438788secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.505903032secs Made 0 allocation in 12.334731087secs Added 3000 agents in 50.292757ms Added 3000 frameworks in 14.236187327secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.531212952secs Made 0 allocation in 12.282740343secs ----------------------------------- AFTER (master + previous patch https://reviews.apache.org/r/70591/ + this patch): Added 3000 agents in 51.465368ms Added 3000 frameworks in 13.599017611secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.272279231secs Made 0 allocation in 12.026509432secs Added 3000 agents in 52.5567ms Added 3000 frameworks in 13.67345101secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.447551363secs Made 0 allocation in 12.045692187secs Added 3000 agents in 52.455703ms Added 3000 frameworks in 13.344338641secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 11.988632162secs Made 0 allocation in 11.558150131secs Added 3000 agents in 53.579201ms Added 3000 frameworks in 13.681435728secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 11.966754231secs Made 0 allocation in 12.720889223secs Added 3000 agents in 52.08713ms Added 3000 frameworks in 13.562008608secs Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with random sorter Made 3856 allocations in 12.19201724secs Made 0 allocation in 11.727037034secs Thanks, Andrei Sekretenko