Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2099

Preemption in fair scheduler should consider app priorities

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5.0
    • None
    • api, resourcemanager
    • None

    Description

      Fair scheduler should take app priorities into account while
      preempting containers.

      Attachments

        1. YARN-2099.patch
          20 kB
          Wei Yan

        Issue Links

          Activity

            ywskycn Wei Yan added a comment -

            Hi, Ashwin.
            We have discussed a little bit about the priority and preemption in YARN-596. The old preemption implementation is based on container's priority, and YARN-596 starts to consider fairshare.

            Have one question here, consider all queues deploy fair share policy. By taking app priorities, if we want to preempt a container, which option do we deploy? (1) We collect all running apps from over-fairshare queues, and select the one with the lowest priority as the candidate, or (2) We firstly choose the queue which is most over its fair share, then the select the app with the lowest priority inside that queue as the candidate.

            ywskycn Wei Yan added a comment - Hi, Ashwin. We have discussed a little bit about the priority and preemption in YARN-596 . The old preemption implementation is based on container's priority, and YARN-596 starts to consider fairshare. Have one question here, consider all queues deploy fair share policy. By taking app priorities, if we want to preempt a container, which option do we deploy? (1) We collect all running apps from over-fairshare queues, and select the one with the lowest priority as the candidate, or (2) We firstly choose the queue which is most over its fair share, then the select the app with the lowest priority inside that queue as the candidate.
            sandyr Sandy Ryza added a comment -

            I think the desired behavior here should be that a leaf queue's scheduling policy determines which apps get containers preempted inside of it. For fair share and DRF, the app to get a container preempted should be that which most exceeds its fair share. Priorities come in to play by providing weightings on the fair share. It would also be possible to add a leaf-level scheduling policy that always preempts the app with the lowest priority.

            I think that once YARN-596 is in we will actually have this behavior.

            Thoughts? Anything I'm missing?

            sandyr Sandy Ryza added a comment - I think the desired behavior here should be that a leaf queue's scheduling policy determines which apps get containers preempted inside of it. For fair share and DRF, the app to get a container preempted should be that which most exceeds its fair share. Priorities come in to play by providing weightings on the fair share. It would also be possible to add a leaf-level scheduling policy that always preempts the app with the lowest priority. I think that once YARN-596 is in we will actually have this behavior. Thoughts? Anything I'm missing?
            ywskycn Wei Yan added a comment -

            Add a PriorityPolicy besides the existing fifo/fair/drf should work fine. Also, we also need to think about the resource allocation part. For a queue using PriorityPolicy, resource should be assigned to the applications from the highest proority. right?

            ywskycn Wei Yan added a comment - Add a PriorityPolicy besides the existing fifo/fair/drf should work fine. Also, we also need to think about the resource allocation part. For a queue using PriorityPolicy, resource should be assigned to the applications from the highest proority. right?
            ashwinshankar77 Ashwin Shankar added a comment -

            Ah, I didn't know about YARN-596,this is very nice !
            I agree with Sandy's comment. Keeping app preemption based on leaf queue's scheduling policy and having a separate policy
            which is purely based on priority makes sense to me.

            ashwinshankar77 Ashwin Shankar added a comment - Ah, I didn't know about YARN-596 ,this is very nice ! I agree with Sandy's comment. Keeping app preemption based on leaf queue's scheduling policy and having a separate policy which is purely based on priority makes sense to me.
            ywskycn Wei Yan added a comment -

            Hey, ashwinshankar77, Are you working on this one? If not, I would like to take it.

            ywskycn Wei Yan added a comment - Hey, ashwinshankar77 , Are you working on this one? If not, I would like to take it.
            ashwinshankar77 Ashwin Shankar added a comment -

            Hey ywskycn, please go ahead.

            ashwinshankar77 Ashwin Shankar added a comment - Hey ywskycn , please go ahead.
            ywskycn Wei Yan added a comment -

            Upload an initial patch to capture which we discussed.
            Need to add testcases once YARN-2098 resolved.

            ywskycn Wei Yan added a comment - Upload an initial patch to capture which we discussed. Need to add testcases once YARN-2098 resolved.
            sunilg Sunil G added a comment -

            ywskycn, please check following comment

            sunilg Sunil G added a comment - ywskycn , please check following comment

            People

              ywskycn Wei Yan
              ashwinshankar77 Ashwin Shankar
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: