sc sche heduling duling jo jobs s with with de depe pende
play

Sc Sche heduling duling Jo Jobs s With With De Depe pende - PowerPoint PPT Presentation

Sc Sche heduling duling Jo Jobs s With With De Depe pende ndenc ncie ies: s: New Applications, Classic Problems ms Janardhan Kulkarni, Microsoft Research, Redmond. 31 July 2018, TTI, Chicago TTIC SUMMER WORKSHOP: DATA CENTER


  1. When did System m Designers Care for Lo Lowerbo erbounds unds? ? GRAPHENE: Packing and Dependency-Aware Scheduling for Data-Parallel Clusters. OSDI 2016. Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. ² Could find almost optimal solutions on MS data sets. ² Improves makespan by 30% at least compared to simple greedy heuristics.

  2. Intuition of Graphene “pathologically bad schedules in today’s approaches mostly arise due to two reasons: (a) long-running tasks What greedy algorithms miss? have no other work to overlap with them, which reduces (List-Scheduling, Critical Path, etc) parallelism, and (b) the tasks that are runnable do not pack well with each other, which increases resource fragmentation.”

  3. Intuition of Graphene Ø Our approach is to identify the potentially troublesome tasks, such as those that run for a very long time or are hard to pack. Main Steps

  4. Intuition of Graphene Ø Our approach is to identify the potentially troublesome tasks, such as those that run for a very long time or are hard to pack. Ø Place the troublesome tasks first onto a virtual Main Steps resource-time space. This space would have d +1 dimensions when tasks require d resources; the last dimension being time.

  5. Intuition of Graphene Ø Our approach is to identify the potentially troublesome tasks, such as those that run for a very long time or are hard to pack. Ø Place the troublesome tasks first onto a virtual Main Steps resource-time space. This space would have d +1 dimensions when tasks require d resources; the last dimension being time. Ø Our intuition is that placing the troublesome tasks first leads to a good schedule since the remaining tasks can be placed into resultant holes in this space.

  6. Can we formalize this intuition?

  7. Levey and Rothvoss ‘ 16 A -Approximation for Makespan Scheduling (1 + ✏ ) with Precedence Constraints using LP Hierarchies.

  8. Identical Machines Scheduling (Special case of DAG scheduling) Minimize Makespan A single DAG. Each task needs to be scheduled on exactly one machine. Each task needs 1 unit of CPU. m identical machines (or CPUs)

  9. Identical Machines Scheduling A single DAG. Each task needs to be scheduled on exactly one machine. Each task needs 1 unit of CPU. m identical machines (or CPUs)

  10. Identical Machines Scheduling Chain of length 4 A single DAG. Each task needs to be scheduled on exactly one machine. Each task needs 1 unit of CPU. m identical machines (or CPUs)

  11. Identical Machines Scheduling Chain of length 4 A single DAG. Each task needs to be scheduled on exactly one machine. Each task needs 1 unit of CPU. m identical machines (or CPUs)

  12. Identical Machines Scheduling Theorem. Graham 1960. Greedy or List-Scheduling is 2 approximation for minimizing makespan.

  13. Identical Machines Scheduling Theorem. Graham 1960. Greedy or List-Scheduling is 2 approximation for minimizing makespan. GOOD SLOTS BAD SLOTS

  14. Identical Machines Scheduling Theorem. Graham 1960. Greedy or List-Scheduling is 2 approximation for minimizing makespan. GOOD SLOTS BAD SLOTS + Makespan ≤

  15. Identical Machines Scheduling Theorem. Graham 1960. Greedy or List-Scheduling is 2 approximation for minimizing makespan. GOOD SLOTS BAD SLOTS + Makespan ≤ n/m Length of Longest chain

  16. Identical Machines Scheduling Theorem. Graham 1960. Greedy or List-Scheduling is 2 approximation for minimizing makespan. OPT ≥ OPT ≥ GOOD SLOTS BAD SLOTS + Makespan ≤ n/m Length of Longest chain

  17. Identical Machines Scheduling Theorem. Graham 1960. Greedy or List-Scheduling is 2 approximation for minimizing makespan. Ø Optimal theoretically. But conveys very little information in practice. Ø Does not work well in practice when there are more than one resource type. OPT ≥ OPT ≥ GOOD SLOTS BAD SLOTS + Makespan ≤ n/m Length of Longest chain

  18. Identical Machines Scheduling Theorem. Levy and Rothvoss’16. There is a quasi-polynomial time (1 + ✏ ) approximation for minimizing makespan when jobs have unit lengths, when number of machines is a constant. Garg’17 made it strictly quasi-polynomial time.

  19. Identical Machines Scheduling Theorem. Kulkarni, Li’18. There is a quasi-polynomial time (1 + ✏ ) approximation for minimizing makespan when jobs have arbitrary lengths, when number of machines is a constant. The algorithm schedules jobs on a single machine and may preempt jobs within a machine.

  20. Identical Machines Scheduling Theorem. Garg, Kulkarni, Li’18. There is a polynomial time optimal (2 + ✏ ) approximation for minimizing weighted completion time of jobs, when number of machines and job sizes are uniform.

  21. Identical Machines Scheduling Theorem. Graham 1960. Greedy or List-Scheduling is 2 approximation for minimizing makespan. OPT ≥ OPT ≥ GOOD SLOTS BAD SLOTS + Makespan ≤ n/m Length of Longest chain

  22. Crucial Observation OPT ≥ ≤ ✏ · OPT GOOD SLOTS BAD SLOTS + Makespan ≤ n/m Length of Longest chain ≤ (1 + ✏ ) · OPT

  23. Crucial Observation troublesome tasks OPT ≥ ≤ ✏ · OPT GOOD SLOTS BAD SLOTS + Makespan ≤ n/m Length of Longest chain ≤ (1 + ✏ ) · OPT How to schedule troublesome tasks?

  24. Framework Partition the tasks into a set of bottom tasks and a single set of top tasks. For each set of bottom tasks we find a sub-interval where they should be scheduled. Then do a recursive scheduling of bottom tasks. T 0 T 3 T 2 T 1 Time Interval

  25. Framework Top tasks Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  26. Framework Precedence constraints across bottom tasks are automatically satisfied. Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  27. Framework Precedence constraints going from bottom to top tasks are loose. Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  28. Framework Precedence constraints going from bottom to top tasks are loose. [ T 2 , T 3 ] Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  29. Precedence constraints going from bottom to top tasks are loose. [ r j , d j ] For every task in the set of top tasks we have based on the tentative assignment of bottom jobs. There is enough space to schedule top tasks T 0 T 3 T 2 T 1

  30. Precedence constraints going from bottom to top tasks are loose. [ r j , d j ] For every task in the set of top tasks we have based on the tentative assignment of bottom jobs. There is enough space to schedule top tasks if there are no precedence constraints between top tasks. T 0 T 3 T 2 T 1

  31. Precedence constraints going from bottom to top tasks are loose. [ r j , d j ] For every task in the set of top tasks we have based on the tentative assignment of bottom jobs. EDF will schedule all top tasks in the empty space but may violate the precedence constraints between top tasks There is enough space to schedule top tasks if there are no precedence constraints between top tasks. T 0 T 3 T 2 T 1

  32. Intuition of Graphene Ø Our approach is to identify the potentially troublesome tasks, such as those that run for a very long time or are hard to pack. Ø Place the troublesome tasks first onto a virtual Main Steps resource-time space. This space would have d +1 dimensions when tasks require d resources; the last dimension being time. Ø Our intuition is that placing the troublesome tasks first leads to a good schedule since the remaining tasks can be placed into resultant holes in this space.

  33. Framework Precedence constraints going from bottom to top tasks are loose. [ T 2 , T 3 ] Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  34. The chain length among top tasks is very small. Framework Precedence constraints going from bottom to top tasks are loose. [ T 2 , T 3 ] Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  35. The chain length among top tasks is very small. Framework Precedence constraints going from bottom to top tasks are loose. [ T 2 , T 3 ] Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  36. The chain length among top tasks is very small. Framework Precedence constraints going from bottom to top The algorithm has recognized a crude schedule for troublesome tasks are loose. tasks. That ’ s why chain length among top tasks is small. [ T 2 , T 3 ] Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  37. Intuition of Graphene Ø Our approach is to identify the potentially troublesome tasks, such as those that run for a very long time or are hard to pack. Ø Place the troublesome tasks first onto a virtual Main Steps resource-time space. This space would have d +1 dimensions when tasks require d resources; the last dimension being time. Ø Our intuition is that placing the troublesome tasks first leads to a good schedule since the remaining tasks can be placed into resultant holes in this space.

  38. The chain length among top tasks is very small. LR’16 Framework Precedence constraints going from bottom to top tasks are loose. [ T 2 , T 3 ] Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  39. Precedence constraints going from bottom to top tasks are loose. [ r j , d j ] For every task in the set of top tasks we have all except few EDF will schedule all top tasks in the empty space but may violate the precedence constraints between top tasks There is enough space to schedule top tasks if there are no precedence constraints between top tasks. T 0 T 3 T 2 T 1

  40. How to partition the DAG? Top tasks 1. Precedence constraints between bottom tasks should be implied. 2. The precedence constraints between top and bottom tasks are loose. 3. The chain length among top tasks is small. Bottom tasks Bottom tasks Bottom tasks T 0 T 3 T 2 T 1 Time Interval

  41. Linear Programming Formulation Binary search the optimal makespan as T T X is scheduled. x jt = 1 For every task j t =1 X x jt ≤ m has at most m jobs. For time slot t j X X x it 0 ≥ i → j, x jt 0 is satisfied at each time step t. For precedence relation t 0 <t t 0 ≤ t All variables are non-negative x jt > 0

  42. LP Cheats … Optimal makespan is 4 but LP can complete in 3 time slots. DAG 2/3 1/3 2/3 Time LP can schedule a job fractionally in a time slot.

  43. Interval of a task Consider the LP solution. Interval of a task is smallest interval that contains fractional schedule of the task. 1/10 5/10 3/10 1/10 Time t 1 t 2

  44. What LP gives? An interval for each task. Time

  45. What LP gives? An interval for each task. Time We use these intervals to partition the DAG into top and bottom tasks.

  46. Building Binary Tree LP Schedules all tasks between [0 , T ] 0 T T 0 T/ 2 T 2 + 1 0 T T T 4 + 1 2 4

  47. LP Schedules all tasks in [0 , T ] Building Binary Tree [0 , T ] [ T/ 2 + 1 , T ] [0 , T/ 2] Assign each task to the log T smallest interval node in the tree that fully contains it.

  48. LP Schedules all tasks in [0 , T ] Building Binary Tree [0 , T ] [ T/ 2 + 1 , T ] [0 , T/ 2] Assign each task to the log T smallest interval node in the tree that fully contains it.

  49. LP Schedules all tasks in [0 , T ] Building Binary Tree [0 , T ] [ T/ 2 + 1 , T ] [0 , T/ 2] Assign each task to the log T smallest interval node in the tree that fully contains it.

  50. LP Schedules all tasks in [0 , T ] Building Binary Tree [0 , T ] [ T/ 2 + 1 , T ] [0 , T/ 2] Assign each task to the log T smallest interval node in the tree that fully contains it.

  51. Defining Top and Bottom Tasks [0 , T ] [ T/ 2 + 1 , T ] [0 , T/ 2] (log log T ) 2

  52. Defining Top and Bottom Tasks [0 , T ] [ T/ 2 + 1 , T ] [0 , T/ 2] (log log T ) 2 Throw Them Away!! log log T

  53. Defining Top and Bottom Tasks [0 , T ] Top Tasks [ T/ 2 + 1 , T ] [0 , T/ 2] (log log T ) 2 Throw Them Away!! log log T Bottom Tasks Sets

  54. Defining Top and Bottom Tasks [0 , T ] Top Tasks [ T/ 2 + 1 , T ] [0 , T/ 2] (log log T ) 2 1. Precedence constraints between bottom tasks should be implied. 2. The precedence constraints between top and bottom tasks are loose. 3. The chain length among top tasks is small. Throw Them Away!! Bottom Tasks Sets

  55. Defining Top and Bottom Tasks [0 , T ] Top Tasks [ T/ 2 + 1 , T ] [0 , T/ 2] Throw Them Away!! log log T Bottom Tasks Sets

  56. Every top task can loose Top tasks one interval to the left and one interval to the right in terms of space in which it should be scheduled. But, bottom intervals are tiny compared to top, so this is not a big loss. Precedence constraints going from bottom to top [ T 2 , T 3 ] tasks are loose. Bottom Bottom tasks tasks T 4 0 T 3 T 2 T 1 Time Interval

  57. Every top task can loose Top tasks one interval to the left and one interval to the right in terms of space in which it should be scheduled. But, bottom intervals are tiny compared to top, so this is not a big loss. Precedence constraints going from bottom to top [ T 2 , T 3 ] tasks are loose. 1. Precedence constraints between bottom tasks should be implied. 2. The precedence constraints between top and bottom tasks are loose. 3. The chain length among top tasks is small. Bottom Bottom tasks tasks T 4 0 T 3 T 2 T 1 Time Interval

  58. Lift and Project Method (LP Hierarchies) Dimensions All the variables are integral. A systematic way of placing troublesome tasks! Number of variables in LP that you want integral Original LP

  59. Lift and Project Method (LP Hierarchies) Dimensions All the variables are integral. A systematic way of placing troublesome tasks! Number of variables in LP that you want integral Running time Increases by a Original LP factor of n. O ( n S )

  60. Lift and Project Method (LP Hierarchies) “Conditioning” 1/10 5/10 3/10 1/10 t 1 t 2 Time Touch a variable, and it becomes integral!

  61. Lift and Project Method (LP Hierarchies) “Conditioning” 1/10 5/10 3/10 1/10 t 1 t 2 Time Touch a variable, and it becomes integral!

  62. Lift and Project Method (LP Hierarchies) “Conditioning” 10/10 Time Touch a variable, and it becomes integral!

  63. Lift and Project Method (LP Hierarchies) 10/10 t 1 t 2 Time “Conditioning” Touch a variable, and it becomes integral!

  64. Lift and Project Method (LP Hierarchies) The LP solution changes in such a way that, for every other task on, the interval in which it is scheduled in the new solution only shrinks. “Conditioning” Touch a variable, and it becomes integral! Time I have a better understanding of where this task got scheduled.

  65. Reducing Chain Length of Top Tasks [0 , T ] [ T/ 2 + 1 , T ] [0 , T/ 2]

  66. Reducing Chain Length of Top Tasks The interval is of length T. T We will make sure that there 0 ✏ T is no chain of length assigned to this interval.

  67. Reducing Chain Length of Top Tasks The interval is of length T. T We will make sure that there x jt > 0 0 ✏ T is no chain of length assigned to this interval.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend