Fixed performance of tracking resource totals in allocator's roles tree.

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
`HierarchicalAllocations_BENCHMARK_Test.PersistentVolumes`.
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.

Review: https://reviews.apache.org/r/72508
2 files changed
tree: 719ffca21bb871dee9ece45729a5e849a7fbec33
  1. 3rdparty/
  2. bin/
  3. cmake/
  4. docs/
  5. include/
  6. m4/
  7. site/
  8. src/
  9. support/
  10. .gitattributes
  11. bootstrap
  12. CHANGELOG
  13. CMakeLists.txt
  14. configure.ac
  15. Doxyfile
  16. LICENSE
  17. Makefile.am
  18. mesos.pc.in
  19. NOTICE
  20. README.md
README.md

Apache Mesos

Apache Mesos is a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks. It can run Hadoop, Jenkins, Spark, Aurora, and other frameworks on a dynamically shared pool of nodes.

Visit us at mesos.apache.org.

Mailing Lists

Documentation

Documentation is available in the docs/ directory. Additionally, a rendered HTML version can be found on the Mesos website's Documentation page.

Installation

Instructions are included on the Getting Started page.

License

Apache Mesos is licensed under the Apache License, Version 2.0.

For additional information, see the LICENSE and NOTICE files.