Details

    • Sub-task
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • fairscheduler
    • None

    Description

      We should shuffle the nodes to avoid some nodes being preempted frequently. 

      Also, we should limit the num of nodes to make preemption more efficient.

      Just like this,

      // we should not iterate all nodes, that will be very slow
      long maxTryNodeNum = context.getPreemptionConfig().getToBePreemptedNodeMaxNumOnce();
      
      if (potentialNodes.size() > maxTryNodeNum){
        Collections.shuffle(potentialNodes);
        List<FSSchedulerNode> newPotentialNodes = new ArrayList<FSSchedulerNode>();
      
      for (int i = 0; i < maxTryNodeNum; i++){
        newPotentialNodes.add(potentialNodes.get(i));
      }
      potentialNodes = newPotentialNodes;
      
      

       

      Attachments

        1. YARN-9278.003.patch
          7 kB
          Zhaohui Xin
        2. YARN-9278.002.patch
          7 kB
          Zhaohui Xin
        3. YARN-9278.001.patch
          6 kB
          Zhaohui Xin

        Activity

          People

            uranus Zhaohui Xin
            uranus Zhaohui Xin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: