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

Allocate revocable resources beyond quota guarantee.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Accepted
    • Major
    • Resolution: Unresolved
    • None
    • None
    • allocation

    Description

      Status Quo

      Currently resources allocated to frameworks in a role with quota (aka quota'ed role) beyond quota guarantee are marked non-revocable. This impacts our flexibility for revoking them if we decide so in the future.

      Proposal

      Once quota guarantee is satisfied we must not necessarily further allocate resources as non-revocable. Instead we can mark all offers resources beyond guarantee as revocable. When in the future RevocableInfo evolves frameworks will get additional information about "revocability" of the resource (i.e. allocation slack)

      Caveats

      Though it seems like a simple change, it has several implications.

      Fairness

      Currently the hierarchical allocator considers revocable resources as regular resources when doing fairness calculations. This may prevent frameworks getting non-revocable resources as part of their role's quota guarantee if they accept some revocable resources as well.

      Consider the following scenario. A single framework in a role with quota set to 10 CPUs is allocated 10 CPUs as non-revocable resources as part of its quota and additionally 2 revocable CPUs. Now a task using 2 non-revocable CPUs finishes and its resources are returned. Total allocation for the role is 8 non-revocable + 2 revocable. However, the role may not be offered additional 2 non-revocable since its total allocation satisfies quota.

      Resource math

      If we allocate non-revocable resources as revocable, we should make sure we do accounting right: either we should update total agent resources and mark them as revocable as well, or bookkeep resources as non-revocable and convert them to revocable when necessary.

      Coarse-grained nature of allocation

      The hierarchical allocator performs "coarse-grained" allocation, meaning it always allocates the entire remaining agent resources to a single framework. This may lead to over-allocating some resources as non-revocable beyond quota guarantee.

      Quotas smaller than fair share

      If a quota set for a role is smaller than its fair share, it may reduce the amount of resources offered to this role, if frameworks in it do not accept revocable resources. This is probably the most important consequence of the proposed change. Operators may set quota to get guarantees, but may observe a decrease in amount of resources a role gets, which is not intuitive.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alexr Alex R
              Joris Van Remoortere Joris Van Remoortere
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: