mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Sekretenko <>
Subject Re: Review Request 72508: Fixed performance of tracking resource totals in allocator's roles tree.
Date Thu, 14 May 2020 20:05:02 GMT

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

(Updated May 14, 2020, 8:05 p.m.)

Review request for mesos and Benjamin Mahler.


Adjusted comments; renamed `total` and `offeredOrAllocatedOrReservedSubjectToQuota()`.

Bugs: MESOS-10128

Repository: mesos


Before this patch, the roles tree was tracking total resources
offered/allocated to a role as a single `Resources` objects.
In the case when each agent has a limited number of unique resources
(for example, a single persistent voulme), this resulted in poor
asymptotic complexity of allocation versus the number of agents
(O(N^2)) that was clearly observable in
In addition, the role tree code was violating the convention that
`Resources` belonging to different agents should never be added.

This patch implements per-agent tracking of `Resources` in the roles
tree, thus improving the performance of allocation (and getting rid of
the potentially problematic O(N^2) asymptotic) in the case of many
agents with a limited number of unique resources each.

Diffs (updated)

  src/master/allocator/mesos/hierarchical.hpp 6454cdaa19f776365df34ecf83114f0d6fa20f27 
  src/master/allocator/mesos/hierarchical.cpp 5fe9ffcb518b8427d663ddae43e550795d290e3c 





Andrei Sekretenko

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