mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meng Zhu <>
Subject Re: Review Request 70419: Refactor `Sorter::sorted()` to return `class SortedCandidates`.
Date Mon, 08 Apr 2019 17:15:38 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated April 8, 2019, 10:15 a.m.)

Review request for mesos and Benjamin Mahler.


Added some benchmark result.

Repository: mesos


This patch refactors `Sorter::sorted` to return an abstract
class `SortedCandidates` instead of a whole `vector<string>`.
Callers can then use `SortedCandidates::next()` to get the
next sorted candidate. This paves the way for sort optimization
where sorting of the whole clients can be lazily done as callers
ask for the next client.


  src/master/allocator/mesos/hierarchical.cpp 64a076ddd29711437d539a06bb0470755828cc87 
  src/master/allocator/sorter/drf/sorter.hpp 91a9d668b87079158f7072780dc86bb08865166e 
  src/master/allocator/sorter/drf/sorter.cpp 554ac84ee585d1d07048a58cf7d7d1e6586252ee 
  src/master/allocator/sorter/random/sorter.hpp 125ce84761e4c930370912151700ddda35d7b6c1 
  src/master/allocator/sorter/random/sorter.cpp bbe130dbf3b158ea14f9572bc5d14200fcd85127 
  src/master/allocator/sorter/sorter.hpp d56a1166a9e82b034564842ac071874ec2885004 
  src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 


Testing (updated)

make check

Optimized build
Ran QuotaParam/BENCHMARK_HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota/2

tl;dr: ~10% slowdown for this setup

## Before
Added 3000 agents in 85.844373ms
Added 3000 frameworks in 19.713969615secs
Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks
Made 3500 allocations in 13.690538305secs
Made 0 allocation in 9.76855825secs

## After
Added 3000 agents in 94.645481ms
Added 3000 frameworks in 19.142346619secs
Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks
Made 3500 allocations in 14.888207984secs
Made 0 allocation in 10.869148916secs


Meng Zhu

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message