Meng Zhu created MESOS-8986:
-------------------------------
Summary: `slave.available()` in the allocator is expensive and
drags down allocation performance.
Key: MESOS-8986
URL: https://issues.apache.org/jira/browse/MESOS-8986
Project: Mesos
Issue Type: Improvement
Components: allocation
Reporter: Meng Zhu
Assignee: Meng Zhu
We noticed that the [`slave.available()`
function|https://github.com/apache/mesos/blob/d733b1031350e03bce443aa287044eb4eee1053a/src/master/allocator/mesos/hierarchical.hpp#L380-L388]
in the allocator is expensive and gets called many times in each allocation
cycle. In one of our profiling results, this function accounts for more than
80% of the allocation time, drags down the allocator performance significantly.
One simple way to reduce the overhead is to "denormalize" the available
resource field--instead of calculating it each time on the fly, we could cache
the value and only update it when the agent's allocations or total resources
change.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)