Prediction-Guided Performance-Energy Trade-off for Interactive - - PowerPoint PPT Presentation

prediction guided performance energy trade off for
SMART_READER_LITE
LIVE PREVIEW

Prediction-Guided Performance-Energy Trade-off for Interactive - - PowerPoint PPT Presentation

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Prediction-Guided Performance-Energy Trade-off for Interactive Applications Daniel Lo Taejoon Song, G. Edward Suh Cornell University Title Prediction-Guided


slide-1
SLIDE 1

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Daniel Lo

Taejoon Song, G. Edward Suh Cornell University

slide-2
SLIDE 2

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Interactive Applications

  • Many modern applications are highly interactive
  • Web browsing
  • Games
  • User interfaces
  • These interactions have response-time requirements
  • Finishing faster does not improve user experience

2/19

slide-3
SLIDE 3

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Prediction-based DVFS Control

  • Run jobs slower in order to save energy while

preserving user experience

  • Goal: Pick DVFS level for each job to minimize energy

and meet response-time requirement

Job Deadline Job Job Job Predict and set DVFS level

3/19

slide-4
SLIDE 4

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

  • Challenge: Execution times for an application vary from job to

job

  • Optimizing for the worst-case wastes energy
  • Optimizing for the average-case misses deadlines

Execution Time Variation

Worst-Case: 32.3 ms Average: 28.6 ms Best-Case: 25.5 ms

ldecode

4/19

slide-5
SLIDE 5

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Design Objectives

  • Proactive control – History-based DVFS control is too

slow to account for variations

  • Predict DVFS level based on job inputs and program state
  • General – applicable to a wide range of applications
  • Automated – minimal programmer effort

ldecode

PID lags actual execution time

5/19

slide-6
SLIDE 6

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Prediction Approach

Frequency Predict Frequency Predict Job Execution Time Execution Time Generate Program Features Feature Values Job Input and Program State

6/19

slide-7
SLIDE 7

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Feature Selection

  • To first order, execution time correlates with number
  • f instructions executed
  • Number of instructions depends on control flow
  • Conditionals taken/not taken
  • Loop counts
  • Function calls

10 1 1 5

7/19

slide-8
SLIDE 8

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Instrumentation

  • Instrument program source to count these features

if (condition) { … } if (condition) { feature[0]++; … } Original Code Instrumented Code for (i=0; i<n; i++) { … } while (n = n->next) { … } feature[1] += n; for (i=0; i<n; i++) { … } while (n = n->next) { feature[2]++; … } Conditional Loop

8/19

slide-9
SLIDE 9

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Prediction Slice

  • Problem: Instrumented job will take as long as original

job to run

  • Solution: Use program slicing to create minimal job to

calculate features

if (x) { feature[0]++; compute(); } feature[1] += n; for (i=0; i<n; i++) { compute2(); } if (x) { feature[0]++; } feature[1] += n;

Instrument Code Program Slice

9/19

slide-10
SLIDE 10

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Prediction Approach

Frequency Predict Frequency Predict Job Execution Time Execution Time Generate Program Features Feature Values Job Input and Program State

10/19

slide-11
SLIDE 11

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Execution Time Model

  • Linear model to map features to execution time
  • Captures first-order effect of control flow on execution time
  • Fast to evaluate
  • Use profiling data to fit model coefficients
  • Multiple possible ways to calculate coefficients

Linear Model:

prediction coefficients features execution time

11/19

slide-12
SLIDE 12

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Conservative Prediction

  • Least-squares prediction leads to both under-

prediction and over-prediction

  • Under-prediction results in deadline misses
  • Want to skew prediction towards over-prediction

200 400 600 800 1 101 201 301 401 501 601 701 801 901 Execution Time [us] Frame Execution Time Least-Squares Prediction Conservative Prediction

xpilot

12/19

slide-13
SLIDE 13

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Prediction Model

  • Use convex optimization with custom objective
  • Avoid under-prediction – leads to missed deadline
  • Minimize features needed

Linear Model: Minimize:

  • prediction

coefficients features execution time

  • verpredict

underpredict number of features

13/19

slide-14
SLIDE 14

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Prediction Approach

Frequency Predict Frequency Predict Job Execution Time Execution Time Generate Program Features Feature Values Job Input and Program State

14/19

slide-15
SLIDE 15

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

DVFS Model

  • Need a model of how execution time scales with

frequency

  • Simple linear model
  • Empirical data shows that this is reasonable
  • r2 > 0.99 for all benchmarks
  • ldecode

15/19

slide-16
SLIDE 16

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Full Approach

Off-line Source Code Instrument Features Instrumented Code Run-time Generate Slice feature selection Prediction Slice Profile Sample Inputs Feature Values, Execution Times Train Model Execution Time Model Run Prediction Set DVFS Execute Job Job Inputs Generate Features Feature Values Predict Execution Time Predict Frequency Execution Time Frequency DVFS Predictor

16/19

slide-17
SLIDE 17

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Evaluation Setup

  • ODROID-XU3 development board
  • ARM Cortex-A7 core (100 MHz steps from 200 MHz to 1.4 GHz)
  • Ubuntu 14.04
  • Baseline controllers
  • performance – always max frequency
  • interactive – Linux governor based on utilization
  • pid – PID-based controller
  • Benchmarks
  • web browser (uzbl)
  • speech recognition (pocketsphinx)
  • video decoding (ldecode)
  • games (2048, curseofwar, xpilot)
  • MiBench kernels (rijndael, sha)

17/19

slide-18
SLIDE 18

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Results

2% deadline misses for interactive 13% deadline misses for PID 0.1% deadline misses for prediction prediction energy savings

  • vs. performance: 65%
  • vs. interactive: 38%
  • vs. PID: 2%

18/19

slide-19
SLIDE 19

Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications

Conclusion

  • Opportunities exist to improve the energy usage of

interactive applications

  • History-based DVFS controllers are not quick enough

to respond to job-to-job variations in execution time

  • Prediction-based DVFS control outperforms traditional

power governors and PID-based controllers

  • Lower energy usage
  • Almost no deadline misses

19/19