The Impact of a Real-Time JVM on Middleware Performance: Lessons Learned from Implementing DDS on IBM s J9

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

JamaicaVM Java for Embedded Realtime Systems

Real-time & Embedded Systems Workshop July 2007 Building Successful Real-time Distributed Systems in Java

Fiji VM Safety Critical Java

CS260 Intro to Java & Android 02.Java Technology

Eventrons: A Safe Programming Construct for High-Frequency Hard Real-Time Applications

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

Java For Real-Time Enterprise Systems Delivering the Benefits of Java to the world of Real-Time distributed object computing

MODULE 1 JAVA PLATFORMS. Identifying Java Technology Product Groups

Examining the Use of Java Technologies for Real-Time in a Prototype U.S. Surface Navy Combat System Application

History Introduction to Java Characteristics of Java Data types

Model Checking Real Time Java --- Wrap Up Report. Review Motivation and approach. RTSJ implementation strategy In pure Java Exploiting JPF

Implementing Real-time CORBA with Real-time Java

Lesson 2 Dissecting Memory Problems

Windows Java address space

Applying Componentbased. Engineering in On-board Software

Java Without the Jitter

CHAPTER 16 - VIRTUAL MACHINES

Notes of the course - Advanced Programming. Barbara Russo

Real-Time Java. Martin Schöberl

Chapter 3: Operating-System Structures

SPECjbb2005. Alan Adamson, IBM Canada David Dagastine, Sun Microsystems Stefan Sarne, BEA Systems

JDK 9/10/11 and Garbage Collection

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Real-Time Java David Holmes

Performance Evaluation of Java Architectures in Embedded Real-Time Systems

JAVA ON HANDHELD DEVICES COMPARING J2ME CDC TO JAVA 1.1 AND JAVA 2

Don t Dump Thread Dumps. Ram Lakshmanan

Mission Modes for Safety Critical Java

The Real-time Specification for Java

Recommendations for a CORBA Language Mapping for RTSJ


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

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

Programming Languages for Real-Time Systems. LS 12, TU Dortmund

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

Introduction to Java Programming

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Seminar report Java Submitted in partial fulfillment of the requirement for the award of degree Of CSE

Memory management has always involved tradeoffs between numerous optimization possibilities: Schemes to manage problem fall into roughly two camps

Ryan Sciampacone Senior Software Developer August 1 st Multitenant JVM. JVM Languages Summit IBM Corporation

Introduction to Java

The Design and Performance of Real-time Java Middleware

generate-jvm-report shows the threads, classes, memory, and loggers for a given target instance. Name Synopsis

Chapter 3: Operating-System Structures

Ahead of Time (AOT) Compilation

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

SD Module-1 Advanced JAVA

Jaguar: Enabling Efficient Communication and I/O in Java

Don t Dump Thread Dumps. Ram Lakshmanan Founder GCeasy.io & fastthread.io

Configuring the Heap and Garbage Collector for Real- Time Programming.

Empirical Analysis of Real-Time Java Performance and Predictability

LANGUAGE RUNTIME NON-VOLATILE RAM AWARE SWAPPING

C++, Java and.net: Lessons learned from the Internet Age, and What it Means for the Cloud and Emerging Languages

Chapter 3: Operating-System Structures

10 th AUTOSAR Open Conference

A High Integrity Distributed Deterministic Java Environment. WORDS 2002 January 7, San Diego CA

Software. CPU implements "machine code" instructions. --Each machine code instruction is extremely simple. --To run, expanded to about 10 machine code

Understanding Application Hiccups

Future of JRockit & Tools

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

A JAVA VIRTUAL MACHINE FOR RISC-V PORTING THE JIKES RESEARCH VM

Optimizing Your Android Applications

Porting Guide - Moving Java applications to 64-bit systems. 64-bit Java - general considerations

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

JVM Performance Study Comparing Java HotSpot to Azul Zing Using Red Hat JBoss Data Grid

Diffusion TM 5.0 Performance Benchmarks

Merge Sort Quicksort 9 Abstract Windowing Toolkit & Swing Abstract Windowing Toolkit (AWT) vs. Swing AWT GUI Components Layout Managers Swing GUI

The Z Garbage Collector An Introduction

Open Programmable Architecture

What you need to know about Java and JetTrac Licensing

Model Based Development of Embedded Control Software

Abstract. Testing Parameters. Introduction. Hardware Platform. Native System

Real-Time Garbage Collection Panel JTRES 2007

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

ARTAMIS : Open Source and Extensibility in an Embedded Mission System

Virtual Machine Design

TDDD07 Real-time Systems Lecture 10: Wrapping up & Real-time operating systems

Optimising Multicore JVMs. Khaled Alnowaiser

The Z Garbage Collector Low Latency GC for OpenJDK

Kotlin/Native concurrency model. nikolay

Integration of the Real-Time Specification for Java in L4 Kaffe

CHAPTER 1. Introduction to JAVA Programming

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

Don t Get Caught In the Cold, Warm-up Your JVM Understand and Eliminate JVM Warm-up Overhead in Data-parallel Systems

Advanced Object-Oriented Programming Introduction to OOP and Java

JAVA FOR REAL-TIME TELEMETRY SYSTEMS

High-Level Language VMs

COMPARISON OF ORACLE APPLICATION SERVER, WEBLOGIC AND WEBSPHERE USING PEOPLESOFT ENTERPRISE CAMPUS SOLUTIONS 8.9

Runtime Application Self-Protection (RASP) Performance Metrics

Bernhard Dorninger Software Competence Center Hagenberg. Experiences with OSGi in industrial applications

Running Java Programs

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

Java in a World of Containers

Asynchronous Event Handling and Safety Critical Java

Oracle Products. Supported Configurations for Oracle Data Service Integrator 10gR3

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

What is a VM? Categories of Virtual Machines. Process Virtual Machine 11/17/2010

IBM Cognos ReportNet and the Java Heap

Transcription:

The Impact of a Real-Time JVM on Middleware Performance: Lessons Learned from Implementing DDS on IBM s J9 Ken Brophy, Senior Applications Engineer, RTI Rick Warren, Lead Software Engineer, RTI

Agenda This Presentation Has Two Major Sections Latency Performance Comparisons RTSJ Observations

Latency Performance Measurements Performance measures include: RTSJ-enabled JVM using RealtimeThread without real-time enabled (i.e. normal mode) with real-time enabled but without RealtimeThreads with real-time enabled and using RTSJ features Standard JVM This is a Sun 1.5 JVM

Configuration RHEL 4 Linux host 2.6.16-rtj12.9.1smp #1 SMP PREEMPT Wed Sep 27 15:05:54 PDT 2006 i686 athlon i386 GNU/Linux IBM J9 JVM host [162] /opt/java2/jre/bin/java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pxi32rt23-20060824a) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223ifx-20060719 (JIT enabled) J9VM - 20060714_07194_lHdSMR JIT - 20060428_1800.ifix2_r8 GC - 200607_07) JCL - 20060816 host [163] /opt/java2/jre/bin/java -fullversion java full version "J2RE 1.5.0 IBM Linux build pxi32rt23-20060824a Sun JVM host [164] java -version java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode) host [165] java -fullversion java full version "1.5.0_07-b03 Processors & Network Dual CPUs with dual cores @ 2GHz High Performance GB Router

Agenda This Presentation Has Two Major Sections Latency Performance Comparisons RTSJ Observations

Conclusions The IBM J9 RTSJ JVM provides much improved determinism over standard JVMs 1024 byte message one way latency standard deviation results 2µs for RTSJ JVM with RealtimeThread 16µs for Standard JVM This determinism does come at a cost, however. Average performance is not quite as good 1024 byte message one way latency results 170µs for RTSJ JVM with RealtimeThread 107µs for Standard JVM

Latency Standard Deviations 100.0 One Way Latency Standard Deviations RT Threads Precompiled RT Threads Standard JVM RT JVM No RT Threads Latency (microseconds) 10.0 1.0 16 32 64 128 256 512 1024 2048 4096 8192 Message Size (bytes)

Latency Realtime Threads 100,000 One Way Latency - Realtime Threads Latency (microseconds) 10,000 1,000 100 Average Minimum 50% 90% 99% 99.9% Maximum 10 16 32 64 128 256 512 1024 2048 4096 8192 Message Size (bytes)

Latency Precompiled Realtime Threads 100,000 One Way Latency - Precompiled Realtime Threads Latency (microseconds) 10,000 1,000 100 Average Minimum 50% 90% 99% 99.9% Maximum 10 16 32 64 128 256 512 1024 2048 4096 8192 Message Size (bytes)

Latency RT JVM No Realtime Threads 100,000 One Way Latency - Realtime JVM No Realtime Threads Average Minimum 50% 90% 99% 99.9% Maximum Latency (microseconds) 10,000 1,000 100 10 16 32 64 128 256 512 1024 2048 4096 8192 Message Size (bytes)

Latency Standard JVM 100,000 One Way Latency - Standard JVM Average Minimum 50% 90% 99% 99.9% Maximum Latency (microseconds) 10,000 1,000 100 10 16 32 64 128 256 512 1024 2048 4096 8192 Message Size (bytes)

Agenda This Presentation Has Two Major Sections Latency Performance Comparisons RTSJ Observations

Why Real-Time Java?! High, deterministic performance Controllable, predictable garbage collection/ object disposal Controllable, predictable thread scheduling Minimal latency penalty for high-level language features! Ease of use Take advantage of modern language and rich class library! to develop faster! with fewer errors

Ease of Use? Control over memory allocation / de-allocation comes at a high price! Lack of portability Standard libraries might work Standard language features might work Thread priorities aren t standardized! Complicates design and implementation Complex memory access rules No compile-time enforcement Runnables within Runnables within Runnables

Lack of Standard Library Support! Java standard libraries may not work in non-gc memory areas Not all java.* packages supported to be expected! Including java.lang.*! Including java.lang.object.*() Which APIs are supported?! Not well documented! Varies by VM vendor! Request to vendors: Give us something we can count on

Lack of Support for Language Features The Java 5 language itself is not entirely RTSJ-compatible! Pretty obvious: enhanced for loop for (variable : collection) Allocates iterator: can t use in non-gc memory! Somewhat less obvious: boxing primitives Passing primitives to methods expecting objects May allocate wrapper, or may reuse pre-allocated! Depends on primitive type and value! Read Java Language Specification to learn more! Not obvious: switching on enums switch (variable) { case ENUM_CONSTANT: } Static fields added to byte-code cause memory access errors

RTSJ and JNI! Flavors that go well together? JNI: The Other Way to call real-time code from Java! Good news: Few restrictions Any thread can call native code Any thread can allocate memory on the native heap! Bad news: Inconsistent threading support Real-time threads must be created in Java code! No standard JNI API to spawn real-time threads! No way to attach native thread to JVM as real-time thread

RTSJ and JNI (cont.) Java Thread Non-Real- Time!Java " Native!Native " Java Real-Time!Java " Native!Native " Java Java JNI Native Thread!Java " Native!Native " Java!Java " Native!Native " Java Native

Real-Time is Hard! Designing a hard real-time application is complex in any language Java is easier to program in than C, and RTSJ is based on Java careful!! Memory access rules are complex and easy to get wrong No compile-time checking Example gotcha: class initialization runs in immortal memory! Therefore all Class objects are in immortal memory! Therefore all static data must also (recursively) be in immortal memory

Some Friendly Advice! Real-time JVM brings real benefits Whether or not you use RTSJ! Evaluate the need for RTSJ very carefully If you know regular Java won t do the job, consider native code! C++ is no harder to learn than RTSJ! JNI or language-neutral middleware can bridge the gap! If you do use RTSJ Developers need training and experience Test, test, test! Fatal memory access errors can only be caught at runtime! Fixing them will impact your design! Tests must exercise real-world threading and memory access patterns to be valid! JUnit is of limited help: depends on GC