You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Meng Zhu (JIRA)" <ji...@apache.org> on 2018/06/13 23:31:00 UTC

[jira] [Commented] (MESOS-8989) Add a better benchmark for range type resources.

    [ https://issues.apache.org/jira/browse/MESOS-8989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16511798#comment-16511798 ] 

Meng Zhu commented on MESOS-8989:
---------------------------------

So currently, range subtraction is about 2-3 times more expensive than addition.

> 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
>            Priority: Minor
>              Labels: benchmark
>
> 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)