PES: Proactive Event Scheduling for Responsive and Energy-Efficient Mobile Web Computing

PES: Proactive Event Scheduling for Responsive and Energy-Efficient Mobile Web Computing

ISCA 2019 Talk. Presented by Yu Feng

F0c4b39a71fc7c752d4e6c451f6f678b?s=128

HorizonLab

June 19, 2019
Tweet

Transcript

  1. 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
  2. Ubiquity of Mobile devices 2

  3. Ubiquity of Mobile devices 2

  4. Ubiquity of Mobile devices 3

  5. Ubiquity of Mobile devices 3 ▸2x times mobile users than

    desktop users
  6. Ubiquity of Mobile devices 3 ▸2x times mobile users than

    desktop users ▸76% of population are using mobile devices daily
  7. Mobile Applications are Event-Driven 4

  8. Mobile Applications are Event-Driven 4

  9. Mobile Applications are Event-Driven 4 Typing Interactions ISCA 2019

  10. Mobile Applications are Event-Driven 4 Scrolling Typing Interactions ISCA 2019

  11. Mobile Applications are Event-Driven 4 Scrolling Tapping Typing Interactions ISCA

    2019
  12. Mobile Applications are Event-Driven 4 Scrolling Tapping scrollstart scrollupdate scrollend

    tapdown Tapup Keypress Typing Interactions Events ISCA 2019
  13. None
  14. None
  15. Event-Driven Execution Model 6 Event

  16. Event-Driven Execution Model 6 touchmove onclick timer … Time Event

    Queue Push Event
  17. Event-Driven Execution Model 7 touchmove onclick timer … Time Event

    Queue Fetch Runtime Scheduler Core
  18. Event-Driven Execution Model 7 touchmove onclick timer … Time Event

    Queue Fetch Runtime Scheduler Core Scheduling knobs: DVFS settings
  19. Inefficiency of Current Schedulers 8

  20. Inefficiency of Current Schedulers 8 Time

  21. Inefficiency of Current Schedulers 8 Time input 1 input 2

    QoS Deadline 1 QoS Deadline 2
  22. Inefficiency of Current Schedulers 8 Time OS Governor input 1

    input 2 QoS Deadline 1 QoS Deadline 2
  23. Inefficiency of Current Schedulers 8 Time OS Governor input 1

    input 2 QoS Deadline 1 QoS Deadline 2 E1
  24. Inefficiency of Current Schedulers 8 Time OS Governor input 1

    input 2 QoS Deadline 1 QoS Deadline 2 E1 slack
  25. Inefficiency of Current Schedulers 8 Time OS Governor input 1

    input 2 QoS Deadline 1 QoS Deadline 2 E1 E2 slack
  26. Inefficiency of Current Schedulers 9 Time input 1 input 2

    QoS Deadline 1 QoS Deadline 2 E1 E2 OS Governor
  27. Inefficiency of Current Schedulers 9 Time input 1 input 2

    QoS Deadline 1 QoS Deadline 2 E1 E2 QoS-Aware OS Governor
  28. Inefficiency of Current Schedulers 9 Time input 1 input 2

    QoS Deadline 1 QoS Deadline 2 E1 E2 E1 QoS-Aware OS Governor
  29. Inefficiency of Current Schedulers 9 Time input 1 input 2

    QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 QoS-Aware OS Governor
  30. Inefficiency of Current Schedulers 9 Time input 1 input 2

    QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 QoS-Aware OS Governor ?
  31. Inefficiency of Current Schedulers 10 Time input 1 input 2

    QoS Deadline 1 QoS Deadline 2 E1 E2 E1 E2 QoS-Aware OS Governor
  32. 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
  33. 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
  34. Inefficiency of Current Schedulers 11 Time E1 E2 E3 E4

    E5 Schedule across events
  35. Inefficiency of Current Schedulers 12 Time E1 E2 E3 E4

    E5 Current events
  36. Inefficiency of Current Schedulers 12 Time E1 E2 E3 E4

    E5 Current events Future events
  37. Proactive Event Scheduler 13

  38. Proactive Event Scheduler Proactive Event Scheduler 13

  39. Proactive Event Scheduler Proactive Event Scheduler 13 Prediction Web Program

    Analysis Machine Learning
  40. Proactive Event Scheduler Proactive Event Scheduler 13 Prediction Web Program

    Analysis Machine Learning Scheduling Constraint Optimization
  41. Proactive Event Scheduler Proactive Event Scheduler 13 Result reduce energy

    consumption while improving QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization
  42. Proactive Event Scheduler Proactive Event Scheduler 13 Result reduce energy

    consumption while improving QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization
  43. Event Sequence Learning 14 Prediction Model

  44. Event Sequence Learning 14 Time E1 E2 E3 Event Sequence

    Prediction Model
  45. Event Sequence Learning 14 Time E1 E2 E3 ? Event

    Sequence Prediction Model
  46. Event Sequence Learning 14 Time E1 E2 E3 ? Event

    Sequence Prediction Model
  47. Event Sequence Learning 14 Time E1 E2 E3 ? Event

    Sequence E4 Prediction Model
  48. Event Sequence Learning 14 Time E1 E2 E3 ? Event

    Sequence E4 Prediction Model
  49. Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence

    Prediction Model
  50. Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence

    Prediction Model
  51. Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence

    E5 Prediction Model
  52. Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence

    E5 Prediction Model
  53. Recurrent Prediction 15 Time E1 E2 E3 E4 Event Sequence

    E5 … Prediction Model
  54. Prediction Model 16 Prediction Model

  55. Prediction Model 17 Prediction Model

  56. Prediction Model 17 Prediction Model The distance of click The

    number of scrolls The number of navigations Features encoding past interactions …
  57. Prediction Model 18 Features encoding past interactions ln( p 1

    − p ) = x β Prediction Model
  58. Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown

    ZoomIn ZoomOut … Prediction Model 0.10 0.12 0.58 0.07 0.02
  59. Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown

    ZoomIn ZoomOut … Prediction Model ✔
  60. Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown

    ZoomIn ZoomOut … Prediction Model All Event Types
  61. Prediction Model 19 Features encoding past interactions Click ScrollUp ScrollDown

    ZoomIn ZoomOut … Prediction Model Filter Events ?
  62. 20 Program Analysis

  63. 20 Program Analysis

  64. 20 Program Analysis

  65. 20 Program Analysis Viewport

  66. 20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>

    <href> … Program Analysis DOM Tree Viewport
  67. 20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>

    <href> … Viewport Program Analysis DOM Tree Viewport
  68. 20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>

    <href> … Viewport Program Analysis DOM Tree Viewport
  69. 20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>

    <href> … Viewport Program Analysis DOM Tree Viewport
  70. 20 <collapsible> <href> <html> <body> <div> … <div> <div> <href>

    <href> … Viewport Program Analysis DOM Tree Viewport
  71. Include Program Analysis Features 21 Features encoding past interactions Click

    ScrollUp ScrollDown ZoomIn ZoomOut … Prediction Model
  72. Overview of Predictor 22 Past Event Statistics Current Application State

    Click ScrollUp ScrollDown ZoomIn ZoomOut … + Prediction Model
  73. Overview of Predictor 22 Past Event Statistics Current Application State

    Click ScrollUp ScrollDown ZoomIn ZoomOut … + Prediction Model Recurrent
  74. Overview of Predictor 22

  75. Overview of Predictor 22 High Accuracy, low overhead!

  76. Proactive Event Scheduler Proactive Event Scheduler 23 Result reduce energy

    consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization
  77. Proactive Event Scheduler Proactive Event Scheduler 23 Result reduce energy

    consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization
  78. Scheduling events 24 E1 E2 E3 Time From predictor

  79. Scheduling events 24 E1 E2 E3 Time From predictor Goal:

    minimize total energy while meeting deadlines
  80. Problem Formulation 25 E1 E2 E3 Time ▸ Scheduling Problem

    → Constrained Optimization.
  81. Objective: Problem Formulation 25 E1 E2 E3 Time ▸ Scheduling

    Problem → Constrained Optimization. N ∑ i Min. Energy (i)
  82. Objective: Problem Formulation 25 E1 E2 E3 Time △Texe 1

    △Texe 2 △Texe 3 ▸ Scheduling Problem → Constrained Optimization. N ∑ i △Texe (i) x Min.
  83. 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.
  84. 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.
  85. 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.
  86. 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.
  87. 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.
  88. 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) +
  89. 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) +
  90. 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) +
  91. 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) +
  92. 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) +
  93. 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) +
  94. 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) +
  95. 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)
  96. 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) +
  97. 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}
  98. 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) ∑
  99. 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: ∑
  100. 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
  101. 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: ∑
  102. 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: ∑
  103. Putting Things Together 28 Web Application Hardware Architecture

  104. PES Putting Things Together 28 Web Application Hardware Architecture

  105. PES Putting Things Together 28 Web Application Hardware Architecture Predictor

    Events
  106. PES Putting Things Together 28 Web Application Hardware Architecture Predictor

    Events Scheduler Predictions
  107. PES Putting Things Together 28 Web Application Hardware Architecture Predictor

    Events Speculative Schedules Scheduler Predictions
  108. PES Putting Things Together 28 Web Application Hardware Architecture Predictor

    Controller Events Speculative Schedules Uncommitted Results Scheduler Predictions
  109. PES Putting Things Together 28 Web Application Hardware Architecture Predictor

    Controller Events Speculative Schedules Uncommitted Results Scheduler Predictions
  110. PES Putting Things Together 28 Web Application Hardware Architecture Predictor

    Controller Events Speculative Schedules Commit Uncommitted Results Scheduler Predictions
  111. PES Putting Things Together 28 Web Application Hardware Architecture Predictor

    Controller Events Speculative Schedules Commit Uncommitted Results Recover Scheduler Predictions
  112. Proactive Event Scheduler Proactive Event Scheduler 29 Result reduce energy

    consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization
  113. Proactive Event Scheduler Proactive Event Scheduler 29 Result reduce energy

    consumption meanwhile improve QoS Prediction Web Program Analysis Machine Learning Scheduling Constraint Optimization
  114. Experimental Setup 30

  115. Experimental Setup 30 Implemented our framework in Chromium on top

    of Android system
  116. ODORID XU+E development board, which contains an Exynos 5410 SoC

    Experimental Setup 30 Implemented our framework in Chromium on top of Android system
  117. 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]
  118. 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
  119. 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
  120. 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)
  121. Experimental Result 32

  122. 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
  123. 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
  124. 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
  125. 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
  126. 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
  127. 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
  128. 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
  129. 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
  130. 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
  131. Conclusion 33 ‣ To better satisfy the user experience while

    minimizing the energy, coordinating across events is crucial for event-driven applications.
  132. 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.
  133. 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.
  134. PES can be applied to other event-driven applications!

  135. Thanks