SlideShare uma empresa Scribd logo
1 de 55
Baixar para ler offline
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 and self-learning

algorithms
─ Most recent: Product Manager for Azul Systems’ scalable
Java Platform Zing

• I like new ideas and brave thinking!

©2011 Azul Systems, Inc.

2
Agenda
•
•
•
•
•

What is a JVM?
What the JVM enables for Java

Compilers and optimization
Garbage collection and the pain of fragmentation
What to (not) think about

©2011 Azul Systems, Inc.

3
What is a Java Virtual Machine (JVM)?
• Java
─ But these days JVMs can handle other dynamic languages too

(Scala, Groovy, Clojure…)

• Virtual
─ A great abstraction that allows programmers to focus on value-

add elsewhere

• Machine
─ Manages resources and instruction execution

©2011 Azul Systems, Inc.

4
What is a Java Virtual Machine (JVM)?
• A JVM described in a simple sentence
A software module that provides the same execution
environment to all Java applications, and takes care of the
“translation” to the underlying layers with regards to execution of
instructions and resource management.

©2011 Azul Systems, Inc.

5
What is a Java Virtual Machine (JVM)?
• Key benefits of Java, enabled by the JVM
─ Portability
─ “Non-explicity”

• Other error-preventing and convenient services of the
JVM
─
─
─
─
─
─
─
─

Consistent Thread Model
Optimizes and Manages Locking
Enforces Type Safety
Dynamic Code Loading
Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime)
Internal introspection
Access to huge pre-built library
Access to OS and environmental information

©2011 Azul Systems, Inc.

6
What is a Java Virtual Machine (JVM)?
• Key benefits of Java, enabled by the JVM
─ Portability
─ “Non-explicity”

• Other error-preventing and convenient services of the
JVM
─
─
─
─
─
─
─
─

Consistent Thread Model
Optimizes and Manages Locking
Enforces Type Safety
Dynamic Code Loading
Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime)
Internal introspection
Access to huge pre-built library
Access to OS and environmental information

©2011 Azul Systems, Inc.

7
Portability
Write once, run everywhere
Same code!

Java
Application

JVM

JVM

Operating
System

Operating
System

Hardware
Architecture

©2011 Azul Systems, Inc.

Java
Application

Hardware
Architecture

8
What Makes Portability Possible?
• javac – takes Java source code compiles it into bytecode
─ MyApp.java  MyApp.class

• Bytecode can be “translated” by JVMs into HW
instructions
─ Anywhere the JVM runs…

• Two paths of “translation”
─ Interpretation
─
─

The “dictionary” approach
Look up instruction, execute

─ Compilation (JIT)
─
─

©2011 Azul Systems, Inc.

The “intelligent translator”
Profile, analyze, execute faster

9
JVM Compilers
• Common concepts:
─ Hotspot detection, Re-compilation, and De-compilation

• Optimizations need resources
─ Temporary “JVM memory”
─ “Compiler threads”
─ Cost is covered by the faster execution time

• Different compilers for different needs
─ Client (“C1”), quicker compilation time, less optimized code
─ Server (“C2”), slower compilation time, more optimized code
─ Tiered, both C1 and C2
─ C1’s profiling used for C2’s compilation

©2011 Azul Systems, Inc.

10
Exploring JIT Compilation
Example 1: Dead Code Elimination

• Eliminates code that does not affect the program
• The compiler finds the “dead” code and eliminates the
instruction set for it
─ Reduces the program size
─ Prevents irrelevant operations to occupy time in the CPU

• Example:
int timeToScaleMyApp(boolean endlessOfResources) {
int reArchitect = 24;
int patchByClustering = 15;
int useZing = 2;
if (endlessOfResources)
return reArchitect + useZing;
else
return useZing;
}
©2011 Azul Systems, Inc.

11
Exploring JIT Compilation
Example 1: Dead Code Elimination

• Eliminates code that does not affect the program
• The compiler finds the “dead” code and eliminates the
instruction set for it
─ Reduces the program size
─ Prevents irrelevant operations to occupy time in the CPU

• Example:
int timeToScaleMyApp(boolean endlessOfResources) {
int reArchitect = 24;
int useZing = 2;
if (endlessOfResources)
return reArchitect + useZing;
else
return useZing;
}
©2011 Azul Systems, Inc.

12
Exploring JIT Compilation
Example 2: Inlining

int whenToEvaluateZing(int y) {
return daysLeft(y) + daysLeft(0) + daysLeft(y+1);
}

int daysLeft(int x) {
if (x == 0)
return 0;

Each method call
takes time, and causes
extra jump instructions
to be executed
©2011 Azul Systems, Inc.

else
return x - 1;
}

13
Exploring JIT Compilation
Example 2: Inlining

int whenToEvaluateZing(int y) {
int temp = 0;
if (y == 0) temp += 0; else temp += y - 1;
if (0 == 0) temp += 0; else temp += 0 - 1;
if (y+1 == 0) temp += 0; else temp += (y + 1) - 1;
return temp;
}

Eliminating multiple method
calls by inlining the method
itself, speeds up the
execution

©2011 Azul Systems, Inc.

14
Exploring JIT Compilation
Example 2: Inlining

int whenToEvaluateZing(int y) {
if (y == 0) return y;
else if (y == -1) return y - 1;
else return y + y - 1;
}

Further optimizations can
often be applied to speed up
even more….

©2011 Azul Systems, Inc.

15
Exploring JIT Compilation
Example 2: Redundancy Removal

• Common situation after inlining:
─ Method “foo” inlined in multiple places
─ Could lead to execution of the same tasks multiple times
─
─
─

Assignment of values to variables
Additions or other operations
Other…

─ Optimize to only have to do the redundant instructions once

• Elimination of redundancy speeds up the code execution

©2011 Azul Systems, Inc.

16
Summary on Portability and Compilers
• Since the JVM Compiler does the “translation” and
optimization for you, you don’t need to think about:

─ Different HW instruction sets
─ How to write your methods in a more instruction friendly way
─ How calls to other methods may impact execution performance

• Unless you want to? 

©2011 Azul Systems, Inc.

17
Break?

©2011 Azul Systems, Inc.

18
What is a Java Virtual Machine (JVM)?
• Key benefits of Java, enabled by the JVM
─ Portability
─ “Non-explicity”

• Other error-preventing and convenient services of the
JVM
─
─
─
─
─
─
─
─

Consistent Thread Model
Optimizes and Manages Locking
Enforces Type Safety
Dynamic Code Loading
Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime)
Internal introspection services
Access to huge pre-built library
Access to OS and environmental information

©2011 Azul Systems, Inc.

19
What is a Java Virtual Machine (JVM)?
• Key benefits of Java, enabled by the JVM
─ Portability
─ “Non-explicity”

• Other error-preventing and convenient services of the
JVM
─
─
─
─
─
─
─
─

Consistent Thread Model
Optimizes and Manages Locking
Enforces Type Safety
Dynamic Code Loading
Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime)
Internal introspection services
Access to huge pre-built library
Access to OS and environmental information

©2011 Azul Systems, Inc.

20
Non-Explicity

import java.io.*;
class ZingFan {
private String myName;
public ZingFan(String name){
myName = name;
}

Just type “new” to
get the memory you
need

public String getName() {
return myName;
}
public static void main (String args[ ]){
ZingFan me = new ZingFan("Eva");
System.out.println(me.getName());
}

No need to track or
free used memory!

}

©2011 Azul Systems, Inc.

21
Garbage Collection
• Dynamic Memory Management – The perceived pain that
really comes with all the goodness

• Allocation and Garbage Collection
─ Parallel
─ Concurrent
─ Generational
─ Fragmentation and Compaction
─ The torture of tuning most JVMs

©2011 Azul Systems, Inc.

22
Allocation & Garbage Collection
• Java Heap (-Xmx)
• JVM Internal Memory
• Top: RES / RSS --- total memory footprint

Java Heap
•

Where all Java Objects are allocated

JVM Internal
Memory
•
•
•
•

©2011 Azul Systems, Inc.

Code Cache
VM threads
VM Structs
GC Memory

23
Allocation & Garbage Collection
• Thread Local Allocation
Thread B

Object Foo

Java Heap
Thread Local Area B

Old
Object

Thread Local Area A

Old
Object

Thread A
©2011 Azul Systems, Inc.

Object
Bar

24
Allocation & Garbage Collection
• Garbage Collection
Thread B

Java Heap

Old
Object

???

Object
NoFit

Reference

Object Foo

Object
Bar

Old
Object

Thread A
©2011 Azul Systems, Inc.

25
Garbage Collection
• Parallel Garbage Collection
─ Stop the world
Thread B

Object
NoFit

Reference

Java Heap

Old
Object

Object Foo

Object
Bar

Old
Object

GC Thread
©2011 Azul Systems, Inc.

26
Garbage Collection
• Parallel Garbage Collection
─ Stop the world
Thread B

Object
NoFit

Reference

Java Heap

Old
Object

Object Foo

Object
Bar

Old
Object

GC Thread
©2011 Azul Systems, Inc.

27
Garbage Collection
• Parallel Garbage Collection
─ Stop the world
Thread B

Object
NoFit

Reference

Java Heap

Old
Object

Object Foo

Object
Bar

Old
Object

GC Thread
©2011 Azul Systems, Inc.

28
Garbage Collection
• Parallel Garbage Collection
─ Stop the world
Thread B

Reference

Object
NoFit

Java Heap

Object Foo

Object
Bar

GC Thread
©2011 Azul Systems, Inc.

29
Garbage Collection
• Parallel Garbage Collection
─ Stop the world
Thread B

Reference

Object
NoFit

Java Heap

Object Foo

Object
Bar

Thread A
©2011 Azul Systems, Inc.

30
Garbage Collection
• Parallel Garbage Collection
─ Stop the world
Thread B

Reference

Java Heap

Object
NoFit

Object Foo

Object
Bar

Thread A
©2011 Azul Systems, Inc.

31
Garbage Collection
• Concurrent Garbage Collection
─ While application is running
Thread B

Object Foo

Java Heap

Old
Object

Object
Bar

Old
Object

Reference
GC Thread
©2011 Azul Systems, Inc.

32
Garbage Collection
• Concurrent Garbage Collection
─ While application is running
Thread B

Java Heap

Old
Object

Object Foo

Object
Bar

Old
Object

Reference
GC Thread
©2011 Azul Systems, Inc.

33
Garbage Collection
• Concurrent Garbage Collection
─ While application is running
Thread B

Java Heap

Old
Object

Object Foo

Object
Bar

Old
Object

Reference
GC Thread
©2011 Azul Systems, Inc.

34
Garbage Collection
• Concurrent Garbage Collection
─ While application is running
Thread B

Java Heap

Old
Object

Object Foo

Object
Bar

Reference
GC Thread
©2011 Azul Systems, Inc.

35
Fragmentation
• When there is room on the heap
─ But not large enough…
─ Even after GC…
Thread B
???

Java Heap

Object
Bar

©2011 Azul Systems, Inc.

Object Foo

Object
NoFit

Older
Object

36
Generational Garbage Collection
• Most objects die young…

Thread B

Object
NoFit

???

Java Heap

Object
Bar

Young Generation
©2011 Azul Systems, Inc.

Older
Object

Object Foo

Old Generation
37
Generational Garbage Collection
• Most objects die young…

Thread B

Object
NoFit

???

Java Heap

Object
Bar

Young Generation
©2011 Azul Systems, Inc.

Object Foo

Older
Object

Old Generation
38
Generational Garbage Collection
• Most objects die young…

Thread B

Object
NoFit

Java Heap

Older
Object

Young Generation
©2011 Azul Systems, Inc.

Old Generation
39
Generational Garbage Collection
• Most objects die young…

Thread B

Java Heap

Object
NoFit

Young Generation
©2011 Azul Systems, Inc.

Older
Object

Old Generation
40
Generational Garbage Collection
• Promotion

???

Thread B

Object
YGCTrig

Java Heap

Object
NoFit
Young Generation

©2011 Azul Systems, Inc.

Many Young Objects

Older
Object
Old Generation

41
Generational Garbage Collection
• Promotion
•
•
???

Thread B

Less fragmented memory
Delays “worst case”

Object
YGCTrig

Java Heap

Many Young Objects
Young Generation

©2011 Azul Systems, Inc.

Older
Object

Object
NoFit
Old Generation

42
Generational Garbage Collection
• Promotion
•
•
Thread B

Less fragmented memory
Delays “worst case”

Object
YGCTrig

Java Heap

Older
Object
Young Generation

©2011 Azul Systems, Inc.

Object
NoFit
Old Generation

43
Generational Garbage Collection
• Promotion
•
•

Less fragmented memory
Delays “worst case”

Thread B

Java Heap

Object
YGCTrig
Young Generation

©2011 Azul Systems, Inc.

Older
Object

Object
NoFit
Old Generation

44
Compaction
• Move objects together
─ To fit larger objects
─ Eliminate small un-useful memory gaps

???

Java Heap

Object
NoFit
Young Generation

©2011 Azul Systems, Inc.

Object
Bar

Object Foo

Older
Object
Old Generation

45
Compaction
• Move objects together
─ To fit larger objects
─ Eliminate small un-useful memory gaps

Java Heap

Object
NoFit
Young Generation

©2011 Azul Systems, Inc.

Object
Bar

Object Foo

Older
Object

Old Generation

46
Compaction
• Move objects together
─ To fit larger objects
─ Eliminate small un-useful memory gaps

Java Heap

Object
NoFit
Young Generation

©2011 Azul Systems, Inc.

Object
Bar

Object Foo

Older
Object

Old Generation

47
Compaction
• Generational GC helps delay, but does not “solve”
fragmentation

• Compaction is inevitable
─ When moving objects, you need to update references
─ Most JVMs have to stop the world as part of compaction

• Many approaches to shorten compaction impact
─
─
─
─

Partitioned compaction
Time controlled compaction
“Best result” calculations on what areas to compact
Reference counting

©2011 Azul Systems, Inc.

48
Pain of Tuning
• -Xmx – hast to be set “right”
─ Exactly the amount you need for your worst case load
─ Too much – waste of resources
─ Too little – OutOfMemoryError
─ Unpredictable loads and missconfiguration cause a lot of down-

time

• Example of production-tuned CMS:

©2011 Azul Systems, Inc.

49
Biggest Java Scalability Limitation
• For MOST JVMs, compaction pauses are the biggest
current challenge and key limiting factor to Java
scalability

• The larger heap and live data / references to follow, the
bigger challenge for compaction

• Today: most JVMs limited to 3-4GB
─
─
─
─

To keep “FullGC” pause times within SLAs
Design limitations to make applications survive in 4GB chunks
Horizontal scale out / clustering solutions
In spite of machine memory increasing over the years…

 This is why I find Zing so interesting, as it has implemented concurrent
compaction…
─ But that is not the topic of this presentation… 

©2011 Azul Systems, Inc.

50
2c for the Road
What to (not) Think About

1. Why not use multiple threads, when you can?
─

Number of cores per server continues to grow…

2. Don’t be afraid of garbage, it is good!
3. I personally don’t like finalizers…error prone, not
guaranteed to run (resource wasting)

4. Always be careful around locking
─

If it passes testing, hot locks can still block during production load

5. Benchmarks are often focused on throughput, but miss out
on real GC impact – test your real application!
─
─

“Full GC” never occurs during the run, not running long enough to
see impact of fragmentation
Response time std dev and outliers (99.9…%) are of importance
for a real world app, not throughput alone!!

©2011 Azul Systems, Inc.

51
Summary
• JVM – a great abstraction, provides convenient services
so the Java programmer doesn’t have to deal with
environment specific things

• Compiler – “intelligent and context-aware translator” who
helps speed up your application

• Garbage Collector – simplifies memory management,
different flavors for different needs

• Compaction – an inevitable task, which impact grows with
live size and data complexity for most JVMs, and the
current largest limiter of Java Scalability

©2011 Azul Systems, Inc.

52
For the Curious: What is Zing?
• Azul Systems has developed scalable Java platforms for
8+ years
─ Vega product line based on proprietary chip architecture, kernel

enhancements, and JVM innovation
─ Zing product line based on x86 chip architecture, virtualization
and kernel enhancements, and JVM innovation

• Most famous for our Generational Pauseless Garbage
Collector, which performs fully concurrent compaction

©2011 Azul Systems, Inc.

53
Q&A

eva.andreasson@azulsystems.com
http://twitter.com/AzulSystemsPM
www.azulsystems.com/zing

©2011 Azul Systems, Inc.

54
Additional Resources
• For more information on…
…JDK internals: http://openjdk.java.net/ (JVM source code)
…Memory management:
http://java.sun.com/j2se/reference/whitepapers/memorymanagement_w
hitepaper.pdf (a bit old, but very comprehensive)
…Tuning:
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/genin
fo/diagnos/tune_stable_perf.html (watch out for increased rigidity and
re-tuning pain)
…Generational Pauseless Garbage Collection:
http://www.azulsystems.com/webinar/pauseless-gc (webinar by Gil
Tene, 2011)
…Compiler internals and optimizations:
http://www.azulsystems.com/blogs/cliff (Dr Cliff Click’s blog)

©2011 Azul Systems, Inc.

55

Mais conteúdo relacionado

Mais procurados (20)

Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
Java Virtual Machine
Java Virtual MachineJava Virtual Machine
Java Virtual Machine
 
Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentation
 
3. jvm
3. jvm3. jvm
3. jvm
 
Jvm
JvmJvm
Jvm
 
JVM
JVMJVM
JVM
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
JVM
JVMJVM
JVM
 
Java architecture
Java architectureJava architecture
Java architecture
 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
 
Java Development Kit (jdk)
Java Development Kit (jdk)Java Development Kit (jdk)
Java Development Kit (jdk)
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVMJava Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
 
Byte code jvm
Byte code jvmByte code jvm
Byte code jvm
 
Advanced java-training-in-bangalore
Advanced java-training-in-bangaloreAdvanced java-training-in-bangalore
Advanced java-training-in-bangalore
 
Java JVM
Java JVMJava JVM
Java JVM
 
CS Lesson: Introduction to the Java virtual Machine
CS Lesson: Introduction to the Java virtual MachineCS Lesson: Introduction to the Java virtual Machine
CS Lesson: Introduction to the Java virtual Machine
 

Destaque

What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?Azul Systems Inc.
 
Towards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleTowards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleAzul Systems Inc.
 
Priming Java for Speed at Market Open
Priming Java for Speed at Market OpenPriming Java for Speed at Market Open
Priming Java for Speed at Market OpenAzul Systems Inc.
 
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)Azul Systems Inc.
 
Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...Azul Systems Inc.
 
ObjectLayout: Closing the (last?) inherent C vs. Java speed gap
ObjectLayout: Closing the (last?) inherent C vs. Java speed gapObjectLayout: Closing the (last?) inherent C vs. Java speed gap
ObjectLayout: Closing the (last?) inherent C vs. Java speed gapAzul Systems Inc.
 
Experiences with Debugging Data Races
Experiences with Debugging Data RacesExperiences with Debugging Data Races
Experiences with Debugging Data RacesAzul Systems Inc.
 
How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkAzul Systems Inc.
 
The Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVMThe Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVMAzul Systems Inc.
 
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!Azul Systems Inc.
 
Lock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash TableLock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash TableAzul Systems Inc.
 
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie EnvironmentsDotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie EnvironmentsAzul Systems Inc.
 
Zulu Embedded Java Introduction
Zulu Embedded Java IntroductionZulu Embedded Java Introduction
Zulu Embedded Java IntroductionAzul Systems Inc.
 

Destaque (17)

Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
 
Towards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleTowards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding Style
 
Priming Java for Speed at Market Open
Priming Java for Speed at Market OpenPriming Java for Speed at Market Open
Priming Java for Speed at Market Open
 
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
 
Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...
 
ObjectLayout: Closing the (last?) inherent C vs. Java speed gap
ObjectLayout: Closing the (last?) inherent C vs. Java speed gapObjectLayout: Closing the (last?) inherent C vs. Java speed gap
ObjectLayout: Closing the (last?) inherent C vs. Java speed gap
 
Experiences with Debugging Data Races
Experiences with Debugging Data RacesExperiences with Debugging Data Races
Experiences with Debugging Data Races
 
How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a Microbenchmark
 
The Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVMThe Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVM
 
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
 
Lock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash TableLock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash Table
 
Understanding JVM
Understanding JVMUnderstanding JVM
Understanding JVM
 
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie EnvironmentsDotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
 
Zulu Embedded Java Introduction
Zulu Embedded Java IntroductionZulu Embedded Java Introduction
Zulu Embedded Java Introduction
 
Java vs. C/C++
Java vs. C/C++Java vs. C/C++
Java vs. C/C++
 
C++vs java
C++vs javaC++vs java
C++vs java
 

Semelhante a What's Inside a JVM?

JVM Memory Management Details
JVM Memory Management DetailsJVM Memory Management Details
JVM Memory Management DetailsAzul Systems Inc.
 
javalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdfjavalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdfRichHagarty
 
Cloud Native Compiler
Cloud Native CompilerCloud Native Compiler
Cloud Native CompilerSimon Ritter
 
Java-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfJava-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfRichHagarty
 
Simple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmSimple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmJamie Coleman
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2SM Rasel
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMJamie Coleman
 
JITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdfJITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdfRichHagarty
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications OpenEBS
 
No Compromise - Better, Stronger, Faster Java in the Cloud
No Compromise - Better, Stronger, Faster Java in the CloudNo Compromise - Better, Stronger, Faster Java in the Cloud
No Compromise - Better, Stronger, Faster Java in the CloudAll Things Open
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarArun Kumar
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarArun Kumar
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLNordic APIs
 
Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...InfinIT - Innovationsnetværket for it
 
Performance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsPerformance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsMaarten Smeets
 
Distributed Testing Environment
Distributed Testing EnvironmentDistributed Testing Environment
Distributed Testing EnvironmentŁukasz Morawski
 

Semelhante a What's Inside a JVM? (20)

JVM Memory Management Details
JVM Memory Management DetailsJVM Memory Management Details
JVM Memory Management Details
 
javalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdfjavalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdf
 
Cloud Native Compiler
Cloud Native CompilerCloud Native Compiler
Cloud Native Compiler
 
Java-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfJava-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdf
 
Simple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmSimple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvm
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVM
 
JITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdfJITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdf
 
Java1 in mumbai
Java1 in mumbaiJava1 in mumbai
Java1 in mumbai
 
Elatt Presentation
Elatt PresentationElatt Presentation
Elatt Presentation
 
Værktøjer udviklet på AAU til analyse af SCJ programmer
Værktøjer udviklet på AAU til analyse af SCJ programmerVærktøjer udviklet på AAU til analyse af SCJ programmer
Værktøjer udviklet på AAU til analyse af SCJ programmer
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
 
No Compromise - Better, Stronger, Faster Java in the Cloud
No Compromise - Better, Stronger, Faster Java in the CloudNo Compromise - Better, Stronger, Faster Java in the Cloud
No Compromise - Better, Stronger, Faster Java in the Cloud
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumar
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumar
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of ML
 
Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...
 
Node js internal
Node js internalNode js internal
Node js internal
 
Performance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsPerformance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMs
 
Distributed Testing Environment
Distributed Testing EnvironmentDistributed Testing Environment
Distributed Testing Environment
 

Mais de Azul Systems Inc.

Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017Azul Systems Inc.
 
Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017Azul Systems Inc.
 
Azul Systems open source guide
Azul Systems open source guideAzul Systems open source guide
Azul Systems open source guideAzul Systems Inc.
 
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and ToolsIntelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and ToolsAzul Systems Inc.
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage CollectionAzul Systems Inc.
 
The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014Azul Systems Inc.
 
Push Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and ZingPush Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and ZingAzul Systems Inc.
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java BenchmarkingAzul Systems Inc.
 
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Systems Inc.
 
Understanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About ThemUnderstanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About ThemAzul Systems Inc.
 
JVM Mechanics: A Peek Under the Hood
JVM Mechanics: A Peek Under the HoodJVM Mechanics: A Peek Under the Hood
JVM Mechanics: A Peek Under the HoodAzul Systems Inc.
 
Enterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up SearchEnterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up SearchAzul Systems Inc.
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItAzul Systems Inc.
 
Enabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive ApplicationsEnabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive ApplicationsAzul Systems Inc.
 
Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013Azul Systems Inc.
 

Mais de Azul Systems Inc. (15)

Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017
 
Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017
 
Azul Systems open source guide
Azul Systems open source guideAzul Systems open source guide
Azul Systems open source guide
 
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and ToolsIntelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage Collection
 
The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014
 
Push Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and ZingPush Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and Zing
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java Benchmarking
 
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
 
Understanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About ThemUnderstanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About Them
 
JVM Mechanics: A Peek Under the Hood
JVM Mechanics: A Peek Under the HoodJVM Mechanics: A Peek Under the Hood
JVM Mechanics: A Peek Under the Hood
 
Enterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up SearchEnterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up Search
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About It
 
Enabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive ApplicationsEnabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive Applications
 
Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

What's Inside a JVM?

  • 1. A JVM Does What? Eva Andreasson Product Manager, Azul Systems
  • 2. Presenter • Eva Andreasson – Innovator & Problem solver ─ Implemented the Deterministic GC of JRockit Real Time ─ Awarded patents on GC heuristics and self-learning algorithms ─ Most recent: Product Manager for Azul Systems’ scalable Java Platform Zing • I like new ideas and brave thinking! ©2011 Azul Systems, Inc. 2
  • 3. Agenda • • • • • What is a JVM? What the JVM enables for Java Compilers and optimization Garbage collection and the pain of fragmentation What to (not) think about ©2011 Azul Systems, Inc. 3
  • 4. What is a Java Virtual Machine (JVM)? • Java ─ But these days JVMs can handle other dynamic languages too (Scala, Groovy, Clojure…) • Virtual ─ A great abstraction that allows programmers to focus on value- add elsewhere • Machine ─ Manages resources and instruction execution ©2011 Azul Systems, Inc. 4
  • 5. What is a Java Virtual Machine (JVM)? • A JVM described in a simple sentence A software module that provides the same execution environment to all Java applications, and takes care of the “translation” to the underlying layers with regards to execution of instructions and resource management. ©2011 Azul Systems, Inc. 5
  • 6. What is a Java Virtual Machine (JVM)? • Key benefits of Java, enabled by the JVM ─ Portability ─ “Non-explicity” • Other error-preventing and convenient services of the JVM ─ ─ ─ ─ ─ ─ ─ ─ Consistent Thread Model Optimizes and Manages Locking Enforces Type Safety Dynamic Code Loading Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime) Internal introspection Access to huge pre-built library Access to OS and environmental information ©2011 Azul Systems, Inc. 6
  • 7. What is a Java Virtual Machine (JVM)? • Key benefits of Java, enabled by the JVM ─ Portability ─ “Non-explicity” • Other error-preventing and convenient services of the JVM ─ ─ ─ ─ ─ ─ ─ ─ Consistent Thread Model Optimizes and Manages Locking Enforces Type Safety Dynamic Code Loading Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime) Internal introspection Access to huge pre-built library Access to OS and environmental information ©2011 Azul Systems, Inc. 7
  • 8. Portability Write once, run everywhere Same code! Java Application JVM JVM Operating System Operating System Hardware Architecture ©2011 Azul Systems, Inc. Java Application Hardware Architecture 8
  • 9. What Makes Portability Possible? • javac – takes Java source code compiles it into bytecode ─ MyApp.java  MyApp.class • Bytecode can be “translated” by JVMs into HW instructions ─ Anywhere the JVM runs… • Two paths of “translation” ─ Interpretation ─ ─ The “dictionary” approach Look up instruction, execute ─ Compilation (JIT) ─ ─ ©2011 Azul Systems, Inc. The “intelligent translator” Profile, analyze, execute faster 9
  • 10. JVM Compilers • Common concepts: ─ Hotspot detection, Re-compilation, and De-compilation • Optimizations need resources ─ Temporary “JVM memory” ─ “Compiler threads” ─ Cost is covered by the faster execution time • Different compilers for different needs ─ Client (“C1”), quicker compilation time, less optimized code ─ Server (“C2”), slower compilation time, more optimized code ─ Tiered, both C1 and C2 ─ C1’s profiling used for C2’s compilation ©2011 Azul Systems, Inc. 10
  • 11. Exploring JIT Compilation Example 1: Dead Code Elimination • Eliminates code that does not affect the program • The compiler finds the “dead” code and eliminates the instruction set for it ─ Reduces the program size ─ Prevents irrelevant operations to occupy time in the CPU • Example: int timeToScaleMyApp(boolean endlessOfResources) { int reArchitect = 24; int patchByClustering = 15; int useZing = 2; if (endlessOfResources) return reArchitect + useZing; else return useZing; } ©2011 Azul Systems, Inc. 11
  • 12. Exploring JIT Compilation Example 1: Dead Code Elimination • Eliminates code that does not affect the program • The compiler finds the “dead” code and eliminates the instruction set for it ─ Reduces the program size ─ Prevents irrelevant operations to occupy time in the CPU • Example: int timeToScaleMyApp(boolean endlessOfResources) { int reArchitect = 24; int useZing = 2; if (endlessOfResources) return reArchitect + useZing; else return useZing; } ©2011 Azul Systems, Inc. 12
  • 13. Exploring JIT Compilation Example 2: Inlining int whenToEvaluateZing(int y) { return daysLeft(y) + daysLeft(0) + daysLeft(y+1); } int daysLeft(int x) { if (x == 0) return 0; Each method call takes time, and causes extra jump instructions to be executed ©2011 Azul Systems, Inc. else return x - 1; } 13
  • 14. Exploring JIT Compilation Example 2: Inlining int whenToEvaluateZing(int y) { int temp = 0; if (y == 0) temp += 0; else temp += y - 1; if (0 == 0) temp += 0; else temp += 0 - 1; if (y+1 == 0) temp += 0; else temp += (y + 1) - 1; return temp; } Eliminating multiple method calls by inlining the method itself, speeds up the execution ©2011 Azul Systems, Inc. 14
  • 15. Exploring JIT Compilation Example 2: Inlining int whenToEvaluateZing(int y) { if (y == 0) return y; else if (y == -1) return y - 1; else return y + y - 1; } Further optimizations can often be applied to speed up even more…. ©2011 Azul Systems, Inc. 15
  • 16. Exploring JIT Compilation Example 2: Redundancy Removal • Common situation after inlining: ─ Method “foo” inlined in multiple places ─ Could lead to execution of the same tasks multiple times ─ ─ ─ Assignment of values to variables Additions or other operations Other… ─ Optimize to only have to do the redundant instructions once • Elimination of redundancy speeds up the code execution ©2011 Azul Systems, Inc. 16
  • 17. Summary on Portability and Compilers • Since the JVM Compiler does the “translation” and optimization for you, you don’t need to think about: ─ Different HW instruction sets ─ How to write your methods in a more instruction friendly way ─ How calls to other methods may impact execution performance • Unless you want to?  ©2011 Azul Systems, Inc. 17
  • 19. What is a Java Virtual Machine (JVM)? • Key benefits of Java, enabled by the JVM ─ Portability ─ “Non-explicity” • Other error-preventing and convenient services of the JVM ─ ─ ─ ─ ─ ─ ─ ─ Consistent Thread Model Optimizes and Manages Locking Enforces Type Safety Dynamic Code Loading Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime) Internal introspection services Access to huge pre-built library Access to OS and environmental information ©2011 Azul Systems, Inc. 19
  • 20. What is a Java Virtual Machine (JVM)? • Key benefits of Java, enabled by the JVM ─ Portability ─ “Non-explicity” • Other error-preventing and convenient services of the JVM ─ ─ ─ ─ ─ ─ ─ ─ Consistent Thread Model Optimizes and Manages Locking Enforces Type Safety Dynamic Code Loading Quick high-quality Time Access (e.g. currentTimeMillis, nanoTime) Internal introspection services Access to huge pre-built library Access to OS and environmental information ©2011 Azul Systems, Inc. 20
  • 21. Non-Explicity import java.io.*; class ZingFan { private String myName; public ZingFan(String name){ myName = name; } Just type “new” to get the memory you need public String getName() { return myName; } public static void main (String args[ ]){ ZingFan me = new ZingFan("Eva"); System.out.println(me.getName()); } No need to track or free used memory! } ©2011 Azul Systems, Inc. 21
  • 22. Garbage Collection • Dynamic Memory Management – The perceived pain that really comes with all the goodness • Allocation and Garbage Collection ─ Parallel ─ Concurrent ─ Generational ─ Fragmentation and Compaction ─ The torture of tuning most JVMs ©2011 Azul Systems, Inc. 22
  • 23. Allocation & Garbage Collection • Java Heap (-Xmx) • JVM Internal Memory • Top: RES / RSS --- total memory footprint Java Heap • Where all Java Objects are allocated JVM Internal Memory • • • • ©2011 Azul Systems, Inc. Code Cache VM threads VM Structs GC Memory 23
  • 24. Allocation & Garbage Collection • Thread Local Allocation Thread B Object Foo Java Heap Thread Local Area B Old Object Thread Local Area A Old Object Thread A ©2011 Azul Systems, Inc. Object Bar 24
  • 25. Allocation & Garbage Collection • Garbage Collection Thread B Java Heap Old Object ??? Object NoFit Reference Object Foo Object Bar Old Object Thread A ©2011 Azul Systems, Inc. 25
  • 26. Garbage Collection • Parallel Garbage Collection ─ Stop the world Thread B Object NoFit Reference Java Heap Old Object Object Foo Object Bar Old Object GC Thread ©2011 Azul Systems, Inc. 26
  • 27. Garbage Collection • Parallel Garbage Collection ─ Stop the world Thread B Object NoFit Reference Java Heap Old Object Object Foo Object Bar Old Object GC Thread ©2011 Azul Systems, Inc. 27
  • 28. Garbage Collection • Parallel Garbage Collection ─ Stop the world Thread B Object NoFit Reference Java Heap Old Object Object Foo Object Bar Old Object GC Thread ©2011 Azul Systems, Inc. 28
  • 29. Garbage Collection • Parallel Garbage Collection ─ Stop the world Thread B Reference Object NoFit Java Heap Object Foo Object Bar GC Thread ©2011 Azul Systems, Inc. 29
  • 30. Garbage Collection • Parallel Garbage Collection ─ Stop the world Thread B Reference Object NoFit Java Heap Object Foo Object Bar Thread A ©2011 Azul Systems, Inc. 30
  • 31. Garbage Collection • Parallel Garbage Collection ─ Stop the world Thread B Reference Java Heap Object NoFit Object Foo Object Bar Thread A ©2011 Azul Systems, Inc. 31
  • 32. Garbage Collection • Concurrent Garbage Collection ─ While application is running Thread B Object Foo Java Heap Old Object Object Bar Old Object Reference GC Thread ©2011 Azul Systems, Inc. 32
  • 33. Garbage Collection • Concurrent Garbage Collection ─ While application is running Thread B Java Heap Old Object Object Foo Object Bar Old Object Reference GC Thread ©2011 Azul Systems, Inc. 33
  • 34. Garbage Collection • Concurrent Garbage Collection ─ While application is running Thread B Java Heap Old Object Object Foo Object Bar Old Object Reference GC Thread ©2011 Azul Systems, Inc. 34
  • 35. Garbage Collection • Concurrent Garbage Collection ─ While application is running Thread B Java Heap Old Object Object Foo Object Bar Reference GC Thread ©2011 Azul Systems, Inc. 35
  • 36. Fragmentation • When there is room on the heap ─ But not large enough… ─ Even after GC… Thread B ??? Java Heap Object Bar ©2011 Azul Systems, Inc. Object Foo Object NoFit Older Object 36
  • 37. Generational Garbage Collection • Most objects die young… Thread B Object NoFit ??? Java Heap Object Bar Young Generation ©2011 Azul Systems, Inc. Older Object Object Foo Old Generation 37
  • 38. Generational Garbage Collection • Most objects die young… Thread B Object NoFit ??? Java Heap Object Bar Young Generation ©2011 Azul Systems, Inc. Object Foo Older Object Old Generation 38
  • 39. Generational Garbage Collection • Most objects die young… Thread B Object NoFit Java Heap Older Object Young Generation ©2011 Azul Systems, Inc. Old Generation 39
  • 40. Generational Garbage Collection • Most objects die young… Thread B Java Heap Object NoFit Young Generation ©2011 Azul Systems, Inc. Older Object Old Generation 40
  • 41. Generational Garbage Collection • Promotion ??? Thread B Object YGCTrig Java Heap Object NoFit Young Generation ©2011 Azul Systems, Inc. Many Young Objects Older Object Old Generation 41
  • 42. Generational Garbage Collection • Promotion • • ??? Thread B Less fragmented memory Delays “worst case” Object YGCTrig Java Heap Many Young Objects Young Generation ©2011 Azul Systems, Inc. Older Object Object NoFit Old Generation 42
  • 43. Generational Garbage Collection • Promotion • • Thread B Less fragmented memory Delays “worst case” Object YGCTrig Java Heap Older Object Young Generation ©2011 Azul Systems, Inc. Object NoFit Old Generation 43
  • 44. Generational Garbage Collection • Promotion • • Less fragmented memory Delays “worst case” Thread B Java Heap Object YGCTrig Young Generation ©2011 Azul Systems, Inc. Older Object Object NoFit Old Generation 44
  • 45. Compaction • Move objects together ─ To fit larger objects ─ Eliminate small un-useful memory gaps ??? Java Heap Object NoFit Young Generation ©2011 Azul Systems, Inc. Object Bar Object Foo Older Object Old Generation 45
  • 46. Compaction • Move objects together ─ To fit larger objects ─ Eliminate small un-useful memory gaps Java Heap Object NoFit Young Generation ©2011 Azul Systems, Inc. Object Bar Object Foo Older Object Old Generation 46
  • 47. Compaction • Move objects together ─ To fit larger objects ─ Eliminate small un-useful memory gaps Java Heap Object NoFit Young Generation ©2011 Azul Systems, Inc. Object Bar Object Foo Older Object Old Generation 47
  • 48. Compaction • Generational GC helps delay, but does not “solve” fragmentation • Compaction is inevitable ─ When moving objects, you need to update references ─ Most JVMs have to stop the world as part of compaction • Many approaches to shorten compaction impact ─ ─ ─ ─ Partitioned compaction Time controlled compaction “Best result” calculations on what areas to compact Reference counting ©2011 Azul Systems, Inc. 48
  • 49. Pain of Tuning • -Xmx – hast to be set “right” ─ Exactly the amount you need for your worst case load ─ Too much – waste of resources ─ Too little – OutOfMemoryError ─ Unpredictable loads and missconfiguration cause a lot of down- time • Example of production-tuned CMS: ©2011 Azul Systems, Inc. 49
  • 50. Biggest Java Scalability Limitation • For MOST JVMs, compaction pauses are the biggest current challenge and key limiting factor to Java scalability • The larger heap and live data / references to follow, the bigger challenge for compaction • Today: most JVMs limited to 3-4GB ─ ─ ─ ─ To keep “FullGC” pause times within SLAs Design limitations to make applications survive in 4GB chunks Horizontal scale out / clustering solutions In spite of machine memory increasing over the years…  This is why I find Zing so interesting, as it has implemented concurrent compaction… ─ But that is not the topic of this presentation…  ©2011 Azul Systems, Inc. 50
  • 51. 2c for the Road What to (not) Think About 1. Why not use multiple threads, when you can? ─ Number of cores per server continues to grow… 2. Don’t be afraid of garbage, it is good! 3. I personally don’t like finalizers…error prone, not guaranteed to run (resource wasting) 4. Always be careful around locking ─ If it passes testing, hot locks can still block during production load 5. Benchmarks are often focused on throughput, but miss out on real GC impact – test your real application! ─ ─ “Full GC” never occurs during the run, not running long enough to see impact of fragmentation Response time std dev and outliers (99.9…%) are of importance for a real world app, not throughput alone!! ©2011 Azul Systems, Inc. 51
  • 52. Summary • JVM – a great abstraction, provides convenient services so the Java programmer doesn’t have to deal with environment specific things • Compiler – “intelligent and context-aware translator” who helps speed up your application • Garbage Collector – simplifies memory management, different flavors for different needs • Compaction – an inevitable task, which impact grows with live size and data complexity for most JVMs, and the current largest limiter of Java Scalability ©2011 Azul Systems, Inc. 52
  • 53. For the Curious: What is Zing? • Azul Systems has developed scalable Java platforms for 8+ years ─ Vega product line based on proprietary chip architecture, kernel enhancements, and JVM innovation ─ Zing product line based on x86 chip architecture, virtualization and kernel enhancements, and JVM innovation • Most famous for our Generational Pauseless Garbage Collector, which performs fully concurrent compaction ©2011 Azul Systems, Inc. 53
  • 55. Additional Resources • For more information on… …JDK internals: http://openjdk.java.net/ (JVM source code) …Memory management: http://java.sun.com/j2se/reference/whitepapers/memorymanagement_w hitepaper.pdf (a bit old, but very comprehensive) …Tuning: http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/genin fo/diagnos/tune_stable_perf.html (watch out for increased rigidity and re-tuning pain) …Generational Pauseless Garbage Collection: http://www.azulsystems.com/webinar/pauseless-gc (webinar by Gil Tene, 2011) …Compiler internals and optimizations: http://www.azulsystems.com/blogs/cliff (Dr Cliff Click’s blog) ©2011 Azul Systems, Inc. 55