Characterizing the Energy Efficiency of Java’s Thread-Safe Collections in a Multi-Core Environment

Characterizing the Energy Efficiency of Java’s Thread-Safe Collections in a Multi-Core Environment

D0270498e20bd573441f1f48f2e425cf?s=128

Gustavo Pinto

January 15, 2018
Tweet

Transcript

  1. 1.

    Characterizing the Energy Efficiency of Java’s Thread-Safe Collections in a

    Multi-Core Environment Gustavo Pinto ghlp@cin.ufpe.br Fernando Castor castor@cin.ufpe.br
  2. 2.

    Motivation (1/3) • First, energy consumption is a concern for

    unwired devices and also for data centers • Second, there is a large body of work in hardware/architecture, OS, runtime systems • However, little is known about the application level 2
  3. 3.

    Motivation (2/3) 3 • First, multicore CPUs are ubiquitous •

    Second, more cores used more power consumed • However, little is known about the energy-efficiency of multicore programs
  4. 20.

    20 • ArrayList • LinkedList • …. • Vector •

    Collections.synchronizedList() • CopyOnWriteArrayList • …. List<Object> lists = …;
  5. 23.

    Research Questions 23 • RQ1: Do different implementations of the

    same collection have different impacts on energy consumption? • RQ2: Do different operations in the same implementation of a collection consume energy differently?
  6. 24.

    24 List Set Map ArrayList LinkedHashSet LinkedHashMap Vector ——— Hashtable

    Collections.syncList() Collections.syncSet() Collections.syncMap() CopyOnWriteArrayList CopyOnWriteArraySet ——— ——— ConcurrentSkipListSet ConcurrentSkipListMap ——— ConcurrentHashSet ConcurrentHashMap ——— ConcurrentHashSetV8 ConcurrentHashMapV8 16 Benchmarks
  7. 25.

    25 List Set Map ArrayList LinkedHashSet LinkedHashMap Vector ——— Hashtable

    Collections.syncList() Collections.syncSet() Collections.syncMap() CopyOnWriteArrayList CopyOnWriteArraySet ——— ——— ConcurrentSkipListSet ConcurrentSkipListMap ——— ConcurrentHashSet ConcurrentHashMap ——— ConcurrentHashSetV8 ConcurrentHashMapV8 16 Benchmarks Not-thread safe Thread safe
  8. 26.

    26 List Set Map ArrayList LinkedHashSet LinkedHashMap Vector ——— Hashtable

    Collections.syncList() Collections.syncSet() Collections.syncMap() CopyOnWriteArrayList CopyOnWriteArraySet ——— ——— ConcurrentSkipListSet ConcurrentSkipListMap ——— ConcurrentHashSet ConcurrentHashMap ——— ConcurrentHashSetV8 ConcurrentHashMapV8 16 Benchmarks x 3 Operations Traversal Insertion Removal
  9. 27.

    27 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,

    64GB of memory, JDK version 1.7.0 11, build 21.
  10. 28.

    28 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,

    64GB of memory, JDK version 1.7.0 11, build 21.
  11. 29.

    29 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,

    64GB of memory, JDK version 1.7.0 11, build 21.
  12. 30.

    30 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.
  13. 46.

    46

  14. 47.

    Future Work 47 • Perform the “removal” operations on Lists

    • Vary the number of threads accessing the data structure • Perform the experiments in another machine
  15. 48.

    Characterizing the Energy Efficiency of Java’s Thread-Safe Collections in a

    Multi-Core Environment Gustavo Pinto ghlp@cin.ufpe.br Fernando Castor castor@cin.ufpe.br