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

`slave.available()` in the allocator is expensive and drags down allocation performance.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.2, 1.5.2, 1.6.1, 1.7.0
    • Component/s: allocation
    • Labels:
      None

      Description

      We noticed that the `slave.available()` function 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.

        Attachments

          Activity

            People

            • Assignee:
              mzhu Meng Zhu
              Reporter:
              mzhu Meng Zhu
              Shepherd:
              Greg Mann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: