prediction guided performance energy trade off for
play

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


  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

  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

  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 Job Job Deadline Job Job Predict and set DVFS level  Goal: Pick DVFS level for each job to minimize energy and meet response-time requirement 3/19

  4. Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Execution Time Variation  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 ldecode Worst-Case: 32.3 ms Average: 28.6 ms Best-Case: 25.5 ms 4/19

  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 ldecode PID lags actual execution time  General – applicable to a wide range of applications  Automated – minimal programmer effort 5/19

  6. Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Prediction Approach Job Input and Program State Generate Program Features Feature Values Predict Job Execution Time Execution Time Predict Frequency Frequency 6/19

  7. Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Feature Selection  To first order, execution time correlates with number of instructions executed  Number of instructions depends on control flow • Conditionals taken/not taken • Loop counts • Function calls 1 10 1 5 7/19

  8. Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Instrumentation  Instrument program source to count these features Instrumented Code Original Code Conditional if (condition) { if (condition) { … feature[0]++; } … } feature[1] += n; for (i=0; i<n; i++) for (i=0; i<n; i++) { { … … Loop } } while (n = n->next) while (n = n->next) { { … feature[2]++; } … } 8/19

  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 Instrument Code Program Slice if (x) if (x) { { feature[0]++; feature[0]++; compute(); } } feature[1] += n; feature[1] += n; for (i=0; i<n; i++) { compute2(); } 9/19

  10. Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Prediction Approach Job Input and Program State Generate Program Features Feature Values Predict Job Execution Time Execution Time Predict Frequency Frequency 10/19

  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 prediction execution features coefficients time Linear Model:  Use profiling data to fit model coefficients • Multiple possible ways to calculate coefficients 11/19

  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 xpilot Execution Time Least-Squares Prediction Conservative Prediction 800 Execution Time [us] 600 400 200 0 1 101 201 301 401 501 601 701 801 901 Frame 12/19

  13. Prediction-Guided Performance-Energy Trade-off for Interactive Applications Title Prediction Model  Use convex optimization with custom objective • Avoid under-prediction – leads to missed deadline • Minimize features needed prediction features execution coefficients time Linear Model: � � Minimize: � overpredict underpredict number of features 13/19

  14. Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Prediction Approach Job Input and Program State Generate Program Features Feature Values Predict Job Execution Time Execution Time Predict Frequency Frequency 14/19

  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 • r 2 > 0.99 for all benchmarks ldecode 15/19

  16. Prediction-Guided Performance-Energy Trade-off for Interactive Applications Title Full Approach Sample Inputs Source Instrumented Feature Values, Instrument Train Profile Off-line Code Features Code Execution Times Model feature selection Prediction Generate Execution Slice Slice Time Model DVFS Predictor Predict Job Feature Execution Generate Predict Run-time Execution Frequency Inputs Features Values Time Frequency Time Run Prediction Set DVFS Execute Job 16/19

  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

  18. Title Prediction-Guided Performance-Energy Trade-off for Interactive Applications Results prediction energy savings vs. performance: 65% vs. interactive: 38% vs. PID: 2% 2% deadline misses for interactive 13% deadline misses for PID 0.1% deadline misses for prediction 18/19

  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

Recommend


More recommend