IBM JIT Compilation Technology AOT Compilation in a Dynamic Environment for Startup Time Improvement Kenneth Ma Marius Pirvu Oct. 30, 2008.

Slides:



Advertisements
Similar presentations
System z Software – SouthWest Europe © 2008 IBM Corporation 1 Comprehensive Software Leveraging the Strengths of the z10 Compilers DB2 Development Tools.
Advertisements

Operating Systems Components of OS
Pricing for Utility-driven Resource Management and Allocation in Clusters Chee Shin Yeo and Rajkumar Buyya Grid Computing and Distributed Systems (GRIDS)
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Re-examining Instruction Reuse in Pre-execution Approaches By Sonya R. Wolff Prof. Ronald D. Barnes June 5, 2011.
New Security Issues Raised by Open Cards Pierre GirardJean-Louis Lanet GERMPLUS R&D.
SE-292 High Performance Computing
SE-292 High Performance Computing
Instruction Set Design
Hardware-based Devirtualization (VPC Prediction) Hyesoon Kim, Jose A. Joao, Onur Mutlu ++, Chang Joo Lee, Yale N. Patt, Robert Cohn* ++ *
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
Memory Management. Memory Manager Requirements –Minimize executable memory access time –Maximize executable memory size –Executable memory must be cost-effective.
Compilation Technology Oct. 16, 2006 © 2006 IBM Corporation Software Group Reducing Startup Costs of Java Applications with Shared Relocatable Code Derek.
GPU Computing with Hartford Condor Week 2012 Bob Nordlund.
Spring 2003CSE P5481 Introduction Why memory subsystem design is important CPU speeds increase 55% per year DRAM speeds increase 3% per year rate of increase.
Aarhus University, 2005Esmertec AG1 Implementing Object-Oriented Virtual Machines Lars Bak & Kasper Lund Esmertec AG
1 Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
Compilation Technology October 17, 2005 © 2005 IBM Corporation Software Group Reducing Compilation Overhead in J9/TR Marius Pirvu, Derek Inglis, Vijay.
03/09/2007CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Dynamic Tainting for Deployed Java Programs Du Li Advisor: Witawas Srisa-an University of Nebraska-Lincoln 1.
Chapter 1 and 2 Computer System and Operating System Overview
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Techniques for Efficient Processing in Runahead Execution Engines Onur Mutlu Hyesoon Kim Yale N. Patt.
COP4020 Programming Languages
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Operational Java for Technical Committee.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
Chapter 3 Memory Management: Virtual Memory
A genda for Today What is memory management Source code to execution Address binding Logical and physical address spaces Dynamic loading, dynamic linking,
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
The Jikes RVM | Ian Rogers, The University of Manchester | Dr. Ian Rogers Jikes RVM Core Team Member Research Fellow, Advanced.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
EMSOFT’02 Silicomp Research Institute JCOD 1 JCOD A Lightweight Modular Compilation Technology For Embedded Java Bertrand Delsart :
Mahesh Sukumar Subramanian Srinivasan. Introduction Embedded system products keep arriving in the market. There is a continuous growing demand for more.
Buffered dynamic run-time profiling of arbitrary data for Virtual Machines which employ interpreter and Just-In-Time (JIT) compiler Compiler workshop ’08.
1 Fast and Efficient Partial Code Reordering Xianglong Huang (UT Austin, Adverplex) Stephen M. Blackburn (Intel) David Grove (IBM) Kathryn McKinley (UT.
IBM Software Group, Compilation Technology © 2007 IBM Corporation Some Challenges Facing Effective Native Code Compilation in a Modern Just-In-Time Compiler.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Compilers for Embedded Systems Ram, Vasanth, and VJ Instructor : Dr. Edwin Sha Synthesis and Optimization of High-Performance Systems.
Transactional Coherence and Consistency Presenters: Muhammad Mohsin Butt. (g ) Coe-502 paper presentation 2.
Determina, Inc. Persisting Information Across Application Executions Derek Bruening Determina, Inc.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
Full and Para Virtualization
Power Analysis of Embedded Software : A Fast Step Towards Software Power Minimization 指導教授 : 陳少傑 教授 組員 : R 張馨怡 R 林秀萍.
1  2004 Morgan Kaufmann Publishers Locality A principle that makes having a memory hierarchy a good idea If an item is referenced, temporal locality:
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 31 Memory Management.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
Memory Hierarchy— Five Ways to Reduce Miss Penalty.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30,
Just-In-Time Compilation. Introduction Just-in-time compilation (JIT), also known as dynamic translation, is a method to improve the runtime performance.
Smalltalk Implementation Harry Porter, October 2009 Smalltalk Implementation: Optimization Techniques Prof. Harry Porter Portland State University 1.
Crusoe Processor Seminar Guide: By: - Prof. H. S. Kulkarni Ashish.
Chapter Objectives In this chapter, you will learn:
Interpreted languages Jakub Yaghob
Chapter 8: Main Memory.
Selective Code Compression Scheme for Embedded System
CSC 4250 Computer Architectures
2.1. Compilers and Interpreters
Multistep Processing of a User Program
Adaptive Code Unloading for Resource-Constrained JVMs
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Objectives In this lesson you will learn about: Need for servlets
Virtual Memory: Working Sets
Just In Time Compilation
Presentation transcript:

IBM JIT Compilation Technology AOT Compilation in a Dynamic Environment for Startup Time Improvement Kenneth Ma Marius Pirvu Oct. 30, 2008

IBM JIT Compilation Technology Outline Background Functional Challenges Performance Results Performance Challenges Future Work Conclusions

IBM JIT Compilation Technology Motivation Improve startup time –Server applications: WebSphere Application Server, WebSphere Process Server, Tomcat –Development tools: Eclipse, Rational Application Developer, WebSphere Integration Developer Improve response time –Especially for GUI applications Improve CPU utilization – Important for zOS

IBM JIT Compilation Technology Shared Classes in Java 6 IBM SDK Store classes into a cache that can be shared by multiple JVMs Reduces memory footprint Improves startup time Many new features including: –Prevention of cache corruption –Class compression –Persistent cache –Cache AOT code

IBM JIT Compilation Technology How shared classes works Shared Cache1 Classes on disk JVM1 JVM2 Shared Cache2 JVM3 JVM4 Classes

IBM JIT Compilation Technology Ahead-Of-Time (AOT) Compilation What is AOT? –Native compiled code generated “ahead-of-time” to be used by a subsequent execution –Persisted into the shared cache Why AOT? –Improve startup time –Reduce CPU utilization

IBM JIT Compilation Technology Shared Cache1 How AOT works Shared Cache2 Classes on disk JVM1 JVM2 JVM3 JVM4 Classes AOT Code Classes AOT Code

IBM JIT Compilation Technology AOT in Java 6 IBM SDK Cross platform support –Supported on all IBM JSE platforms, including S390, PowerPC, and X86 –32-bit and 64-bit support –Compressed pointer support starting in SR1 Compatibility checking –Processor specific –GC policy –Compressed pointer

IBM JIT Compilation Technology Functional Challenges Static vs Dynamic AOT population –Compiling select methods –Platform neutrality Multi-platform support –Porting AOT functionality to all the major platforms –64-bit support E.g. PPC 64-bit, load address values using sequences of instructions instead of 1 load instruction Footprint reduction –Reduce redundancies and pull in only relevant information E.g. Sharing “j2i thunks”

IBM JIT Compilation Technology Functional Challenges Increase possible combinations by many factors –Checking all configurations working properly more difficult –Test framework change AOT runtime vs compile time –Runtime state different from compile time E.g. Alignment differences

IBM JIT Compilation Technology Performance Goals Two main classes of applications: 1.Server applications (e.g. WebSphere, tomcat) Goals: –Fast restart after software reconfiguration/update –Fast cold restart (after machine reboot) –CPU utilization reduction (important on zOS) –No degradation in throughput 2.Desktop/client applications (e.g. eclipse, WID) Goals: –GUI applications should feel responsive –Fast restart during development cycle –Fast cold restart after machine shutdown

IBM JIT Compilation Technology Performance of Server Applications 9-25% startup time improvement from AOT code

IBM JIT Compilation Technology Performance of Server Applications

IBM JIT Compilation Technology Performance of Server Applications 26-29% reduction in CPU cycles on zOS due to AOT

IBM JIT Compilation Technology Performance of Desktop Applications 8-15% startup time improvement from AOT code

IBM JIT Compilation Technology Cold Restart Persistency  20-50% startup time improvement for cold restarts

IBM JIT Compilation Technology Performance Challenges Throughput/startup-time dilemma Improve runtime performance/throughput  heavily optimize code –More optimization passes –More complex optimizations Shorter startup time  make compiled code available as early as possible –Compile fast  use cheap optimizations –Compile only what matters A real challenge to satisfy both desiderates

IBM JIT Compilation Technology Performance Challenges AOT code quality lower than JIT code quality –No inlining –Treat everything as unresolved –Oblivious of class hierarchy Concern: extensive use of AOT code might degrade throughput of server applications –Questions: When to generate/store AOT code When to use/load AOT code

IBM JIT Compilation Technology Performance Challenges When to generate/store AOT code? –Always Throughput may degrade (5-10% loss on DayTrader) Used for -Xquickstart –During startup phases Class load phase heuristic When to use/load AOT code? –Always

IBM JIT Compilation Technology Performance Challenges Steps to avoid a potential throughput loss –Filter methods to be AOT-ed –First run detection –Aggressive recompilation of AOT code (upgrade)

IBM JIT Compilation Technology Effect of AOT Code on Throughput Throughput loss is under 2%

IBM JIT Compilation Technology Performance Challenges How to minimize startup time –Use AOT code sooner (but not too soon ) –Give higher priority to relocation requests (shortest job first policy) Minimize overhead –Reduce the overhead to search the shared cache –Reduce the number of shared cache searches –Turn off interpreter profiling if JIT code not used

IBM JIT Compilation Technology Future Work Improve quality of AOT code Generate AOT code more aggressively and change the mechanism of upgrading AOT compilations Store additional information about compiled methods

IBM JIT Compilation Technology Conclusions AOT code technology available in Java 6 on all IBM JSE supported platforms Many functional and performance challenges Good startup improvements on a wide range of platforms and applications