energy aware scheduling byungchul park
play

Energy Aware Scheduling Byungchul Park LG Electronics System S/W - PowerPoint PPT Presentation

Energy Aware Scheduling Byungchul Park LG Electronics System S/W Engineer Kernel Developer Computer Science Physics Dance Outline 2 Basic SMP Load Balancing Per-Entity Load Tracking Attempts for Power Saving Energy Aware


  1. Energy Aware Scheduling

  2. Byungchul Park LG Electronics System S/W Engineer Kernel Developer Computer Science Physics Dance

  3. Outline 2  Basic SMP Load Balancing  Per-Entity Load Tracking  Attempts for Power Saving  Energy Aware Scheduling

  4. Outline 3  Basic SMP Load Balancing  Per-Entity Load Tracking  Attempts for Power Saving  Energy Aware Scheduling

  5. Load Balancing Cases 4  When a CPU becomes idle or periodically Migrate tasks from the most loaded CPU to a less loaded CPU •  When a task is fork(2)ed or exec(2)ed Good chance to change task’s CPU, due to its small cache footprint • the cpu which Select the least loaded CPU • the task will run on  When a task is woken up Select the previous CPU or current CPU if possible • Select the least loaded CPU •

  6. Steps for Load Balancing (Migration) Original Scheduling 5 Measure all CPUs’ load 1. Decide the busiest CPU 2. Decide the idlest CPU 3. Migrate tasks from the busiest CPU to the idlest CPU 4.

  7. Load Balancing 6 Who is busiest ? CPU 1 CPU 0

  8. Load Balancing 7 Take the load ! CPU 1 CPU 0

  9. Load Balancing 8 CPU 0 CPU 1

  10. Steps for Load Balancing (Wakeup) Original Scheduling 9 Measure all CPUs’ load 1. Decide the idlest CPU 2. Set the woken task’s CPU to the idlest CPU 3.

  11. Load Balancing 10 Who is idlest ? … wake up wait queues CPU 1 CPU 0

  12. Load Balancing 11 … wake up wait queues Take the load ! CPU 1 CPU 0

  13. Load Balancing 12 … wait queues CPU 0 CPU 1

  14. Load Balancing 13  We have to measure each CPU load  What is the CPU load ?

  15. CPU Load 14  CPU load = ∑ every task load on the CPU  Task load = a value decided by nice(2) High priority task is considered as a large loaded task • Low priority task is considered as a small loaded task •  CPU load average = CPU load * CPU utilization (conceptually) low utilized CPU has a small load average Ultimately used for load balancing • high utilized CPU has a large load average More precisely, CPU load * moving averaged CPU utilization •

  16. Moving Average 15  A method to get the average for sequential data set  Consider already passed values after reducing its contribution  Useful to track the tendency of values (not instant values)

  17. Moving Average 16  Thanks to moving average, • Scheduler can track tendency of CPU load, • Not only current CPU load at that moment updating it

  18. CPU Load Tracking 17 Task load

  19. CPU Load Tracking 18 CPU load

  20. CPU Load Tracking 19 CPU load CPU load average

  21. CPU Load Tracking 20 CPU load Time CPU load average

  22. CPU Load Tracking 21 CPU load Time CPU load average

  23. Outline 22  Basic SMP Load Balancing  Per-Entity Load Tracking  Attempts for Power Saving  Energy Aware Scheduling

  24. Per-entity Load Tracking Developed by Paul Turner 23  What is entity? Scheduling unit • Basically a task is an entity • A task group can be an entity in group scheduling •

  25. Per-entity Load Tracking Developed by Paul Turner 24  Before Apply moving average on the CPU utilization • Consider CPU’s utilization behavior •  After task or task group Apply moving average on the each entity runnable ratio • Consider entity’s running(or sleep) behavior •

  26. Original CPU Load Tracking 25 CPU load Time CPU load average

  27. Original CPU Load Tracking 26 Entity load CPU load Time CPU load average

  28. Per-Entity Load Tracking 27 Entity load

  29. Per-Entity Load Tracking 28 Entity load Entity load average

  30. Per-Entity Load Tracking 29 Entity load Entity load average

  31. Per-Entity Load Tracking 30 Entity load Entity load average = = = Time CPU load average

  32. Outline 31  Basic SMP Load Balancing  Per-Entity Load Tracking  Attempts for Power Saving  Energy Aware Scheduling

  33. Steps for Load Balancing (Migration) Power Saving Scheduling 32 Measure all CPUs’ load 1. can accommodate which CPU is chosen is additional tasks without depending on implementation overflowing Choose a CPU from available CPUs 2. Decide the idlest CPU 3. Migrate tasks from the idlest CPU to the chosen CPU 4.

  34. Load Balancing for Power Saving 33 I'm chosen. I will help another CPU go to idle ! CPU 1 CPU 0

  35. Load Balancing for Power Saving 34 Take the load ! CPU 1 CPU 0

  36. Load Balancing for Power Saving 35 Empty ! CPU 1 (Idle) CPU 0

  37. Steps for Load Balancing (Wakeup) Power Saving Scheduling 36 Measure all CPUs’ load 1. Choose a CPU from available CPUs 2. Set the task’s CPU to the CPU 3.

  38. Load Balancing for Power Saving 37 Where should I go ? … wake up wait queues I am about to be idle. I'm chosen. I will help another CPU go to idle ! CPU 1 CPU 0

  39. Load Balancing for Power Saving 38 … wake up wait queues Take the load ! CPU 1 CPU 0

  40. Load Balancing for Power Saving 39 … wait queues CPU 1 CPU 0

  41. Load Balancing for Power Saving 40 … wait queues Empty ! CPU 1 (Idle) CPU 0

  42. Attempts for Power Saving 41  Accelerated by “per - entity load tracking” patch  Important for Big.LITTLE and server farm environment  Trade off between performance and power saving

  43. Attempts for Power Saving 42  T o prevent performance regression • Perform power saving load balancing, only when the system is not busy • Perform original load balancing, when the system is busy,

  44. Small Task Packing small task is a task used to sleep for more than 75% Developed by Vincent Guittot 43  Goal Pack tasks to fewer CPUs so that more CPUs can be idle • achieved by modifying original load balancing •  How Migrate tasks to a CPU not sharing hardware power line • Kernel cannot put an empty CPU to a deep idle state • if it shares hardware power line with busy CPU

  45. Power Awareness Scheduling Developed by Alex Shi 44  Goal Pack tasks to fewer CPUs so that more CPUs can be idle • achieved by modifying original load balancing •  How can accommodate additional tasks without overflowing Migrate tasks to the busiest CPU among available CPUs • Not consider hardware power line •

  46. Outline 45  Basic SMP Load Balancing  Per-Entity Load Tracking  Attempts for Power Saving  Energy Aware Scheduling

  47. Consider CPU Frequency 46  Until now only consider CPU idle  What if consider CPU frequency ?

  48. Consider CPU Frequency 47 Power (mW) CPU frequency lowest highest

  49. Consider CPU Frequency 48 Take the load ? CPU 1 CPU 0

  50. Consider CPU Frequency 49 Empty ! CPU 1 (Idle) CPU 0

  51. Consider CPU Frequency 50 Take the load ! CPU 1 CPU 0

  52. Consider CPU Frequency 51 CPU 0 CPU 1

  53. Consider CPU Frequency 52 … wake up wait queues Take the load ? CPU 1 CPU 0

  54. Consider CPU Frequency 53 … wait queues CPU 1 CPU 0

  55. Consider CPU Frequency 54 … wake up wait queues Take the load ! CPU 1 CPU 0

  56. Consider CPU Frequency 55 … wait queues CPU 0 CPU 1

  57. Energy Cost Model 56  For saving power consumption, • Is it better to pack tasks to fewer CPUs ? • Is it better to spread tasks to all CPUs ?

  58. Consider Frequency States 57 Power Power (mW) (mW) CPU frequency CPU frequency lowest highest lowest highest Architecture A Architecture B

  59. Consider Idle States 58 Power Power (mW) (mW) idle frequency idle frequency deepest shallowest lowest highest deepest shallowest lowest highest Architecture A Architecture B

  60. Energy Cost Model 59  For saving power consumption, • Better to pack tasks to fewer CPUs where power difference between CPU idle states is large • Better to spread tasks to all CPUs where power difference between CPU frequency states is large

  61. Energy Cost Model 60  For saving power consumption, with considering time • Better to pack tasks to fewer CPUs where energy cost difference between CPU idle states is large = power integrated by time • Better to spread tasks to all CPUs where energy cost difference between CPU frequency states is large

  62. OK ! It would be better if it performs the load balancing based on the energy cost 61

  63. CPU States (Example) 62 Power Power (mW) (mW) A B C D E F Idle states Frequency states deepest shallowest lowest highest Idle states Frequency states

  64. Energy Cost Table (Example) 63 CPU States Energy Cost Description A 300 non-idle + frequency state 0 B 200 non-idle + frequency state 1 C 100 non-idle + frequency state 2 D 50 idle state 1 E 10 idle state 2 F 1 idle state 3 S ystem’s total energy cost = ∑ each CPU energy cost

  65. It looks very simple to perform the load balancing based on the energy cost 64

  66. 65

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