Pro Yearly is on sale from $80 to $50! »

Understanding Energy Behaviors of Thread Management Constructs

Be6953eb1929f548597c7ebf2be91a22?s=47 Gustavo Pinto
January 14, 2018
38

Understanding Energy Behaviors of Thread Management Constructs

Be6953eb1929f548597c7ebf2be91a22?s=128

Gustavo Pinto

January 14, 2018
Tweet

Transcript

  1. Understanding Energy Behaviors of Thread Management Constructs Gustavo Pinto1 Fernando

    Castor1 David Liu2 {ghlp, castor}@cin.ufpe.br1 davidL@binghamton.edu2
  2. 2 • First, the proliferation of multicore CPUs • Second,

    the prevalence of multi-threaded programs Motivation
  3. 3 • First, more cores more power consumed • Second,

    little is known about energy behaviors of multi-threaded program on the application and programming language level The Problem
  4. 4 1. programming abstractions of thread management on energy efficiency

    2. programmer choices of thread management on energy efficiency This Talk for Java multi-threaded programs
  5. 5 • Explicit threading (the Thread-style): Using the java.lang.Thread class

    • Thread pooling (the Executor-style): Using the java.util.concurrent.Executor framework • Working Stealing (the ForkJoin-style): Using the java.util.concurrent.ForkJoin framework Thread management constructs
  6. 6 • Embarrassingly parallel: spectralnorm, sunflow, n-queens • Leaning parallel:

    xalan, knucleotide, tomcat • Leaning serial: mandelbrot, largestImage • Embarrassingly serial: h2 Benchmarks
  7. 7 • Embarrassingly parallel: spectralnorm, sunflow, n-queens • Leaning parallel:

    xalan, knucleotide, tomcat • Leaning serial: mandelbrot, largestImage • Embarrassingly serial: h2 Benchmarks Micro-benchmarks DaCapo benchmarks
  8. 8 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,

    64GB of memory, JDK version 1.7.0 11, build 21, “ondemand” governor
  9. 9 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,

    64GB of memory, JDK version 1.7.0 11, build 21, “ondemand” governor
  10. 10 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,

    64GB of memory, JDK version 1.7.0 11, build 21.
  11. 11 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,

    64GB of DDR3 1600 memory, and JDK version 1.7.0 11, build 21.
  12. Energy Consumption When Varying the Number of Threads 12

  13. 13 The Λ Curve

  14. 14 The Λ Curve

  15. 15 The Λ Curve

  16. 16 More cores idle CPU frequency at a lower level

    The Λ Curve
  17. 17 More cores idle CPU frequency at a lower level

    More threads used, program completes sooner The greater the ratio between speedup and power, the steeper the \ The Λ Curve
  18. Which programming style should I use? 18 ? ?

  19. Overpopulating Cores with Threads 19

  20. Overpopulating Cores with Threads 20

  21. Faster ≠ Greener 21

  22. Copying vs Sharing 22

  23. Copying vs Sharing 23 Copying

  24. Copying vs Sharing 24 Copying Sharing

  25. Copying vs Sharing 25 Copying Sharing ±15% of energy savings!

  26. 26 Copy-Fork

  27. 27 After Before Copy-Fork

  28. 28 After Before Copy-Fork Copy/Fork/Copy/Fork/…

  29. 29 After Before Copy-Fork Copy/Fork/Copy/Fork/…

  30. 30 After Before Copy-Fork Copy/Fork/Copy/Fork/… Copy/../Copy/Fork/…/Fork

  31. 31 After Before Copy-Fork ±10% of energy savings! Copy/Fork/Copy/Fork/… Copy/../Copy/Fork/…/Fork

  32. Data Size 32

  33. Data Size 33 For most of the cases, energy consumption

    is linear to data size!
  34. 34

  35. 35

  36. 36

  37. 37

  38. Understanding Energy Behaviors of Thread Management Constructs Gustavo Pinto1 Fernando

    Castor1 David Liu2 {ghlp, castor}@cin.ufpe.br1 davidL@binghamton.edu2