volcano.sh/volcano@v1.9.0/docs/design/reclaim-design.md (about)

     1  ## Execution flow for Reclaim action
     2  
     3  Reclaim runs in each session and the workflow of the session is explained below with the help of diagram.
     4  
     5  1. In every session, local copies of objects(**queues**, **queueMap**, **preemptorsMap**, **preemptorTasks**) are created.
     6  2. Range over all Jobs
     7      1. If Job's Queue is not found, move on to next job
     8      2. If found, add queue to **queueMap** and **queues** local object.
     9      3. Check for Job's Pending tasks,
    10          1. If no pending tasks, move on to next job
    11          2. If Job has pending tasks, update local objects.
    12  3. Check whether **queues** object is empty
    13      1. If **queues** object is not empty
    14          1. Pop out queue from **queues** object
    15              1. If queue is overused, move on to next queue from queues object
    16              2. If queue is not overused, check for for jobs which has pending tasks within that queue and select preemptor task
    17  4.  Range over all nodes and run predicateFn for preemptor task
    18      1. If predicates are not satisfied, move on to next node
    19      2. If all the predicates are satisfied
    20          1.  Range over all tasks running that node but from different queue other than preemptor task's queue and find all **reclaimees** tasks
    21          2. Send preemptor task and set of **reclaimees** task to ReclaimableFn which has been loaded by following plugins such as conformance, gang and proportion
    22  5. ReclaimableFn returns all possible victim tasks that can be evicted
    23  6. If number or victim tasks is zero or resource requirement of preemptor task is greater than total resource of all victim tasks, then move on to next node
    24  7. If resouce requirement of preemptor task is satisfied, then evict tasks from victim tasks one by one until preemptor task can be pipelined
    25  8. Run this until **queues** object is empty
    26  
    27  ![Execution flow graph for Reclaim](./images/ReclaimDesign.png)
    28  
    29  
    30