Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8952

process::await/collect n^2 performance issue

    XMLWordPrintableJSON

Details

    Description

      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:

      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
      
      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
      

      A follow up to switch the interface to std::vector would be beneficial since we don't need any of the std::list benefits.

      Attachments

        Issue Links

          Activity

            People

              bmahler Benjamin Mahler
              bmahler Benjamin Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: