Meng Zhu created MESOS-8989:
-------------------------------
Summary: Add a better benchmark for range type resources.
Key: MESOS-8989
URL: https://issues.apache.org/jira/browse/MESOS-8989
Project: Mesos
Issue Type: Improvement
Reporter: Meng Zhu
Assignee: Meng Zhu
While investigating the performance issue with the `available()` function in
the allocator, the arithmetic of range type resources, namely ports, appear to
be most expensive. And the subtraction proves to be significantly more
expensive than the addition whose cause is not immediately clear to me.
While we do have a benchmark
`[Resources_Scalar_Arithmetic_BENCHMARK_Test|https://github.com/apache/mesos/blob/1b851877ff22cf2da193bb649dc838bb50c26b34/src/tests/resources_tests.cpp#L3610-L3626]`
that contains a range parametrized test, its result is somewhat misleading. It
evaluates the addition performance by repeatedly summing up the same port
resources which is fine. However, when evaluating the subtraction, it took the
result from the addition and repeatedly subtracting the same port resources.
The result is that after the first subtraction, the subtrahend becomes empty
and all the subsequent subtractions are shorthanded, producing uninstructive
result.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)