Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Locating Energy Hotspots in Source Code

190 visualizaciones

Publicado el

Final Presentation @ ACM Student Research Competition ICSE'17

Publicado en: Software
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Locating Energy Hotspots in Source Code

  1. 1. Locating Energy Hotspots in Source Code Rui Pereira Universidade do Minho & INESC Tec/HASLab ACM SRC @ ICSE’17 ruipereira@di.uminho.pt 26/05/2017 greenlab.di.uminho.pt
  2. 2. Going Green 2 + =
  3. 3. Global energy system is unsustainable 3
  4. 4. Green Computing 4  Caught the attention of many companies allowing them to save: “close to 50% of the energy costs of an organization can be attributed to the IT departments” - [PICMET, 2009] “up to 90% of energy used by ICT hardware can be attributed to software” - [The Greenhouse Gas Protocol Report, 2013]
  5. 5. Green Software  Reducing energy consumption through software analysis and optimization  Problem:  How to analyze  How to interpret  How to improve 5
  6. 6. Green Software  Problems (extended to programmers):  How to analyze  How to interpret  How to improve 6 Mining questions about software energy consumption - [MSR’14] Integrated energy-directed test suite optimization - [ISTA’14] Seeds: A software engineer’s energy-optimization decision support framework - [ICSE’14]
  7. 7. Energy vs. Power 7  Power (w) – rate (or effort) at which that work is done  Energy (J) – amount of work done  Power can change constantly while Energy is the accumulation Energy = Power x Seconds Power Energy 100W360,000 J = x 3,600s
  8. 8. SPELL - Spectrum-based Energy Leak Localization 8
  9. 9. Spectrum-based Fault Localization (SFL) 9
  10. 10. Spectrum-based Fault Localization (SFL) 10 Error vector Oracle Low High Energy Energy Energy Energy Problem: Energy cannot be defined as binary values
  11. 11. SPELL 11
  12. 12. Validation greenlab.di.uminho.pt 12  (RQ1) – Does SPELL indicate reliable information?  (RQ2) – Do developers actually find SPELL information useful?
  13. 13. Empirical Validation greenlab.di.uminho.pt Optimizing energy leaks with developers Industrial Post-doc PhD SPELL 13
  14. 14. SPELL – initial results 14  Developers found the information to be very useful  Spent on average 43% less time  Produced more energy efficient programs (26% less energy on average)  In progress:  SPELL vs. Profilers (Looks promising!)  Find Open-source Software and notify developers of possible hotspots and see what they say
  15. 15. SPELL – Plugin? 15 Code flagging Sunburst representation Suggestions?
  16. 16. SPELL – Accomplished Goals 16
  17. 17. Conclusions 17 Find more info @ our page: http://greenlab.di.uminho.pt/ Language independent  Multi level analysis  Multi hardware component analysis  Points to hot spots in source code
  18. 18. 18 Thank you
  19. 19. Locating Energy Hotspots in Source Code Rui Pereira Universidade do Minho & INESC Tec/HASLab ACM SRC @ ICSE’17 ruipereira@di.uminho.pt 26/05/2017 greenlab.di.uminho.pt
  20. 20. Cheat slides 20
  21. 21. Is faster greener? 21 Understanding energy behaviors of thread management constructs - [OOPSLA’14] Energy-aware software: Challenges, opportunities and strategies - [Journal of Computational Science’13] Haskell in green land: Analyzing the energy behavior of a purely functional language - [SANER’16] An experimental survey of energy management across the stack - [OOPSLA’14] Power and energy implications of the number of threads used - [PPMG’15] Using the greenup, powerup, and speedup metrics to evaluate software energy efficiency - [IGSC’15] slower Is faster greener?
  22. 22. 22 What is greener?
  23. 23. jRAPL/RAPL 23
  24. 24. What is jRAPL?  Framework for profiling Java programs running on RAPL 24 What is RAPL?  Running Average Power Limit  Designed by intel for i5/i7 architectures (SandyBridge, IvyBridge, Haswell, etc)  Monitors energy consumption info for Machine-Specific Registers (MSRs)  Allows very precise and fine-grain measurements through function calls  DRAM/GPU  CPU  Package
  25. 25. How do we use jRAPL? 25 Energy? t0 t∞ a = getEnergy() b = getEnergy() b - a  http://kliu20.github.io/jRAPL/
  26. 26. SPELL 26
  27. 27. 27 Example
  28. 28. 28 Example ϕ - Component Category Similarty 37 + 61 + 0 + 42 1 + 2 + 0 + 1 75 + 102 + 0 + 34 140 4 211 =
  29. 29. 29 Example ϕ - Component Category Similarty Component c1 min(37,140)+min(38,166)+min(36,129)+min(37,164)+min(39,209) max(37,140)+max(38,166)+max(36,129)+max(37,164)+max(39,209) = 0.2314 𝝰1 = 𝝰2 = 𝝰3 = min(1,4)+min(3,7)+min(1,3)+min(3,7)+min(2,11) max(1,4)+max(3,7)+max(1,3)+max(3,7)+max(2,11) = 0.3125 min(75,211)+min(77,259)+min(73,218)+min(74,222)+min(75,295) max(75,211)+max(77,259)+max(73,218)+max(74,222)+max(75,295) = 0.3104
  30. 30. 30 Example 𝜓 - Global Similarity
  31. 31. 31 Example 𝜓 - Global Similarity (37 x 0.34) x 1 x 75 = 943.5 Component c1 Test t1 (61 x 0.34) x 2 x 102 = 4230.96 Component c2Test t1 (0 x 0) x 0 x 0 = 0 Component c3 Test t1 (42 x 0.34) x 1 x 34 = 485.52 Component c3 Test t1 = 5659.98
  32. 32. 32 Example 𝜓 - Global Similarity Component c1 min(943.5,5659.98)+...+min(1989,14310.6) max(943.5,5659.98)+...+max(1989,14310.6) = 0.2466 𝜓1 =
  33. 33. Example

×