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

Use ResourceQuantities in the allocator and sorter to improve performance.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0
    • allocation

    Description

      In allocator and sorter, we need to do a lot of quantity calculations. Currently, we use the full Resources type with utilities like createScalarResourceQuantities(), even though we only care about quantities. Replace Resources with ResourceQuantities.

      See:

      https://github.com/apache/mesos/blob/386b1fe99bb9d10af2abaca4832bf584b6181799/src/master/allocator/sorter/drf/sorter.hpp#L444-L445
      https://reviews.apache.org/r/70061/

      With the addition of ResourceQuantities, callers can now just do ResourceQuantities.fromScalarResources(r.scalars()) instead of using Resources::createStrippedScalarQuantity(), which should actually be a bit more efficient since we only copy the shared pointers rather than construct new `Resource` objects.

      Attachments

        Activity

          People

            mzhu Meng Zhu
            mzhu Meng Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: