2011 Oracle Corporation and Affiliates. Do not re-distribute!
|
|
- Tiffany Bradford
- 5 years ago
- Views:
Transcription
1
2 <Insert Picture Here> How to Write Low Latency Java Applications Charlie Hunt Java HotSpot VM Performance Lead Engineer
3 Who is this guy? Charlie Hunt Lead JVM Performance Engineer at Oracle 12+ years of Java performance experience 20+ years of (general) performance experience Lead author of Java Performance book, hot off the presses!!!
4 The following is not intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle.
5 Agenda What you need to know about GC <Insert Picture Here> What you need to know about JIT compilation Tools to help achieve low latency
6 What you need to know about GC Java HotSpot VM Heap Layout Eden Survivor Survivor The Heap Old Generation: for older / longer living objects Permanent Generation : for VM & class meta-data 6
7 What you need to know about GC Java HotSpot VM Heap Layout New allocations Retention of young objects during minor GCs Eden Survivor Survivor Promotions of longer lived objects during minor GCs The Heap Old Generation: for older / longer living objects Permanent Generation : for VM & class meta-data 7
8 What you need to know about GC Important Concepts (1 of 3) Frequency of minor GC is dictated by Application object allocation rate Size of the Eden Space
9 What you need to know about GC Important Concepts (1 of 3) Frequency of minor GC is dictated by Application object allocation rate Size of the Eden Space Frequency of object promotion into old generation is dictated by Frequency of minor GCs (how quickly objects age) Size of the survivor spaces (large enough to age effectively) Ideally you want to promote as little as possible
10 What you need to know about GC Important Concepts (1 of 3) Frequency of minor GC is dictated by Application object allocation rate Size of the Eden Space Frequency of object promotion into old generation is dictated by Frequency of minor GCs (how quickly objects age) Size of the survivor spaces (large enough to age effectively) Ideally you want to promote as little as possible Object retention impacts latency more than object allocation GC only visits live objects GC duration is a function of live objects and graph complexity
11 What you need to know about GC Important Concepts (2 of 3) Object allocation is very cheap! 10 CPU instructions in common case
12 What you need to know about GC Important Concepts (2 of 3) Object allocation is very cheap! 10 CPU instructions in common case Reclamation of new objects is also very cheap! Remember, only live objects are visited in a GC
13 What you need to know about GC Important Concepts (2 of 3) Object allocation is very cheap! 10 CPU instructions in common case Reclamation of new objects is also very cheap! Remember, only live objects are visited in a GC So, Do not be afraid to allocate short lived objects especially for immediate results GCs love small immutable objects and short-lived objects especially those that seldom survive a minor GC
14 What you need to know about GC Important Concepts (3 of 3) However, Do not do needless allocations
15 What you need to know about GC Important Concepts (3 of 3) However, Do not do needless allocations more frequent allocations means more frequent GCs more frequent GCs imply faster object aging faster promotions more frequent needs for either; concurrent Old Generation collection, or Old Generation compaction (i.e. Full GC)
16 What you need to know about GC Important Concepts (3 of 3) However, Do not do needless allocations more frequent allocations means more frequent GCs more frequent GCs imply faster object aging faster promotions more frequent needs for either; concurrent Old Generation collection, or Old Generation compaction (i.e. Full GC) In short
17 What you need to know about GC Important Concepts (3 of 3) However, Do not do needless allocations more frequent allocations means more frequent GCs more frequent GCs imply faster object aging faster promotions more frequent needs for either; concurrent Old Generation collection, or Old Generation compaction (i.e. Full GC) In short It is better to use short-lived immutable objects than longlived mutable objects btw, there's other advantages of immutable objects
18 What you need to know about GC Ideal Situation After application initialization phase, only experience minor GCs and old generation growth is negligible Ideally, never experience need for Old Generation collection Minor GCs are (generally) the fastest GC Start with Parallel GC (i.e. -XX:+UseParallelOldGC or -XX:+UseParallelGC) Parallel GC offers the fastest minor GC times Move to CMS if Old Generation collection is needed Minor GC times will be slower due to promotion into free lists But, Old Generation compaction (via Full GC) delayed by concurrent collection Hopefully for the duration of program execution
19 What you need to know about GC A tidbit about Concurrent GCs Concurrent collectors require a write barrier to track potential hidden live objects The write barrier tracks all writes to objects and records the creation and removal of references between objects Wanna know more about write barriers? Google it search for Java GC write barrier
20 What you need to know about GC A tidbit about Concurrent GCs Concurrent collectors require a write barrier to track potential hidden live objects The write barrier tracks all writes to objects and records the creation and removal of references between objects Wanna know more about write barriers? Google it search for Java GC write barrier The point is...
21 What you need to know about GC A tidbit about Concurrent GCs Concurrent collectors require a write barrier to track potential hidden live objects The write barrier tracks all writes to objects and records the creation and removal of references between objects Wanna know more about write barriers? Google it search for Java GC write barrier The point is... Write barriers introduce overhead The amount of overhead depends on the implementation STW GCs, i.e. don't require write barriers Hence, ideal situation is... use Parallel GC or ParallelOld GC and avoid Old Gen collection, i.e. avoid Full GC
22 What you need to know about GC GC Friendly Programming (1 of 3) Large objects
23 What you need to know about GC GC Friendly Programming (1 of 3) Large objects Expensive to allocate (perhaps not so much via fast path ) Expensive to initialize (remember Java Spec... zeroing)
24 What you need to know about GC GC Friendly Programming (1 of 3) Large objects Expensive to allocate (perhaps not so much via fast path ) Expensive to initialize (remember Java Spec... zeroing) Large objects of different sizes can cause Java heap fragmentation Applicable to non-compacting, or partially compacting GCs So,
25 What you need to know about GC GC Friendly Programming (1 of 3) Large objects Expensive to allocate (perhaps not so much via fast path ) Expensive to initialize (remember Java Spec... zeroing) Large objects of different sizes can cause Java heap fragmentation Applicable to non-compacting, or partially compacting GCs So, Avoid large object allocations if you can Especially frequent large object allocations during application steady state
26 What you need to know about GC GC Friendly Programming (2 of 3) Data Structure Re-sizing
27 What you need to know about GC GC Friendly Programming (2 of 3) Data Structure Re-sizing Avoid re-sizing of array backed container objects Use the object constructor that takes an explicit size
28 What you need to know about GC GC Friendly Programming (2 of 3) Data Structure Re-sizing Avoid re-sizing of array backed container objects Use the object constructor that takes an explicit size Re-sizing leads to unnecessary object allocation Can also contribute to fragmentation (again for noncompacting GCs)
29 What you need to know about GC GC Friendly Programming (2 of 3) Data Structure Re-sizing Avoid re-sizing of array backed container objects Use the object constructor that takes an explicit size Re-sizing leads to unnecessary object allocation Can also contribute to fragmentation (again for noncompacting GCs) Object pooling potential issues
30 What you need to know about GC GC Friendly Programming (2 of 3) Data Structure Re-sizing Avoid re-sizing of array backed container objects Use the object constructor that takes an explicit size Re-sizing leads to unnecessary object allocation Can also contribute to fragmentation (again for noncompacting GCs) Object pooling potential issues Contributes to number of live objects visited during a GC Remember GC duration is a function of live objects Access to the pool requires some kind of locking Potential for a scalability issue
31 What you need to know about GC GC Friendly Programming (3 of 3) Finalizers
32 What you need to know about GC GC Friendly Programming (3 of 3) Finalizers PPP-lleeeaa-ssseee don't do it! Requires at least 2 GCs cycles and GC cycles are slower If possible, add a method to explicitly free resources when done with an object
33 What you need to know about GC GC Friendly Programming (3 of 3) Finalizers PPP-lleeeaa-ssseee don't do it! Requires at least 2 GCs cycles and GC cycles are slower If possible, add a method to explicitly free resources when done with an object Reference Objects Use as an alternative to finalizers, (as a last resort)
34 What you need to know about GC GC Friendly Programming (3 of 3) Finalizers PPP-lleeeaa-ssseee don't do it! Requires at least 2 GCs cycles and GC cycles are slower If possible, add a method to explicitly free resources when done with an object Reference Objects Use as an alternative to finalizers, (as a last resort) Important note on SoftReferences
35 What you need to know about GC GC Friendly Programming (3 of 3) Finalizers PPP-lleeeaa-ssseee don't do it! Requires at least 2 GCs cycles and GC cycles are slower If possible, add a method to explicitly free resources when done with an object Reference Objects Use as an alternative to finalizers, (as a last resort) Important note on SoftReferences Referent is cleared by the GC, how aggressive it is at clearing is at the mercy of the GC's implementation The aggressiveness dictates the degree of object retention
36 What you need to know about GC Subtle Object Retention Consider the following: class MyImpl extends ClassWithFinalizer { private byte[] buffer = new byte[1024 * 1024 * 2];... What's the consequences if ClassWithFinalizer has a finalizer?
37 What you need to know about GC Subtle Object Retention Consider the following: class MyImpl extends ClassWithFinalizer { private byte[] buffer = new byte[1024 * 1024 * 2];... What's the consequences if ClassWithFinalizer has a finalizer? At least 2 GC cycles to free the byte[] buffer How to fix it?
38 What you need to know about GC Subtle Object Retention Consider the following: class MyImpl extends ClassWithFinalizer { private byte[] buffer = new byte[1024 * 1024 * 2];... What's the consequences if ClassWithFinalizer has a finalizer? At least 2 GC cycles to free the byte[] buffer How to fix it? class MyImpl { private ClassWithFinalier classwithfinalizer; private byte[] buffer = new byte[1024 * 1024 * 2];...
39 What you need to know about GC Subtle Object Retention What about inner classes?
40 What you need to know about GC Subtle Object Retention What about inner classes? Remember that inner classes have an implicit reference to the outer instance Potentially can increase object retention
41 What you need to know about GC Subtle Object Retention What about inner classes? Remember that inner classes have an implicit reference to the outer instance Potentially can increase object retention Again, increased object retention more live objects at GC time increased GC duration
42 Agenda What you need to know about GC <Insert Picture Here> What you need to know about JIT compilation Tools to help achieve low latency
43 What to know about JIT compilation The Basics Optimization decisions are made based on Classed that have been loaded and code paths executed
44 What to know about JIT compilation The Basics Optimization decisions are made based on Classed that have been loaded and code paths executed JIT compiler does not have full knowledge of entire program
45 What to know about JIT compilation The Basics Optimization decisions are made based on Classed that have been loaded and code paths executed JIT compiler does not have full knowledge of entire program Rather, it has knowledge of only what has been class loaded and code paths executed
46 What to know about JIT compilation The Basics Optimization decisions are made based on Classed that have been loaded and code paths executed JIT compiler does not have full knowledge of entire program Rather, it has knowledge of only what has been class loaded and code paths executed Hence, optimization decisions makes assumptions about how a program has been executing it knows nothing about what has not been class loaded or executed
47 What to know about JIT compilation The Basics Optimization decisions are made based on Classed that have been loaded and code paths executed JIT compiler does not have full knowledge of entire program Rather, it has knowledge of only what has been class loaded and code paths executed Hence, optimization decisions makes assumptions about how a program has been executing it knows nothing about what has not been class loaded or executed Note, assumptions may turn out (later) to be wrong...
48 What to know about JIT compilation The Basics Optimization decisions are made based on Classed that have been loaded and code paths executed JIT compiler does not have full knowledge of entire program Rather, it has knowledge of only what has been class loaded and code paths executed Hence, optimization decisions makes assumptions about how a program has been executing it knows nothing about what has not been class loaded or executed Note, assumptions may turn out (later) to be wrong it must keep information around to recover which (may) limit types of optimization(s)
49 What to know about JIT compilation The Basics Optimization decisions are made based on Classed that have been loaded and code paths executed JIT compiler does not have full knowledge of entire program Rather, it has knowledge of only what has been class loaded and code paths executed Hence, optimization decisions makes assumptions about how a program has been executing it knows nothing about what has not been class loaded or executed Note, assumptions may turn out (later) to be wrong it must keep information around to recover which (may) limit types of optimization(s) New class loading or code path possible de-opt/re-opt
50 What to know about JIT compilation Competing Forces: Inlining & Virtualization Biggest optimization impact from method inlining
51 What to know about JIT compilation Competing Forces: Inlining & Virtualization Biggest optimization impact from method inlining Virtualized methods are the biggest barrier to inlining
52 What to know about JIT compilation Competing Forces: Inlining & Virtualization Biggest optimization impact from method inlining Virtualized methods are the biggest barrier to inlining Good news
53 What to know about JIT compilation Competing Forces: Inlining & Virtualization Biggest optimization impact from method inlining Virtualized methods are the biggest barrier to inlining Good news JIT compiler can de-virtualize methods if it only sees 1 implementation of a virtualized method effectively makes it a mono-morphic call
54 What to know about JIT compilation Competing Forces: Inlining & Virtualization Biggest optimization impact from method inlining Virtualized methods are the biggest barrier to inlining Good news JIT compiler can de-virtualize methods if it only sees 1 implementation of a virtualized method effectively makes it a mono-morphic call Bad news
55 What to know about JIT compilation Competing Forces: Inlining & Virtualization Biggest optimization impact from method inlining Virtualized methods are the biggest barrier to inlining Good news JIT compiler can de-virtualize methods if it only sees 1 implementation of a virtualized method effectively makes it a mono-morphic call Bad news if JIT compiler later discovers an additional implementation it must de-optimize, re-optimize for 2 nd implementation now we have a bi-morphic call
56 What to know about JIT compilation Competing Forces: Inlining & Virtualization Biggest optimization impact from method inlining Virtualized methods are the biggest barrier to inlining Good news JIT compiler can de-virtualize methods if it only sees 1 implementation of a virtualized method effectively makes it a mono-morphic call Bad news if JIT compiler later discovers an additional implementation it must de-optimize, re-optimize for 2 nd implementation now we have a bi-morphic call This type of de-opt & re-opt will likely lead to lesser peak performance, especially true when / if you get to the 3 rd implementation because now its a mega-morphic call
57 What to know about JIT compilation Competing Forces: Inlining & Virtualization Important Point(s)
58 What to know about JIT compilation Competing Forces: Inlining & Virtualization Important Point(s) Discovery of additional implementations of virtualized methods during steady state will likely slow down your application (impacts application throughput, predictability and likely response times)
59 What to know about JIT compilation Competing Forces: Inlining & Virtualization Important Point(s) Discovery of additional implementations of virtualized methods during steady state will likely slow down your application (impacts application throughput, predictability and likely response times) A mega-morphic call can limit or inhibit inlining capabilities
60 What to know about JIT compilation Competing Forces: Inlining & Virtualization Important Point(s) Discovery of additional implementations of virtualized methods during steady state will likely slow down your application (impacts application throughput, predictability and likely response times) A mega-morphic call can limit or inhibit inlining capabilities Should I write JIT Compiler Friendly Code?
61 What to know about JIT compilation Competing Forces: Inlining & Virtualization Important Point(s) Discovery of additional implementations of virtualized methods during steady state will likely slow down your application (impacts application throughput, predictability and likely response times) A mega-morphic call can limit or inhibit inlining capabilities Should I write JIT Compiler Friendly Code? Ahh, that's a premature optimization!
62 What to know about JIT compilation Competing Forces: Inlining & Virtualization Important Point(s) Discovery of additional implementations of virtualized methods during steady state will likely slow down your application (impacts application throughput, predictability and likely response times) A mega-morphic call can limit or inhibit inlining capabilities Should I write JIT Compiler Friendly Code? Ahh, that's a premature optimization! Advice?
63 What to know about JIT compilation Competing Forces: Inlining & Virtualization Important Point(s) Discovery of additional implementations of virtualized methods during steady state will likely slow down your application (impacts application throughput, predictability and likely response times) A mega-morphic call can limit or inhibit inlining capabilities Should I write JIT Compiler Friendly Code? Ahh, that's a premature optimization! Advice? Write code in its most natural form, let the JIT compiler figure out how to best optimize it Do analysis (using tools) to identify the problem areas and make code changes (only) for those problem areas
64 Agenda What you need to know about GC <Insert Picture Here> What you need to know about JIT compilation Tools to help achieve low latency
65 Tools for GC Analysis Observing GC Behavior Two Modes Offline, after the fact, GC Histo, a java.net project (just search for GCHisto ) It's a GC log visualizer Logs should include -XX:+PrintGCTimeStamps or -XX:+PrintGCDateStamps along with -XX:+PrintGCDetails
66 Tools for GC Analysis Observing GC Behavior Two Modes Offline, after the fact, GC Histo, a java.net project (just search for GCHisto ) It's a GC log visualizer Logs should include -XX:+PrintGCTimeStamps or -XX:+PrintGCDateStamps along with -XX:+PrintGCDetails Online while the application is running VisualGC plug-in for VisualVM (distributed in the JDK its in the bin directory, launched as 'jvisualvm')
67 Tools for GC Analysis Observing GC Behavior Two Modes Offline, after the fact, GC Histo, a java.net project (just search for GCHisto ) It's a GC log visualizer Logs should include -XX:+PrintGCTimeStamps or -XX:+PrintGCDateStamps along with -XX:+PrintGCDetails Online while the application is running VisualGC plug-in for VisualVM (distributed in the JDK its in the bin directory, launched as 'jvisualvm') VisualVM's Memory Profiler for unnecessary object allocation and object retention
68 Tools for GC Analysis Observing GC Behavior Two Modes Offline, after the fact, GC Histo, a java.net project (just search for GCHisto ) It's a GC log visualizer Logs should include -XX:+PrintGCTimeStamps or -XX:+PrintGCDateStamps along with -XX:+PrintGCDetails Online while the application is running VisualGC plug-in for VisualVM (distributed in the JDK its in the bin directory, launched as 'jvisualvm') VisualVM's Memory Profiler for unnecessary object allocation and object retention In future a JDK 7 Update release Mission Control
69 Tools for JIT Compilation Oracle Solaris Studio Performance Analyzer
70 Tools for JIT Compilation Oracle Solaris Studio Performance Analyzer Works with both Solaris and Linux But,
71 Tools for JIT Compilation Oracle Solaris Studio Performance Analyzer Works with both Solaris and Linux But, better experience on Solaris (more productive gets you to things you want to look at the quickest)
72 Tools for JIT Compilation Oracle Solaris Studio Performance Analyzer Works with both Solaris and Linux But, better experience on Solaris (more productive gets you to things you want to look at the quickest) Method profiler, lock profiler, CPU hardware counter profiler and you can see generated JIT compiler code and Java source code
73 Tools for JIT Compilation Oracle Solaris Studio Performance Analyzer Works with both Solaris and Linux But, better experience on Solaris (more productive gets you to things you want to look at the quickest) Method profiler, lock profiler, CPU hardware counter profiler and you can see generated JIT compiler code and Java source code Did I mention its free? :-)
74 Tools for JIT Compilation Oracle Solaris Studio Performance Analyzer Works with both Solaris and Linux But, better experience on Solaris (more productive gets you to things you want to look at the quickest) Method profiler, lock profiler, CPU hardware counter profiler and you can see generated JIT compiler code and Java source code Did I mention its free? :-) Let's take a (quick) look
75 Tools for JIT Compilation Oracle Solaris Studio Performance Analyzer Works with both Solaris and Linux But, better experience on Solaris (more productive gets you to things you want to look at the quickest) Method profiler, lock profiler, CPU hardware counter profiler and you can see generated JIT compiler code and Java source code Did I mention its free? :-) Let's take a (quick) look Similar tools Intel VTune AMD CodeAnalyst
76 One last plug ;-) More goodies and fun
77 Acknowledgments A special thanks to Tony Printezis and John Coomes. Much of the GC related material, especially the GC friendly, is material originally drafted by Tony and John.
78
79
The Fundamentals of JVM Tuning
The Fundamentals of JVM Tuning Charlie Hunt Architect, Performance Engineering Salesforce.com sfdc_ppt_corp_template_01_01_2012.ppt In a Nutshell What you need to know about a modern JVM to be effective
More informationFundamentals of GC Tuning. Charlie Hunt JVM & Performance Junkie
Fundamentals of GC Tuning Charlie Hunt JVM & Performance Junkie Who is this guy? Charlie Hunt Currently leading a variety of HotSpot JVM projects at Oracle Held various performance architect roles at Oracle,
More informationJVM Memory Model and GC
JVM Memory Model and GC Developer Community Support Fairoz Matte Principle Member Of Technical Staff Java Platform Sustaining Engineering, Copyright 2015, Oracle and/or its affiliates. All rights reserved.
More informationJava Performance Tuning and Optimization Student Guide
Java Performance Tuning and Optimization Student Guide D69518GC10 Edition 1.0 June 2011 D73450 Disclaimer This document contains proprietary information and is protected by copyright and other intellectual
More informationJava & Coherence Simon Cook - Sales Consultant, FMW for Financial Services
Java & Coherence Simon Cook - Sales Consultant, FMW for Financial Services with help from Adrian Nakon - CMC Markets & Andrew Wilson - RBS 1 Coherence Special Interest Group Meeting 1 st March 2012 Presentation
More informationThe G1 GC in JDK 9. Erik Duveblad Senior Member of Technical Staf Oracle JVM GC Team October, 2017
The G1 GC in JDK 9 Erik Duveblad Senior Member of Technical Staf racle JVM GC Team ctober, 2017 Copyright 2017, racle and/or its affiliates. All rights reserved. 3 Safe Harbor Statement The following is
More informationNG2C: Pretenuring Garbage Collection with Dynamic Generations for HotSpot Big Data Applications
NG2C: Pretenuring Garbage Collection with Dynamic Generations for HotSpot Big Data Applications Rodrigo Bruno Luis Picciochi Oliveira Paulo Ferreira 03-160447 Tomokazu HIGUCHI Paper Information Published
More informationJava Garbage Collection. Carol McDonald Java Architect Sun Microsystems, Inc.
Java Garbage Collection Carol McDonald Java Architect Sun Microsystems, Inc. Speaker Carol cdonald: > Java Architect at Sun Microsystems > Before Sun, worked on software development of: >Application to
More informationJava Performance Tuning From A Garbage Collection Perspective. Nagendra Nagarajayya MDE
Java Performance Tuning From A Garbage Collection Perspective Nagendra Nagarajayya MDE Agenda Introduction To Garbage Collection Performance Problems Due To Garbage Collection Performance Tuning Manual
More informationJVM Troubleshooting MOOC: Troubleshooting Memory Issues in Java Applications
JVM Troubleshooting MOOC: Troubleshooting Memory Issues in Java Applications Poonam Parhar JVM Sustaining Engineer Oracle Lesson 1 HotSpot JVM Memory Management Poonam Parhar JVM Sustaining Engineer Oracle
More informationJava Performance Tuning
443 North Clark St, Suite 350 Chicago, IL 60654 Phone: (312) 229-1727 Java Performance Tuning This white paper presents the basics of Java Performance Tuning and its preferred values for large deployments
More informationGarbage Collection. Hwansoo Han
Garbage Collection Hwansoo Han Heap Memory Garbage collection Automatically reclaim the space that the running program can never access again Performed by the runtime system Two parts of a garbage collector
More informationDebugging Your Production JVM TM Machine
Debugging Your Production JVM TM Machine Ken Sipe Perficient (PRFT) kensipe@gmail.com @kensipe Abstract > Learn the tools and techniques used to monitor, trace and debugging running Java applications.
More informationThe Garbage-First Garbage Collector
The Garbage-First Garbage Collector Tony Printezis, Sun Microsystems Paul Ciciora, Chicago Board Options Exchange #TS-9 Trademarks And Abbreviations (to get them out of the way...) Java Platform, Standard
More informationTypical Issues with Middleware
Typical Issues with Middleware HrOUG 2016 Timur Akhmadeev October 2016 About Me Database Consultant at Pythian 10+ years with Database and Java Systems Performance and Architecture OakTable member 3 rd
More informationAttila Szegedi, Software
Attila Szegedi, Software Engineer @asz Everything I ever learned about JVM performance tuning @twitter Everything More than I ever wanted to learned about JVM performance tuning @twitter Memory tuning
More information10/26/2017 Universal Java GC analysis tool - Java Garbage collection log analysis made easy
Analysis Report GC log le: atlassian-jira-gc-2017-10-26_0012.log.0.current Duration: 14 hrs 59 min 51 sec System Time greater than User Time In 25 GC event(s), 'sys' time is greater than 'usr' time. It's
More informationThe Z Garbage Collector Scalable Low-Latency GC in JDK 11
The Z Garbage Collector Scalable Low-Latency GC in JDK 11 Per Lidén (@perliden) Consulting Member of Technical Staff Java Platform Group, Oracle October 24, 2018 Safe Harbor Statement The following is
More informationDo Your GC Logs Speak To You
Do Your GC Logs Speak To You Visualizing CMS, the (mostly) Concurrent Collector Copyright 2012 Kodewerk Ltd. All rights reserved About Me Consultant (www.kodewerk.com) performance tuning and training seminar
More informationG1 Garbage Collector Details and Tuning. Simone Bordet
G1 Garbage Collector Details and Tuning Who Am I - @simonebordet Lead Architect at Intalio/Webtide Jetty's HTTP/2, SPDY and HTTP client maintainer Open Source Contributor Jetty, CometD, MX4J, Foxtrot,
More informationThe Z Garbage Collector An Introduction
The Z Garbage Collector An Introduction Per Lidén & Stefan Karlsson HotSpot Garbage Collection Team FOSDEM 2018 Safe Harbor Statement The following is intended to outline our general product direction.
More informationJAVA PERFORMANCE. PR SW2 S18 Dr. Prähofer DI Leopoldseder
JAVA PERFORMANCE PR SW2 S18 Dr. Prähofer DI Leopoldseder OUTLINE 1. What is performance? 1. Benchmarking 2. What is Java performance? 1. Interpreter vs JIT 3. Tools to measure performance 4. Memory Performance
More informationRunning class Timing on Java HotSpot VM, 1
Compiler construction 2009 Lecture 3. A first look at optimization: Peephole optimization. A simple example A Java class public class A { public static int f (int x) { int r = 3; int s = r + 5; return
More informationNew Java performance developments: compilation and garbage collection
New Java performance developments: compilation and garbage collection Jeroen Borgers @jborgers #jfall17 Part 1: New in Java compilation Part 2: New in Java garbage collection 2 Part 1 New in Java compilation
More informationJava Application Performance Tuning for AMD EPYC Processors
Java Application Performance Tuning for AMD EPYC Processors Publication # 56245 Revision: 0.70 Issue Date: January 2018 Advanced Micro Devices 2018 Advanced Micro Devices, Inc. All rights reserved. The
More informationThe Z Garbage Collector Low Latency GC for OpenJDK
The Z Garbage Collector Low Latency GC for OpenJDK Per Lidén & Stefan Karlsson HotSpot Garbage Collection Team Jfokus VM Tech Summit 2018 Safe Harbor Statement The following is intended to outline our
More informationExploiting the Behavior of Generational Garbage Collector
Exploiting the Behavior of Generational Garbage Collector I. Introduction Zhe Xu, Jia Zhao Garbage collection is a form of automatic memory management. The garbage collector, attempts to reclaim garbage,
More informationGarbage-First Garbage Collection by David Detlefs, Christine Flood, Steve Heller & Tony Printezis. Presented by Edward Raff
Garbage-First Garbage Collection by David Detlefs, Christine Flood, Steve Heller & Tony Printezis Presented by Edward Raff Motivational Setup Java Enterprise World High end multiprocessor servers Large
More informationHigh Performance Managed Languages. Martin Thompson
High Performance Managed Languages Martin Thompson - @mjpt777 Really, what is your preferred platform for building HFT applications? Why do you build low-latency applications on a GC ed platform? Agenda
More informationNUMA in High-Level Languages. Patrick Siegler Non-Uniform Memory Architectures Hasso-Plattner-Institut
NUMA in High-Level Languages Non-Uniform Memory Architectures Hasso-Plattner-Institut Agenda. Definition of High-Level Language 2. C# 3. Java 4. Summary High-Level Language Interpreter, no directly machine
More informationCompiler construction 2009
Compiler construction 2009 Lecture 3 JVM and optimization. A first look at optimization: Peephole optimization. A simple example A Java class public class A { public static int f (int x) { int r = 3; int
More informationJava Memory Management. Märt Bakhoff Java Fundamentals
Java Memory Management Märt Bakhoff Java Fundamentals 0..206 Agenda JVM memory Reference objects Monitoring Garbage collectors ParallelGC GGC 2/44 JVM memory Heap (user objects) Non-heap Stack (per thread:
More informationA JVM Does What? Eva Andreasson Product Manager, Azul Systems
A JVM Does What? Eva Andreasson Product Manager, Azul Systems Presenter Eva Andreasson Innovator & Problem solver Implemented the Deterministic GC of JRockit Real Time Awarded patents on GC heuristics
More informationJVM Performance Study Comparing Java HotSpot to Azul Zing Using Red Hat JBoss Data Grid
JVM Performance Study Comparing Java HotSpot to Azul Zing Using Red Hat JBoss Data Grid Legal Notices JBoss, Red Hat and their respective logos are trademarks or registered trademarks of Red Hat, Inc.
More informationHigh Performance Managed Languages. Martin Thompson
High Performance Managed Languages Martin Thompson - @mjpt777 Really, what s your preferred platform for building HFT applications? Why would you build low-latency applications on a GC ed platform? Some
More informationAlgorithms for Dynamic Memory Management (236780) Lecture 4. Lecturer: Erez Petrank
Algorithms for Dynamic Memory Management (236780) Lecture 4 Lecturer: Erez Petrank!1 March 24, 2014 Topics last week The Copying Garbage Collector algorithm: Basics Cheney s collector Additional issues:
More informationLow latency & Mechanical Sympathy: Issues and solutions
Low latency & Mechanical Sympathy: Issues and solutions Jean-Philippe BEMPEL Performance Architect @jpbempel http://jpbempel.blogspot.com ULLINK 2016 Low latency order router pure Java SE application FIX
More informationJava Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide. Release 10
Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide Release 10 E92394-01 March 2018 Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning
More informationTowards High Performance Processing in Modern Java-based Control Systems. Marek Misiowiec Wojciech Buczak, Mark Buttner CERN ICalepcs 2011
Towards High Performance Processing in Modern Java-based Control Systems Marek Misiowiec Wojciech Buczak, Mark Buttner CERN ICalepcs 2011 Performance with soft real time Distributed system - Monitoring
More informationOracle JD Edwards EnterpriseOne Object Usage Tracking Performance Characterization Using JD Edwards EnterpriseOne Object Usage Tracking
Oracle JD Edwards EnterpriseOne Object Usage Tracking Performance Characterization Using JD Edwards EnterpriseOne Object Usage Tracking ORACLE WHITE PAPER JULY 2017 Disclaimer The following is intended
More informationGarbage Collection (aka Automatic Memory Management) Douglas Q. Hawkins. Why?
Garbage Collection (aka Automatic Memory Management) Douglas Q. Hawkins http://www.dougqh.net dougqh@gmail.com Why? Leaky Abstraction 2 of 3 Optimization Flags Are For Memory Management Unfortunately,
More informationAcknowledgements These slides are based on Kathryn McKinley s slides on garbage collection as well as E Christopher Lewis s slides
Garbage Collection Last time Compiling Object-Oriented Languages Today Motivation behind garbage collection Garbage collection basics Garbage collection performance Specific example of using GC in C++
More informationConcurrent Garbage Collection
Concurrent Garbage Collection Deepak Sreedhar JVM engineer, Azul Systems Java User Group Bangalore 1 @azulsystems azulsystems.com About me: Deepak Sreedhar JVM student at Azul Systems Currently working
More informationKodewerk. Java Performance Services. The War on Latency. Reducing Dead Time Kirk Pepperdine Principle Kodewerk Ltd.
Kodewerk tm Java Performance Services The War on Latency Reducing Dead Time Kirk Pepperdine Principle Kodewerk Ltd. Me Work as a performance tuning freelancer Nominated Sun Java Champion www.kodewerk.com
More informationTHE TROUBLE WITH MEMORY
THE TROUBLE WITH MEMORY OUR MARKETING SLIDE Kirk Pepperdine Authors of jpdm, a performance diagnostic model Co-founded Building the smart generation of performance diagnostic tooling Bring predictability
More informationWelcome to the session...
Welcome to the session... Copyright 2013, Oracle and/or its affiliates. All rights reserved. 02/22/2013 1 The following is intended to outline our general product direction. It is intended for information
More informationHBase Practice At Xiaomi.
HBase Practice At Xiaomi huzheng@xiaomi.com About This Talk Async HBase Client Why Async HBase Client Implementation Performance How do we tuning G1GC for HBase CMS vs G1 Tuning G1GC G1GC in XiaoMi HBase
More informationOptimising Multicore JVMs. Khaled Alnowaiser
Optimising Multicore JVMs Khaled Alnowaiser Outline JVM structure and overhead analysis Multithreaded JVM services JVM on multicore An observational study Potential JVM optimisations Basic JVM Services
More informationA Side-channel Attack on HotSpot Heap Management. Xiaofeng Wu, Kun Suo, Yong Zhao, Jia Rao The University of Texas at Arlington
A Side-channel Attack on HotSpot Heap Management Xiaofeng Wu, Kun Suo, Yong Zhao, Jia Rao The University of Texas at Arlington HotCloud 18 July 9, 2018 1 Side-Channel Attack Attack based on information
More informationJDK 9/10/11 and Garbage Collection
JDK 9/10/11 and Garbage Collection Thomas Schatzl Senior Member of Technical Staf Oracle JVM Team May, 2018 thomas.schatzl@oracle.com Copyright 2017, Oracle and/or its afliates. All rights reserved. 1
More informationOracle Business Activity Monitoring 12c Best Practices ORACLE WHITE PAPER DECEMBER 2015
Oracle Business Activity Monitoring 12c Best Practices ORACLE WHITE PAPER DECEMBER 2015 Disclaimer The following is intended to outline our general product direction. It is intended for information purposes
More informationCA341 - Comparative Programming Languages
CA341 - Comparative Programming Languages David Sinclair Dynamic Data Structures Generally we do not know how much data a program will have to process. There are 2 ways to handle this: Create a fixed data
More informationManaged runtimes & garbage collection. CSE 6341 Some slides by Kathryn McKinley
Managed runtimes & garbage collection CSE 6341 Some slides by Kathryn McKinley 1 Managed runtimes Advantages? Disadvantages? 2 Managed runtimes Advantages? Reliability Security Portability Performance?
More informationOS-caused Long JVM Pauses - Deep Dive and Solutions
OS-caused Long JVM Pauses - Deep Dive and Solutions Zhenyun Zhuang LinkedIn Corp., Mountain View, California, USA https://www.linkedin.com/in/zhenyun Zhenyun@gmail.com 2016-4-21 Outline q Introduction
More informationIt s Good to Have (JVM) Options
It s Good to Have (JVM) Options Chris Hansen / Sr Engineering Manager / @cxhansen http://bit.ly/2g74cnh Tori Wieldt / Technical Evangelist / @ToriWieldt JavaOne 2017 Safe Harbor This presentation and the
More informationManaged runtimes & garbage collection
Managed runtimes Advantages? Managed runtimes & garbage collection CSE 631 Some slides by Kathryn McKinley Disadvantages? 1 2 Managed runtimes Portability (& performance) Advantages? Reliability Security
More informationOracle JD Edwards EnterpriseOne Object Usage Tracking Performance Characterization Using JD Edwards EnterpriseOne Object Usage Tracking
Oracle JD Edwards EnterpriseOne Object Usage Tracking Performance Characterization Using JD Edwards EnterpriseOne Object Usage Tracking ORACLE WHITE PAPER NOVEMBER 2017 Disclaimer The following is intended
More informationDynamic Selection of Application-Specific Garbage Collectors
Dynamic Selection of Application-Specific Garbage Collectors Sunil V. Soman Chandra Krintz University of California, Santa Barbara David F. Bacon IBM T.J. Watson Research Center Background VMs/managed
More informationInside Out: A Modern Virtual Machine Revealed
Inside Out: A Modern Virtual Machine Revealed John Coomes Brian Goetz Tony Printezis Sun Microsystems Some Questions > Why not compile my program to an executable ahead of time? > Why can't I tell the
More informationJava Performance: The Definitive Guide
Java Performance: The Definitive Guide Scott Oaks Beijing Cambridge Farnham Kbln Sebastopol Tokyo O'REILLY Table of Contents Preface ix 1. Introduction 1 A Brief Outline 2 Platforms and Conventions 2 JVM
More informationDesigning experiments Performing experiments in Java Intel s Manycore Testing Lab
Designing experiments Performing experiments in Java Intel s Manycore Testing Lab High quality results that capture, e.g., How an algorithm scales Which of several algorithms performs best Pretty graphs
More informationPause-Less GC for Improving Java Responsiveness. Charlie Gracie IBM Senior Software charliegracie
Pause-Less GC for Improving Java Responsiveness Charlie Gracie IBM Senior Software Developer charlie_gracie@ca.ibm.com @crgracie charliegracie 1 Important Disclaimers THE INFORMATION CONTAINED IN THIS
More informationContents. Created by: Raúl Castillo
Contents 1. Introduction... 3 2. he garbage collector... 3 3. Some concepts regarding to garbage collection... 4 4. ypes of references in Java... 7 5. Heap based on generations... 9 6. Garbage collection
More informationLesson 2 Dissecting Memory Problems
Lesson 2 Dissecting Memory Problems Poonam Parhar JVM Sustaining Engineer Oracle Agenda 1. Symptoms of Memory Problems 2. Causes of Memory Problems 3. OutOfMemoryError messages 3 Lesson 2-1 Symptoms of
More informationJava Garbage Collection Best Practices For Tuning GC
Neil Masson, Java Support Technical Lead Java Garbage Collection Best Practices For Tuning GC Overview Introduction to Generational Garbage Collection The tenured space aka the old generation The nursery
More informationGarbage collection. The Old Way. Manual labor. JVM and other platforms. By: Timo Jantunen
Garbage collection By: Timo Jantunen JVM and other platforms In computer science, garbage collection (gc) can mean few different things depending on context and definition. In this post, it means "freeing
More informationGenerational Garbage Collection Theory and Best Practices
Chris Bailey, Java Support Architect Generational Garbage Collection Theory and Best Practices Overview Introduction to Generational Garbage Collection The nursery space aka the young generation The tenured
More informationJava Without the Jitter
TECHNOLOGY WHITE PAPER Achieving Ultra-Low Latency Table of Contents Executive Summary... 3 Introduction... 4 Why Java Pauses Can t Be Tuned Away.... 5 Modern Servers Have Huge Capacities Why Hasn t Latency
More informationJVM Performance Tuning with respect to Garbage Collection(GC) policies for WebSphere Application Server V6.1 - Part 1
IBM Software Group JVM Performance Tuning with respect to Garbage Collection(GC) policies for WebSphere Application Server V6.1 - Part 1 Giribabu Paramkusham Ajay Bhalodia WebSphere Support Technical Exchange
More informationJava On Steroids: Sun s High-Performance Java Implementation. History
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
More informationMission Possible - Near zero overhead profiling. Klara Ward Principal Software Developer Java Mission Control team, Oracle February 6, 2018
Mission Possible - Near zero overhead profiling Klara Ward Principal Software Developer Java Mission Control team, Oracle February 6, 2018 Hummingbird image by Yutaka Seki is licensed under CC BY 2.0 Copyright
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Memory Management and Garbage Collection CMSC 330 - Spring 2013 1 Memory Attributes! Memory to store data in programming languages has the following lifecycle
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Memory Management and Garbage Collection CMSC 330 Spring 2017 1 Memory Attributes Memory to store data in programming languages has the following lifecycle
More informationEnd-to-End Java Security Performance Enhancements for Oracle SPARC Servers Performance engineering for a revenue product
End-to-End Java Security Performance Enhancements for Oracle SPARC Servers Performance engineering for a revenue product Luyang Wang, Pallab Bhattacharya, Yao-Min Chen, Shrinivas Joshi and James Cheng
More informationGarbage Collection. Akim D le, Etienne Renault, Roland Levillain. May 15, CCMP2 Garbage Collection May 15, / 35
Garbage Collection Akim Demaille, Etienne Renault, Roland Levillain May 15, 2017 CCMP2 Garbage Collection May 15, 2017 1 / 35 Table of contents 1 Motivations and Definitions 2 Reference Counting Garbage
More informationAzul Systems, Inc.
1 Stack Based Allocation in the Azul JVM Dr. Cliff Click cliffc@azulsystems.com 2005 Azul Systems, Inc. Background The Azul JVM is based on Sun HotSpot a State-of-the-Art Java VM Java is a GC'd language
More informationEfficient Runtime Tracking of Allocation Sites in Java
Efficient Runtime Tracking of Allocation Sites in Java Rei Odaira, Kazunori Ogata, Kiyokuni Kawachiya, Tamiya Onodera, Toshio Nakatani IBM Research - Tokyo Why Do You Need Allocation Site Information?
More informationWhat's new in MySQL 5.5? Performance/Scale Unleashed
What's new in MySQL 5.5? Performance/Scale Unleashed Mikael Ronström Senior MySQL Architect The preceding is intended to outline our general product direction. It is intended for
More informationThe following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material,
More informationHeap Management. Heap Allocation
Heap Management Heap Allocation A very flexible storage allocation mechanism is heap allocation. Any number of data objects can be allocated and freed in a memory pool, called a heap. Heap allocation is
More informationSustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java)
COMP 412 FALL 2017 Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java) Copyright 2017, Keith D. Cooper & Zoran Budimlić, all rights reserved. Students enrolled in Comp 412 at Rice
More informationThe C4 Collector. Or: the Application memory wall will remain until compaction is solved. Gil Tene Balaji Iyengar Michael Wolf
The C4 Collector Or: the Application memory wall will remain until compaction is solved Gil Tene Balaji Iyengar Michael Wolf High Level Agenda 1. The Application Memory Wall 2. Generational collection
More informationThe Google File System
The Google File System Sanjay Ghemawat, Howard Gobioff and Shun Tak Leung Google* Shivesh Kumar Sharma fl4164@wayne.edu Fall 2015 004395771 Overview Google file system is a scalable distributed file system
More informationHierarchical PLABs, CLABs, TLABs in Hotspot
Hierarchical s, CLABs, s in Hotspot Christoph M. Kirsch ck@cs.uni-salzburg.at Hannes Payer hpayer@cs.uni-salzburg.at Harald Röck hroeck@cs.uni-salzburg.at Abstract Thread-local allocation buffers (s) are
More informationHabanero Extreme Scale Software Research Project
Habanero Extreme Scale Software Research Project Comp215: Garbage Collection Zoran Budimlić (Rice University) Adapted from Keith Cooper s 2014 lecture in COMP 215. Garbage Collection In Beverly Hills...
More informationPERFORMANCE ANALYSIS AND OPTIMIZATION OF SKIP LISTS FOR MODERN MULTI-CORE ARCHITECTURES
PERFORMANCE ANALYSIS AND OPTIMIZATION OF SKIP LISTS FOR MODERN MULTI-CORE ARCHITECTURES Anish Athalye and Patrick Long Mentors: Austin Clements and Stephen Tu 3 rd annual MIT PRIMES Conference Sequential
More informationCMSC 330: Organization of Programming Languages. Memory Management and Garbage Collection
CMSC 330: Organization of Programming Languages Memory Management and Garbage Collection CMSC330 Fall 2018 1 Memory Attributes Memory to store data in programming languages has the following lifecycle
More informationSimple Garbage Collection and Fast Allocation Andrew W. Appel
Simple Garbage Collection and Fast Allocation Andrew W. Appel Presented by Karthik Iyer Background Motivation Appel s Technique Terminology Fast Allocation Arranging Generations Invariant GC Working Heuristic
More informationHard Real-Time Garbage Collection in Java Virtual Machines
Hard Real-Time Garbage Collection in Java Virtual Machines... towards unrestricted real-time programming in Java Fridtjof Siebert, IPD, University of Karlsruhe 1 Jamaica Systems Structure Exisiting GC
More informationCopyright 2011, Oracle and/or its affiliates. All rights reserved.
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material,
More informationA new Mono GC. Paolo Molaro October 25, 2006
A new Mono GC Paolo Molaro lupus@novell.com October 25, 2006 Current GC: why Boehm Ported to the major architectures and systems Featurefull Very easy to integrate Handles managed pointers in unmanaged
More informationA Tour to Spur for Non-VM Experts. Guille Polito, Christophe Demarey ESUG 2016, 22/08, Praha
A Tour to Spur for Non-VM Experts Guille Polito, Christophe Demarey ESUG 2016, 22/08, Praha From a user point of view We are working on the new Pharo Kernel Bootstrap: create an image from scratch - Classes
More informationRuntime Application Self-Protection (RASP) Performance Metrics
Product Analysis June 2016 Runtime Application Self-Protection (RASP) Performance Metrics Virtualization Provides Improved Security Without Increased Overhead Highly accurate. Easy to install. Simple to
More informationThe Google File System
The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung SOSP 2003 presented by Kun Suo Outline GFS Background, Concepts and Key words Example of GFS Operations Some optimizations in
More informationHigh-Level Language VMs
High-Level Language VMs Outline Motivation What is the need for HLL VMs? How are these different from System or Process VMs? Approach to HLL VMs Evolutionary history Pascal P-code Object oriented HLL VMs
More informationZing Vision. Answering your toughest production Java performance questions
Zing Vision Answering your toughest production Java performance questions Outline What is Zing Vision? Where does Zing Vision fit in your Java environment? Key features How it works Using ZVRobot Q & A
More informationMemory Usage. Chapter 23
C23621721.fm Page 280 Wednesday, January 12, 2005 10:52 PM Chapter 23 Memory Usage The garbage collector is one of the most sophisticated pieces of the Microsoft.NET Framework architecture. Each time an
More informationCS 241 Honors Memory
CS 241 Honors Memory Ben Kurtovic Atul Sandur Bhuvan Venkatesh Brian Zhou Kevin Hong University of Illinois Urbana Champaign February 20, 2018 CS 241 Course Staff (UIUC) Memory February 20, 2018 1 / 35
More informationOracle JRockit. Performance Tuning Guide Release R28 E
Oracle JRockit Performance Tuning Guide Release R28 E15060-04 December 2011 Oracle JRockit Performance Tuning Guide, Release R28 E15060-04 Copyright 2001, 2011, Oracle and/or its affiliates. All rights
More informationMyths and Realities: The Performance Impact of Garbage Collection
Myths and Realities: The Performance Impact of Garbage Collection Tapasya Patki February 17, 2011 1 Motivation Automatic memory management has numerous software engineering benefits from the developer
More information