Share
Embed
pes: proactive event scheduling for energy-efficient mobile web computing
a novel scheduling for event-driven mobile application
Yu Feng
June 24, 2019
Transcript
135 slides
-
PES: Proactive Event Scheduling for Responsive and Energy-Efficient Mobile Web
Computing Yu Feng with Yuhao Zhu Department of Computer Science University of Rochester ISCA 2019 -
Ubiquity of Mobile devices 3 ▸2x times mobile users than
desktop users -
Ubiquity of Mobile devices 3 ▸2x times mobile users than
desktop users ▸76% of population are using mobile devices daily -
Mobile Applications are Event-Driven 4 Scrolling Tapping scrollstart scrollupdate scrollend
tapdown Tapup Keypress Typing Interactions Events ISCA 2019 -
Event-Driven Execution Model 6 touchmove onclick timer … Time Event
Queue Push Event -
Event-Driven Execution Model 7 touchmove onclick timer … Time Event
Queue Fetch Runtime Scheduler Core -
Event-Driven Execution Model 7 touchmove onclick timer … Time Event
Queue Fetch Runtime Scheduler Core Scheduling knobs: DVFS settings -
Inefficiency of Current Schedulers 8 Time input 1 input 2
QoS Deadline 1 QoS Deadline 2 -
Inefficiency of Current Schedulers 8 Time OS Governor input 1
input 2 QoS Deadline 1 QoS Deadline 2 -
Inefficiency of Current Schedulers 8 Time OS Governor input 1
input 2 QoS Deadline 1 QoS Deadline 2 E1 -
Inefficiency of Current Schedulers 8 Time OS Governor input 1
input 2 QoS Deadline 1 QoS Deadline 2 E1 slack -
Inefficiency of Current Schedulers 8 Time OS Governor input 1
input 2 QoS Deadline 1 QoS Deadline 2 E1 E2 slack -
Inefficiency of Current Schedulers 9 Time input 1 input 2
QoS Deadline 1 QoS Deadline 2 E1 E2 OS Governor -
Inefficiency of Current Schedulers 9 Time input 1 input 2
QoS Deadline 1 QoS Deadline 2 E1 E2 QoS-Aware OS Governor -
Inefficiency of Current Schedulers 9 Time input 1 input 2
QoS Deadline 1 QoS Deadline 2 E1 E2 E1 QoS-Aware OS Governor -
Inefficiency of Current Schedulers 9 Time input 1 input 2
QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 QoS-Aware OS Governor -
Inefficiency of Current Schedulers 9 Time input 1 input 2
QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 QoS-Aware OS Governor ? -
Inefficiency of Current Schedulers 10 Time input 1 input 2
QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 QoS-Aware OS Governor -
Inefficiency of Current Schedulers 10 Time Oracle input 1 input
2 QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 QoS-Aware OS Governor -
Inefficiency of Current Schedulers 10 Time Oracle input 1 input
2 QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 E1 E2 QoS-Aware OS Governor -
Inefficiency of Current Schedulers 11 Time E1 E2 E3 E4
E5 Schedule across events -
Inefficiency of Current Schedulers 12 Time E1 E2 E3 E4
E5 Current events -
Inefficiency of Current Schedulers 12 Time E1 E2 E3 E4
E5 Current events Future events -
Proactive Event Scheduler Proactive Event Scheduler 13 Prediction Web Program
Analysis Machine Learning -
Proactive Event Scheduler Proactive Event Scheduler 13 Prediction Web Program
Analysis Machine Learning Scheduling Constraint Optimization -
Proactive Event Scheduler Proactive Event Scheduler 13 Result reduce energy
consumption while improving QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization -
Proactive Event Scheduler Proactive Event Scheduler 13 Result reduce energy
consumption while improving QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization -
Event Sequence Learning 14 Time E1 E2 E3 Event Sequence
Prediction Model -
Event Sequence Learning 14 Time E1 E2 E3 ? Event
Sequence Prediction Model -
Event Sequence Learning 14 Time E1 E2 E3 ? Event
Sequence Prediction Model -
Event Sequence Learning 14 Time E1 E2 E3 ? Event
Sequence E4 Prediction Model -
Event Sequence Learning 14 Time E1 E2 E3 ? Event
Sequence E4 Prediction Model -
Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence
Prediction Model -
Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence
Prediction Model -
Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence
E5 Prediction Model -
Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence
E5 Prediction Model -
Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence
E5 … Prediction Model -
Prediction Model 17 Prediction Model The distance of click The
number of scrolls The number of navigations Features encoding past interactions … -
Prediction Model 18 Features encoding past interactions ln( p 1
− p ) = x β Prediction Model -
Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown
ZoomIn ZoomOut … Prediction Model 0.10 0.12 0.58 0.07 0.02 -
Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown
ZoomIn ZoomOut … Prediction Model ✔ -
Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown
ZoomIn ZoomOut … Prediction Model All Event Types -
Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown
ZoomIn ZoomOut … Prediction Model Filter Events ? -
20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>
<href> … Program Analysis DOM Tree Viewport -
20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>
<href> … Viewport Program Analysis DOM Tree Viewport -
20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>
<href> … Viewport Program Analysis DOM Tree Viewport -
20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>
<href> … Viewport Program Analysis DOM Tree Viewport -
20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>
<href> … Viewport Program Analysis DOM Tree Viewport -
Include Program Analysis Features 21 Features encoding past interactions Click
ScrollUp ScrollDown ZoomIn ZoomOut … Prediction Model -
Overview of Predictor 22 Past Event Statistics Current Application State
Click ScrollUp ScrollDown ZoomIn ZoomOut … + Prediction Model -
Overview of Predictor 22 Past Event Statistics Current Application State
Click ScrollUp ScrollDown ZoomIn ZoomOut … + Prediction Model Recurrent -
Proactive Event Scheduler Proactive Event Scheduler 23 Result reduce energy
consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization -
Proactive Event Scheduler Proactive Event Scheduler 23 Result reduce energy
consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization -
Scheduling events 24 E1 E2 E3 Time From predictor Goal:
minimize total energy while meeting deadlines -
Problem Formulation 25 E1 E2 E3 Time ▸ Scheduling Problem
→ Constrained Optimization. -
Objective: Problem Formulation 25 E1 E2 E3 Time ▸ Scheduling
Problem → Constrained Optimization. N ∑ i Min. Energy (i) -
Objective: Problem Formulation 25 E1 E2 E3 Time △Texe 1
△Texe 2 △Texe 3 ▸ Scheduling Problem → Constrained Optimization. N ∑ i △Texe (i) x Min. -
Objective: Problem Formulation 25 E1 E2 E3 Time △Texe 1
△Texe 2 △Texe 3 ▸ Scheduling Problem → Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. -
Objective: Constraints: Problem Formulation 25 E1 E2 E3 Time △Texe
1 △Texe 2 △Texe 3 ▸ Scheduling Problem → Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. -
Objective: Constraints: Problem Formulation 25 E1 E2 E3 Time △Texe
1 △Texe 2 △Texe 3 ▸ Scheduling Problem → Constrained Optimization. Order: ≤ Tend (i) Tstart (i+1) N ∑ i △Texe (i) x Power (i) Min. -
Objective: Constraints: Problem Formulation 25 E1 E2 E3 Time Tstart
1 Tstart 2 Tstart 3 TQoS 1 TQoS 2 TQoS 3 △Texe 1 △Texe 2 △Texe 3 ▸ Scheduling Problem → Constrained Optimization. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + N ∑ i △Texe (i) x Power (i) Min. -
Objective: Constraints: Problem Formulation 25 E1 E2 E3 Time Tstart
1 Tstart 2 Tstart 3 TQoS 1 TQoS 2 TQoS 3 △Texe 1 △Texe 2 △Texe 3 ▸ Scheduling Problem → Constrained Optimization. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + Scheduling knobs: DVFS settings for each event N ∑ i △Texe (i) x Power (i) Min. -
Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem → Constrained
Optimization. N ∑ i △Texe (i) x Power (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. △Texe (i) = Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. △Texe (i) = Tmemory + Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. Tcpu △Texe (i) = Tmemory + Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. △Texe (i) = Tmemory + Ncycles / f (i) Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. △Texe (i) = Tmemory + Constants Ncycles / f (i) Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Power (i) Min. △Texe (i) = Tmemory + Constants Offline profile Ncycles / f (i) Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 26 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Min. △Texe (i) = Tmemory + Constants Offline profile Ncycles / f (i) Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + Pmap (i) -
Each Event: Objective: Constraints: Problem Formulation 27 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Pmap (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + -
Each Event: Objective: Constraints: Problem Formulation 27 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Pmap (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + { Ncycles / f (j) } △Texe (i) =Tmemory +∑ * ⍺ (i, j) ⍺ (i, j) in {0,1} -
Each Event: Objective: Constraints: Problem Formulation 27 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Pmap (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + { Ncycles / f (j) } △Texe (i) =Tmemory +∑ * ⍺ (i, j) Pmap (i) = Freq2Power (j) * ⍺ (i, j) ∑ -
Each Event: Objective: Constraints: Problem Formulation 27 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Pmap (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + { Ncycles / f (j) } △Texe (i) =Tmemory +∑ * ⍺ (i, j) Pmap (i) = Freq2Power (j) * ⍺ (i, j) ∑ 1 = ⍺ (i, j) With the constraints: ∑ -
Each Event: Objective: Constraints: Problem Formulation 27 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Pmap (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + { Ncycles / f (j) } △Texe (i) =Tmemory +∑ * ⍺ (i, j) Pmap (i) = Freq2Power (j) * ⍺ (i, j) ∑ 1 = ⍺ (i, j) With the constraints: ∑ Only one setting is chosen -
Each Event: Objective: Constraints: Problem Formulation 27 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Pmap (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + { Ncycles / f (j) } △Texe (i) =Tmemory +∑ * ⍺ (i, j) Pmap (i) = Freq2Power (j) * ⍺ (i, j) ∑ 1 = ⍺ (i, j) With the constraints: ∑ -
Each Event: Objective: Constraints: Problem Formulation 27 ▸ Scheduling Problem
→ Constrained Optimization. N ∑ i △Texe (i) x Pmap (i) Min. Order: ≤ Tend (i) Tstart (i+1) Deadline: ≤ Tstart (i) △Texe (i) TQoS (i) + { Ncycles / f (j) } △Texe (i) =Tmemory +∑ * ⍺ (i, j) Integer Linear Programing! Pmap (i) = Freq2Power (j) * ⍺ (i, j) ∑ 1 = ⍺ (i, j) With the constraints: ∑ -
PES Putting Things Together 28 Web Application Hardware Architecture Predictor
Events Scheduler Predictions -
PES Putting Things Together 28 Web Application Hardware Architecture Predictor
Events Speculative Schedules Scheduler Predictions -
PES Putting Things Together 28 Web Application Hardware Architecture Predictor
Controller Events Speculative Schedules Uncommitted Results Scheduler Predictions -
PES Putting Things Together 28 Web Application Hardware Architecture Predictor
Controller Events Speculative Schedules Uncommitted Results Scheduler Predictions -
PES Putting Things Together 28 Web Application Hardware Architecture Predictor
Controller Events Speculative Schedules Commit Uncommitted Results Scheduler Predictions -
PES Putting Things Together 28 Web Application Hardware Architecture Predictor
Controller Events Speculative Schedules Commit Uncommitted Results Recover Scheduler Predictions -
Proactive Event Scheduler Proactive Event Scheduler 29 Result reduce energy
consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization -
Proactive Event Scheduler Proactive Event Scheduler 29 Result reduce energy
consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization -
Experimental Setup 30 Implemented our framework in Chromium on top
of Android system -
ODORID XU+E development board, which contains an Exynos 5410 SoC
Experimental Setup 30 Implemented our framework in Chromium on top of Android system -
ODORID XU+E development board, which contains an Exynos 5410 SoC
Experimental Setup 30 Implemented our framework in Chromium on top of Android system UI-level record and replay for reproducibility. [ISPASS’15] -
Evaluation ▸Baseline Mechanisms ▹Interactive governor (Interactive) — Android default ▹EBS:
a state-of-the-art QoS-aware scheduler ▹Oracle: optimal scheduler 31 31 Time Oracle input 1 input 2 QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 E1 E2 QoS-Aware OS Governor -
Evaluation ▸Baseline Mechanisms ▹Interactive governor (Interactive) — Android default ▹EBS:
a state-of-the-art QoS-aware scheduler ▹Oracle: optimal scheduler 31 ▸Metrics ▹Energy Consumption ▹QoS Violation 31 -
Evaluation ▸Baseline Mechanisms ▹Interactive governor (Interactive) — Android default ▹EBS:
a state-of-the-art QoS-aware scheduler ▹Oracle: optimal scheduler 31 ▸Metrics ▹Energy Consumption ▹QoS Violation 31 ▸Applications ▹Top web applications (e.g., www.amazon.com) -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle QoS Violation 0 0.15 0.3 0.45 0.6 163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle QoS Violation 0 0.15 0.3 0.45 0.6 163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle QoS Violation 0 0.15 0.3 0.45 0.6 163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle -
Experimental Result 32 Norn. Energy 0 0.25 0.5 0.75 1
163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle QoS Violation 0 0.15 0.3 0.45 0.6 163 msn slashdot youtube google amazon ebay sina espn bbc cnn twitter Interactive EBS PES Oracle 61% less QoS Violation and 26% of Energy Reduction -
Conclusion 33 ‣ To better satisfy the user experience while
minimizing the energy, coordinating across events is crucial for event-driven applications. -
Conclusion 33 ‣ To better satisfy the user experience while
minimizing the energy, coordinating across events is crucial for event-driven applications. ‣ PES combines statistic inference with application analysis on event prediction. -
Conclusion 33 ‣ To better satisfy the user experience while
minimizing the energy, coordinating across events is crucial for event-driven applications. ‣ PES achieves significant energy savings while reducing QoS violations. ‣ PES combines statistic inference with application analysis on event prediction.