power and energy code profiling in pharo
TRANSCRIPT
![Page 1: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/1.jpg)
Power and Energy Code Profiling in Pharo
Alexandre Bergel University of Chile http://bergel.eu
![Page 2: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/2.jpg)
![Page 3: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/3.jpg)
![Page 4: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/4.jpg)
Joule (J) is a unit of energy Lifting 100g by one meter = 1 J1 meter
![Page 5: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/5.jpg)
Watt (W) is a unit of power defined as Joule / second
1 W = 1 J / s
![Page 6: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/6.jpg)
![Page 7: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/7.jpg)
PkgPower for the whole processor (5 <= PkgPower <= 40W) IAPower for the cores (2 <= IAPower <= 35 W)
![Page 8: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/8.jpg)
PkgPower for the whole processor (5 <= PkgPower <= 40W) IAPower for the cores (2 <= IAPower <= 35 W)
![Page 9: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/9.jpg)
PkgPower for the whole processor (5 <= PkgPower <= 40W) IAPower for the cores (2 <= IAPower <= 35 W) PkgTemp graphic & cores (between 40 and 60 C)
![Page 10: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/10.jpg)
PkgPower for the whole processor (5 <= PkgPower <= 40W) IAPower for the cores (2 <= IAPower <= 35 W) PkgTemp graphic & cores (between 40 and 60 C) IAFreq CPU frequency (1.7 Ghz <= 3.2Ghz I5 <= 3.6)
![Page 11: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/11.jpg)
Software & Hardware
Pharo 5 image & Cog
OS X El Capitan, version 10.11.4
Studied Intel Core i5 on an iMac (3.2Ghz)
Experiments have been made at 22 C
Network and screen disabled
![Page 12: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/12.jpg)
Virtual Machine Launch & Being Idle
Operating system PkgPower = 6W
IAPower = 2.5W
PkgTemp = 42C
IAFreq = 1.78Ghz
VM Launch
Opening a 47Mb image consumes 3mWh
Pharo open and doing nothing PkgPower = 6W (despite the few % of CPU consumption)
![Page 13: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/13.jpg)
5/13/16, 5:22 PM
Page 1 of 1file:///Users/alexandrebergel/Downloads/Work/PkgPower.SVG
0.620.460.310.150.0
28.0
24.0
20.0
16.0
12.0
8.0
4.0
0.0
PkgPower(Watt)
Elapsed Time (sec)
5/13/16, 5:21 PM
Page 1 of 1file:///Users/alexandrebergel/Downloads/Work/CuPakPower.SVG
0.620.460.310.150.0
3.5
3.0
2.5
2.0
1.5
1.0
0.5
0.0
CuPakPower(mWh)
Elapsed Time (sec)
![Page 14: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/14.jpg)
5 Micro-benchmarks
![Page 15: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/15.jpg)
4 Macro-benchmarks
![Page 16: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/16.jpg)
Benchmark execution
Wait 10 seconds between each run, to make sure that the CPU cools down
![Page 17: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/17.jpg)
96420
30
22
15
7
0
PkgPower (W)
Time (s)
GC4
Micro-Benchmark execution
![Page 18: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/18.jpg)
96420
30
22
15
7
0
PkgPower (W)
Time (s)
GC4
Micro-Benchmark execution
Creation, filling, destruction of 10 kb memory blocks
![Page 19: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/19.jpg)
Macro-Benchmark execution
1410730
30
22
15
7
0
PkgPower (W)
Time (s)
FB
![Page 20: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/20.jpg)
Macro-Benchmark execution
1410730
30
22
15
7
0
PkgPower (W)
Time (s)
FB
Computing a force based layout on a graph made of 5,000 nodes and 5,000 edges
![Page 21: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/21.jpg)
PkgPower x PkgTemp
Plot BenchmarkFB Benchmark
23.619.014.39.75.0
56
52
48
44
40
PkgTemp
PkgPower23.021.520.018.517.0
65
60
55
PkgTemp
PkgPower
(plotting 30K values)(force based layout on 5K nodes & 5K edges)
![Page 22: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/22.jpg)
Implementation
EnergyProfiler new profile: [ …]
EnergyProfiler new profile: [ (Delay forSeconds: 2) wait ]
Can export to CSV, Roassal Low level measurement using Intel Power Gadget & OSSubProcess
![Page 23: Power and Energy Code Profiling in Pharo](https://reader035.vdocuments.us/reader035/viewer/2022081401/5878c4d11a28ab26728b5c3f/html5/thumbnails/23.jpg)
Future work
New, challenging, exciting area
Many possible future works replication across processors
page swapping
processor and VM intern caches