Details

    • Type: Sub-task
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: fairscheduler
    • Labels:
      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

            • Assignee:
              uranus Zhaohui Xin
              Reporter:
              uranus Zhaohui Xin
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: