Techniques for Real-System Characterization of Java Virtual Machine Energy and Power Behavior Gilberto Contreras Margaret Martonosi
Total Page:16
File Type:pdf, Size:1020Kb
Techniques for Real-System Characterization of Java Virtual Machine Energy and Power Behavior Gilberto Contreras Margaret Martonosi Department of Electrical Engineering Princeton University 1 Why Study Power in Java Systems? The Java platform has been adopted in a wide variety of devices Java servers demand performance, embedded devices require low-power Performance is important, power/energy/thermal issues are equally important How do we study and characterize these requirements in a multi-layer platform? 2 Power/Performance Design Issues Java Application Java Virtual Machine Operating System Hardware 3 Power/Performance Design Issues Java Application Garbage Class Runtime Execution Collection LoaderJava VirtualCompiler MachineEngine Operating System Hardware How do the various software layers affect power/performance characteristics of hardware? Where should time be invested when designing power and/or thermally aware Java virtual Machines? 4 Outline Approaches for Energy/Performance Characterization of Java virtual machines Methodology Breaking the JVM into sub-components Hardware-based power/performance characterization of JVM sub-components Results Jikes & Kaffe on Pentium M Kaffe on Intel XScale Conclusions 5 Power & Performance Analysis of Java Simulation Approach √ Flexible: easy to model non-existent hardware x Simulators may lack comprehensiveness and accuracy x Thermal studies require tens of seconds granularity Accurate simulators are too slow Hardware Approach √ Able to capture full-system characteristics and effects √ Data gathering is comparable to hardware speeds x Only applicable to existent hardware 6 Hardware-based Characterization Hardware Virtual Machine 0010 CH0 Track CH1 code Class Loader CH2 region ID: 0001 CH3 DAQ CPU Garbage Collector ID: 0010 CH- Power measurements Memory CH+ scheduler Compiler ID: 0100 Execution Engine ID: 1000 7 Two Virtual Machines Jikes RVM Kaffe JVM High performance Flexibility and Design goal portability Architecture High-end processors High-end to embedded support Garbage Multiple collectors Mark-and-sweep collection Runtime compiler with Just-in-time compiler different optimization Runtime optimizations levels 8 Two Platforms Pentium M (P6) Intel XScale High-performance mobile High-end handheld Platform Type computers devices Configuration 1.6Ghz, 512MB RAM 400Mhz, 32MB RAM Theoretical Max Power 31W 1.4W Jikes RVM JVM Kaffe Kaffe Used 9 Outline Approaches for Energy/Performance Characterization of Java virtual machines Methodology Breaking the JVM into sub-components Power/performance hardware-based characterization of JVM sub-components Results Jikes & Kaffe on Pentium M Kaffe on Intel XScale Conclusions 10 Jikes Energy Distribution on P6 100% 80% 60% Energy40% Usage 20% app 0% gc 32 cl base 128 32 opt_comp compress 128 32 SemiSpace Garbage Collector jess Heap 1size28 (MB) 32 db 128 32 javac 128 48 jack 128 fop 11 Jikes Energy Distribution on P6 100% 80% 60% Energy40% Usage 20% app 0% gc 32 cl base 128 32 opt_comp compress 128 32 SemiSpace Garbage Collector jess •JVM Heap 1size28 (MB) •GC 32 : Up to 60% of the total energy : Average 37% ofdb the total energy of SpecJVM98 128 32 javac 128 48 jack 128 fop 12 Jikes Energy-Delay Product on P6 3500 3000 2500 2000 EDP (J*sec) 1500 1000 SemiSpace 500 0 32 MarkSweep 64 96 compress 128 GenMS Jikes: heap size has a significant32 EDP decrease across heap sizes due to6 4a time GenCopy 96 jess 128 32 Heap size (MB) 64 96 db 128 32 impact on energy efficiency 64 96 javac 128 decrease in application execution 32 64 96 jack 128 13 Jikes Power Consumption on P6 18 16 14 12 10 Watts 8 6 4 2 app 0 32 gc 64 96 cl Average powercompress for JVM vari128 Garbage collector is high ener 32 64 96 128 jess GenCopy Garbage Collector 32 64 Heap size96 (MB) db 128 32 es little across heap-sizes 64 96 gy consumer, but low power javac 128 32 64 96 jack 128 48 80 112 fop 14 Jikes Peak Power on P6 20 18 16 14 12 Watts 10 8 6 4 app 2 0 gc 32 64 cl 96 Execution engine has the highest peak-power compress 128 32 64 96 128 jess 32 64 Heap size96 (MB) 128 db 32 64 96 128 javac 32 64 96 128 jack 48 80 112 fop 15 Jikes versus Kaffe: Energy Distribution on P6 100% 80% 60% 40% app Jikes 20% gc cl 0% base_comp 32 64 96 128 opt_comp s 32 pres com 64 96 128 32 s jes 64 96 Kaffe: high application energy128 caused by long execution times Kaffe: 8% of total averagedb ener32 64 100% 96 128 80% 32 avac j 64 60% 96 128 40% jack 48 Kaffe 80 20% 112 app fop 0% gc 32 64 cl 96 jit 128 ss 32 mpre co 64 96 gy goes to virtual machine 128 32 jess 64 96 128 db 32 64 96 128 javac 32 64 96 128 jack 48 80 112 fop 16 Kaffe Across Platforms 100% 80% 60% 40% Pentium M 20% 0% app 32 gc 64 cl 96 jit 128 32 press 64 com 96 128 32 jess 64 96 128 32 64 b 100% XScale: no classesd are included96 in the binary 128 80% XScale: GC only represents 6% 32 64 60% 96 vac Intel XScale ja 128 40% 48 80 20% 112 jack 0% app 12 gc 16 20 cl 24 28 jit 32 press com 12 16 20 24 28 jess 32 12 16 20 of the total energy consumed 24 28 db 32 12 16 20 24 28 javac 32 12 16 20 24 28 jack 32 17 Conclusions Methodology The complexity of the Java virtual machine calls for a more in-depth power/energy analysis Hardware-based characterization of the virtual machine’s sub-components allow long execution times and trustworthy measurements Lessons learned In both platforms, JVM energy overhead is considerable Jikes: the GC is low power but high energy consumer (up to 37% on average) For Kaffe on XScale, the class loaded becomes high-energy consumer (18% for measured benchmarks) 18 Thank you! 19.