[
https://issues.apache.org/jira/browse/MESOS-8952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Mahler reassigned MESOS-8952:
--------------------------------------
Assignee: Benjamin Mahler
> process::await/collect n^2 performance issue
> --------------------------------------------
>
> Key: MESOS-8952
> URL: https://issues.apache.org/jira/browse/MESOS-8952
> Project: Mesos
> Issue Type: Bug
> Components: libprocess
> Reporter: Benjamin Mahler
> Assignee: Benjamin Mahler
> Priority: Major
>
> Due to the use of std::list::size (which appears to be linear in complexity
> even with g++ and c++11), process::await and process::collect suffer from n^2
> complexity. A minimal patch to switch to std::vector shows the following
> improvement:
> {noformat: Title=Before}
> Registered 2000 frameworks
> Finished launching the tasks; Sleep 10 seconds ...
> Start collecting metrics ...
> v0 '/metrics/snapshot' response took 17.751689014secs
> v1 'master::call::GetMetrics' application/x-protobuf response took
> 17.523928635secs
> v1 'master::call::GetMetrics' application/json response took 18.111901732secs
> {noformat}
> {noformat: Title=After}
> Registered 2000 frameworks
> Finished launching the tasks; Sleep 10 seconds ...
> Start collecting metrics ...
> v0 '/metrics/snapshot' response took 1.730948431secs
> v1 'master::call::GetMetrics' application/x-protobuf response took
> 1.697177667secs
> v1 'master::call::GetMetrics' application/json response took 2.160314525secs
> {noformat}
> A follow up to switch the interface to std::vector would be beneficial since
> we don't need any of the std::list benefits.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)