Java On Steroids: Sun s High-Performance Java Implementation. History

Similar documents
JOVE. An Optimizing Compiler for Java. Allen Wirfs-Brock Instantiations Inc.

Reducing the Overhead of Dynamic Compilation

Managed runtimes & garbage collection. CSE 6341 Some slides by Kathryn McKinley

Managed runtimes & garbage collection

JamaicaVM Java for Embedded Realtime Systems

Building Robust Embedded Software

Heap Compression for Memory-Constrained Java

Evolution of Virtual Machine Technologies for Portability and Application Capture. Bob Vandette Java Hotspot VM Engineering Sept 2004

Reducing the Overhead of Dynamic Compilation

New Java performance developments: compilation and garbage collection

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1

Java Internals. Frank Yellin Tim Lindholm JavaSoft

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Method-Level Phase Behavior in Java Workloads

Interaction of JVM with x86, Sparc and MIPS

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1

Delft-Java Link Translation Buffer

Pause-Less GC for Improving Java Responsiveness. Charlie Gracie IBM Senior Software charliegracie

A JVM Does What? Eva Andreasson Product Manager, Azul Systems

Mixed Mode Execution with Context Threading

A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler

CSc 453 Interpreters & Interpretation

JAVA PERFORMANCE. PR SW2 S18 Dr. Prähofer DI Leopoldseder

Java Jitters - The Effects of Java on Jitter in a Continuous Media Server

Runtime Application Self-Protection (RASP) Performance Metrics

Running class Timing on Java HotSpot VM, 1

Swift: A Register-based JIT Compiler for Embedded JVMs

Fiji VM Safety Critical Java

PARAMETERS Options may be in any order. For a discussion of parameters which apply to a specific option, see OPTIONS below.

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

JavaOS. David Burhans 2/3/2003 CS384 Dr. Taylor

<Insert Picture Here>

Designing experiments Performing experiments in Java Intel s Manycore Testing Lab

High-Level Language VMs

History Introduction to Java Characteristics of Java Data types

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

Untyped Memory in the Java Virtual Machine

Future of JRockit & Tools

Introduction to Java Programming

Performance of Non-Moving Garbage Collectors. Hans-J. Boehm HP Labs

Lecture 1: Overview of Java

A Quantitative Evaluation of the Contribution of Native Code to Java Workloads

Java Performance Analysis for Scientific Computing

Notes of the course - Advanced Programming. Barbara Russo

Compiler construction 2009

JOP: A Java Optimized Processor for Embedded Real-Time Systems. Martin Schoeberl

Real Time: Understanding the Trade-offs Between Determinism and Throughput

Garbage Collection. Hwansoo Han

Java Performance: The Definitive Guide

Java Without the Jitter

Jaguar: Enabling Efficient Communication and I/O in Java

Algorithms for Dynamic Memory Management (236780) Lecture 4. Lecturer: Erez Petrank

Project. there are a couple of 3 person teams. a new drop with new type checking is coming. regroup or see me or forever hold your peace

The Z Garbage Collector Low Latency GC for OpenJDK

The VMKit project: Java (and.net) on top of LLVM

The Z Garbage Collector An Introduction

H.-S. Oh, B.-J. Kim, H.-K. Choi, S.-M. Moon. School of Electrical Engineering and Computer Science Seoul National University, Korea

Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java)

Optimising Multicore JVMs. Khaled Alnowaiser

EDAN65: Compilers, Lecture 13 Run;me systems for object- oriented languages. Görel Hedin Revised:

Dynamic Selection of Application-Specific Garbage Collectors

Trace-based JIT Compilation

JVM Continuations. Lukas Stadler. Johannes Kepler University Linz, Austria

Run-time Program Management. Hwansoo Han

Just-In-Time Compilation

Sista: Improving Cog s JIT performance. Clément Béra

Zing Vision. Answering your toughest production Java performance questions

Field Analysis. Last time Exploit encapsulation to improve memory system performance

Cog VM Evolution. Clément Béra. Thursday, August 25, 16

JDK 9/10/11 and Garbage Collection

Acknowledgements These slides are based on Kathryn McKinley s slides on garbage collection as well as E Christopher Lewis s slides

Hierarchical PLABs, CLABs, TLABs in Hotspot

Certified Core Java Developer VS-1036

Pointer Analysis in the Presence of Dynamic Class Loading. Hind Presented by Brian Russell

Towards Parallel, Scalable VM Services

Dynamic Languages Strike Back. Steve Yegge Stanford EE Dept Computer Systems Colloquium May 7, 2008

Towards High Performance Processing in Modern Java-based Control Systems. Marek Misiowiec Wojciech Buczak, Mark Buttner CERN ICalepcs 2011

Myths and Realities: The Performance Impact of Garbage Collection

OS-caused Long JVM Pauses - Deep Dive and Solutions

Towards Flexible and Safe Technology for Runtime Evolution of Java Language Applications

Dynamic Vertical Memory Scalability for OpenJDK Cloud Applications

IBM, Java and POWER Linux IBM Corporation

Schism: Fragmentation-Tolerant Real-Time Garbage Collection. Fil Pizlo *

A new Mono GC. Paolo Molaro October 25, 2006

New Compiler Optimizations in the Java HotSpot Virtual Machine

CHAPTER 1. Introduction to JAVA Programming

Java Performance Tuning and Optimization Student Guide

Shenandoah: Theory and Practice. Christine Flood Roman Kennke Principal Software Engineers Red Hat

2 Introduction to Java. Introduction to Programming 1 1

Fault Tolerant Java Virtual Machine. Roy Friedman and Alon Kama Technion Haifa, Israel

Adaptive Optimization using Hardware Performance Monitors. Master Thesis by Mathias Payer

Intel Parallel Studio 2011

Using Java for Scientific Computing. Mark Bul EPCC, University of Edinburgh

MODULE 1 JAVA PLATFORMS. Identifying Java Technology Product Groups

Compact and Efficient Strings for Java

PennBench: A Benchmark Suite for Embedded Java

Inside Out: A Modern Virtual Machine Revealed

Writing a Sony PlayStation Emulator Using Java Technology

IBM Cognos ReportNet and the Java Heap

VM instruction formats. Bytecode translator

Transcription:

Java On Steroids: Sun s High-Performance Java Implementation Urs Hölzle Lars Bak Steffen Grarup Robert Griesemer Srdjan Mitrovic Sun Microsystems History First Java implementations: interpreters compact and portable but slow Second Generation: JITs still too slow long startup pauses (compilation) Third Generation: Beyond JITs improve both compile & execution time 2

HotSpot Project Goals Build world s fastest Java system: novel compilation techniques high-performance garbage collection fast synchronization tunable for different environments (e.g., low-memory) 3 Overview Why Java is different Why Just-In-Time is too early How HotSpot works Performance evaluation Outlook: The future of Java performance 4

Why Java Is Different more frequent calls, smaller methods slower calls (dynamic dispatch overhead) no static call graph standard compiler analysis fails sophisticated run-time system allocation, garbage collection threads, synchronization distributed in portable bytecode format 5 Example: javac Synchronization Native Methods Allocation/GC Byte codes (executed with JDK interpreter) 6

Just-In-Time Compilers translate portable bytecodes to machine code happens at runtime (on the fly) standard JITs: compile on method-bymethod basis when method is first invoked proven technology (used 10 years ago in commercial Smalltalk systems) 7 Why Just-In-Time Is Too Early problem: JITs consume execution time dilemma: either good code or fast compiler gains of better optimizer may not justify extra compile time root of problem: compilation is too eager need to balance compile & execution time 8

Solution: HotSpot Compilation lazy compilation: only compile/optimize the parts that matter combine compiler with interpreter seamlessly transition between interpreted and compiled code as necessary 9 HotSpot Architecture fast interpreter compiler bytecoded methods compiled methods dynamic profiler / recompiler 10

HotSpot Advantages shorter compile time smaller code space better code quality can exploit dynamic run-time information more flexibility (speed/space tradeoffs) 11 HotSpot Optimizing Compiler supports full Java language all checks and exceptions, correct FP precision, dynamic loading,... profile-driven inlining dispatch elimination many dynamic optimizations based on 10 years of research (Sun, Stanford, UCSB) 12

Garbage Collector accurate garbage collector fast allocation scalable to large heaps generational GC incremental collection typical GC pauses are less than 10 ms 13 Fast Synchronization software only extremely fast up to 50x faster than others virtually no per-object space overhead only 2 bits per object supports native threads, SMP 14

Performance Evaluation no microbenchmarks but: limited set of benchmarks because HotSpot VM needs modified JDK all times are elapsed times 200MHz Pentium Pro PC warm file cache, best of three runs preliminary data / prerelease software 15 JVM Implementations Systems measured: Pre-release HotSpot with next JDK Microsoft SDK 2.0 beta 2 (MS JDK 1.1) Symantec 1.5.3 JIT (JDK 1.1) 16

Caveats pre-release compiler & VM functionally correct but untuned but: implements full Java, no shortcuts for performance pre-release JDK libraries VM needs new JDK other systems use different libraries some are tuned; no JNI 17 Performance 120% relative performance 100% 80% 60% 40% 20% HotSpot Symantec Microsoft 0% javacup paraffins raytrace peano livermore 18

Execution Profile (javacup) compilation compiled code class loading interpreted code GC runtime system / native code 19 CaffeineMarks: Just Say No small, artificial, C-like microbenchmarks no correlation to real Java programs (almost) no calls, no dispatch, no allocation, no synchronization, no runtime system calls,... easy target for compiler tricks prediction: we ll soon see infinite CaffeineMarks 20

Hardware Wish List (Preliminary!) standard RISC is just fine, thanks don t penalize C code!!! (runtime system) large caches (esp. I-cache) #1 performance booster reasonably cheap and selective I-cache flushing maybe some others (1-2% each) interpreters could use more support 21 Future of Java Performance performance will continue to improve max. typical overhead 10-20% over C/C++ object-oriented Java programs will be faster than C++ equivalents JITs will be competitive with static compilers for most non-numerical apps next challenge: high-end SMP performance 22

Conclusions Java performance has improved dramatically in the past two years and will continue to improve further even performance-sensitive applications can use Java today Java does not need heavy architectural support to run efficiently except in low-power, low-memory systems 23 Kudos David Ungar and the Self project http://self.sunlabs.com David Griswold, Tim Lindholm, Peter Kessler, John Rose JavaSoft s JVM & JDK teams 24