Upcoming SlideShare
×

LCA14: LCA14-109: Path to Energy Efficient Scheduler

686 views

Published on

Resource: LCA14
Name: LCA14-109: Path to Energy Efficient Scheduler
Date: 03-03-2014
Speaker: Morten Rasmussun

Published in: Technology
1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
686
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
47
0
Likes
1
Embeds 0
No embeds

No notes for slide

LCA14: LCA14-109: Path to Energy Efficient Scheduler

1. 1. 1 Path to Energy Efficient Scheduler Linaro Connect Asia 2014, Macau Morten Rasmussen
2. 2. 2 Motivation  Energy cost driven task placement (load-balancing)  Focus on the actual goal of the energy-aware scheduling activities:  Saving energy while achieving (near) optimum performance.  Energy benefit of scheduling decision clear when made.  Assuming energy cost estimates are fairly accurate.  Introduce a simple energy model to estimate costs and guide scheduling decisions.  Requested by maintainers at the KS workshop.  Gives the right amount of packing and spreading.  May simplify balancing decision logic.  Strong focus on saving energy in load balancing algorithms.  big.LITTLE support comes naturally and almost for free.  This just one part of the energy efficiency work.  Several related sessions this week.
3. 3. 3 Energy Load Balancing  The idea (a bit simplified):  Let the resulting energy consumption guide all balancing decisions:  if (energy_diff(task, src_cpu, dst_cpu) > 0) { move_task(task, src_cpu, dst_cpu); } else { /* Try some other task */ }  Ideally, we should get the optimum balance if we try all combinations of tasks and cpus.  In reality it is not that simple. We can't try all combinations, but we can get fairly close for most scenarios.  If the energy model is accurate enough we get packing and spreading implicitly and only when it saves energy  Should work for any system. SMP and big.LITTLE (with a few extensions).
4. 4. 4 Power and Energy  Goal: Save energy, not power. Power Time Energy ecpu=P⋅t , t= inst cc ecpu=P(cc) inst cc ecpu=P(cc)( insttask cc + instidle cc ) ecpu=etask+eidle Compute capacity (~ freq * uarch) = Energy/inst: This is what we try to minimize. ecpu=Pbusy (cc) insttask cc +Pidle instidle cc If we have cpuidle support we get: We have to add an additional leakage energy term to reflect that it is better not wake cpus unnecessarily. ~ utilization Tracked load Time Time in runnable state ~ utilization* Work
5. 5. 5 Simple Energy Model  cpu_energy = power(cc) * util/cc + idle_power * (1-(util/cc)) + leakage_energy  cluster_energy = c_active_power * c_util + c_idle_power * (1-c_util)  util = Scale invariant cpu utilization (Tracked load).  cc = Current compute capacity (depends on freq and uarch).  power(cc) = Busy power (fully loaded) at current capacity from table.  idle_power = Idle power consumption (~WFI).  leakage_energy = Constant representing the cost of waking the cpu.  c_util = Cluster utilization. Depends on max(util/cc) ratio of its cpus.  c_active_power = Cluster active power.  c_idle_power = Cluster idle power.
6. 6. 6 Compute Capacity and Power  Processor specific table expressing power and compute capacity at each P-state.  The sched domain hierarchy is in a good position to hold this type of information.  Example (entirely made up): Capacity Power 0.2 0.4 0.4 0.9 0.6 1.5 0.8 2.2 1.0 3.2 Capacity Power 0.4 1.6 0.8 4.4 1.2 9.0 1.6 15.0 2.0 23.0 Little Big Equal compute capacity idle 0.1 leakage 0.1 idle 0.3 leakage 0.5 Little Big active 2.4 6.0 idle 0.0 0.0 cluster