-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70330/
-----------------------------------------------------------
Review request for mesos and Benjamin Mahler.
Bugs: MESOS-9504
https://issues.apache.org/jira/browse/MESOS-9504
Repository: mesos
Description
-------
Replaced `Resources` with `ResourceQuantities` when
appropriate in the sorter. This simplifies the code
and improves performance.
Diffs
-----
src/master/allocator/mesos/hierarchical.cpp
8bc749903b8ceb09a02e260919377483479302b5
src/master/allocator/sorter/drf/sorter.hpp
75f90f331fbe2ec514daa3fe00b0b05ad55932e1
src/master/allocator/sorter/drf/sorter.cpp
43c97671d692675df6a347e4482126d83d7e3f24
src/master/allocator/sorter/random/sorter.hpp
2031cb234cc3e29723f07ec7d3a7e8671a26a97f
src/master/allocator/sorter/random/sorter.cpp
6fcfc41f65bb6401cfb60af88866c2b02920887e
src/master/allocator/sorter/sorter.hpp
25ad48dff7e624e7d25072958bdd20513ab83d12
src/tests/sorter_tests.cpp 1e2791f993af2fba592b0e76493864c096a0bb5f
Diff: https://reviews.apache.org/r/70330/diff/1/
Testing
-------
make check
# Benchmark Result
Optimized build on a 2.2GHz/64GB box
Each ran three times for average
**TL;DR: ~20% speedup for nonquota benchmark; ~30% speedup for quota benchmark**
## Non-quota allocation
Ran `BENCHMARK_HierarchicalAllocator_WithNonQuotaVsQuotaParam.NonQuotaVsQuota`
Selected the Nonquota result
Before:
- 20 agents, 10 roles, 20 frameworks
Made 20 allocations in 2.382283667ms
- 200 agents, 100 roles, 200 frameworks
Made 200 allocations in 19.05821233ms
- 2000 agents, 1000 roles, 2000 frameworks
Made 2000 allocations in 792.1674363ms
After:
- 20 agents, 10 roles, 20 frameworks
Made 20 allocations in 2.329543667ms // 2% speedup
- 200 agents, 100 roles, 200 frameworks
Made 200 allocations in 15.40222667ms // 19% speedup
- 2000 agents, 1000 roles, 2000 frameworks
Made 2000 allocations in 644.5257763ms // 19% speedup
## Quota Allocation
Ran `BENCHMARK_HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota`
Before:
- 30 agents, 30 roles, 30 frameworks
Made 36 allocations in 9.656610667ms
- 300 agents, 300 roles, 300 frameworks
Made 350 allocations in 292.0376493ms
- 3000 agents, 3000 roles, 3000 frameworks
Made 3500 allocations in 22.74423621secs
After:
- 30 agents, 30 roles, 30 frameworks
Made 36 allocations in 6.742066667ms // 30% speedup
- 300 agents, 300 roles, 300 frameworks
Made 350 allocations in 187.105902ms // 35% speedup
- 3000 agents, 3000 roles, 3000 frameworks
Made 3500 allocations in 14.74580913secs // 36% speedup
Thanks,
Meng Zhu