SlideShare a Scribd company logo
1 of 70
Download to read offline
1
Simple Tweaks
To Get the Most Out Of Your JVM
Jamie Lee Coleman
Software Engineer/Developer Advocate @ IBM
Twitter: @JamieLeeC
2
What we will be looking at…
• What is a JVM and why is it
important?
• How the cloud has changed
the JVM
• HotSpot, OpenJ9 &
GraalVM Overview
• Picking the right runtime to run
on your JVM
• Tweaking your JVM
• OpenJ9 Class Cache + Demo
• OpenJ9 Idle Tuning
• OpenJ9 JIT Server
• Recap
3
3
Why is the JVM important?
Well firstly without it we would have no Java!
4
What does the JVM do
A Java Virtual Machine (JVM) is responsible for taking your application
bite code and converting it to a machines language for execution.
Most other languages compile code for a specific system but in Java,
the compiler converts the code for a Java Virtual Machine that can be
used on any system hence the phrase “Write once, run anywhere”.
5
Why do people use JVM’s?
• Cross Platform
• Large Library Ecosystem
• Great Garbage collector
• Powerful Monitoring tools
• Proven and Robust!
7
JVM Architecture
Class Loader Subsystem
Runtime Data Area
Method
Area
Heap
JVM
Language
Stack
PC
Registers
Native
Method
Stacks
Execution
Engine
Native
Method
Interface
Native
Method
Library's
8
ClassLoader Subsystem
Loading
• Loads classes using 3 different class loaders named the Bootstrap, Extension
and Application ClassLoaders
Linking
• Verify the generated bite code, prepare all static variables and assign default
values and resolves all symbolic memory references
Initialization
• Assigns static variables with their original values and executes the static block
9
Runtime Data Area
Method Area:
• Stores metadata, constant runtime pool and code for methods.
Heap:
• Common memory shared between multiple threads that stores Object, Instance Variables and Arrays.
JVM Language Stacks:
• Created when a thread is created and stores local variables
PC Registers:
• Every thread has its own Register, and it stores the address of the Java virtual machine instruction which
is currently executing.
Native Method Stack:
• Holds Native method information. For every thread that is created so is a native method stack.
10
Execution Engine
Execution Engine:
• Reads bytecode and executes it using the Interpreter and JIT Compiler
Native method interface (JNI):
• Interacts with the Native Method Libraries to provide the required libraries
for the execution engine.
Native Method Library’s
• A collection of Native Libraries.
11
11
How the cloud has changed
the JVM
$ $ $ $ $
12
Cloud computing
energy = money
Money changes everything
With a measurable and direct relationship between
$£€¥₽ and CPU/RAM, disk etc the financial success
or failure of a project is even easier to see
And that means…
Even more focus on value for money and as a
result focus on energy.
13
Demand
One big server running all the time?
time
What the Cloud offers
14
Demand
One big server running all the time?
time
What the Cloud offers
15
Demand
time
One big server running all the time?
What the Cloud offers
16
Microservices and the JVM
17
Many metrics must be balanced for Java Performance
• Wide variety of use cases means many metrics must be balanced
• Different goals  different design decisions
• No single “right” answer
• Must keep a balance  make sensible trade-offs
• Key performance metrics tracked
• start-up time
• ramp-up time
• memory footprint
• response time
• CPU/Throughput
Optimizing for cloud requires a different balance across these performance metrics
start-up time
footprint
ramp-up
response time
CPU
18
Java ME Inside!
19
JAVA ME REQUIREMENTS
Small footprint
- On disk and runtime.
- Very limited RAM, usually more ROM
Fast startup
- Everybody wants their games to start
quickly
Quick / immediate rampup
- Game shouldn’t play better the longer
you play
Java ME
20
JAVA ME REQUIREMENTS JVM IN THE CLOUD REQUIREMENTS
Small footprint
- On disk and runtime.
- Very limited RAM, usually more ROM
Small footprint
- Improves density for providers
- Improves cost for applications
Fast startup
- Everybody wants their games to start
quickly
Fast startup
- Faster scaling for increased demand
Quick / immediate rampup
- Game shouldn’t play better the longer
you play
Quick / immediate rampup
- GB/hr is key, if you run for less time you pay
less money
Java ME vs the JVM in the Cloud
21
21
Why should developers care
about optimisation of our
Applications?
It does not save that much money!
22
Why should developers care?
There is over 500,000 data centres worldwide
The area of land they consume is around the same as 6,000 football
pitches
UK energy consumption x 1.5 == global data centre energy
consumption.
23
Luckily Hardware efficiency is helping
24
24
The Different JVMs Available
25
There is a JVM for everything
Azul
Codename One (Mobile)
Eclipse OpenJ9
GraalVM
HotSpot
JamVM (IOT Devices)
JikesRVM (Research)
leJOS (Robotics for Lego)
Maxine
Apache Harmony
JOP
Juice
Jupiter
Kaffe
Mika VM (Embedded Devices)
NanoVN (Asuro Robot)
SableVM
SquawkVM
SuperWaba
TakaTuka
TinVM
WonkaVM
26
Most popular JVM’s
• Oracle JDK
• OpenJDK (via Adopt OpenJDK)
• OpenJDK (via Oracle)
• OpenJDK (via Amazon Coretto)
• Azul
• GraalVM
• Eclipse OpenJ9 (via Adopt OpenJDK)
31
31
HotSpot, OpenJ9 and GraalVM
Overview
32
Overview of HotSpot
Formally known as “Java HotSpot Performance Engine”
Original release: 27th April 1999
HotSpot became the default Sun (Now Oracal) JVM in Java 1.3
On 13 November 2006, the HotSpot JVM and the Java Development Kit (JDK)
became Open Source paving the way for OpenJDK and many other JVM
implementations.
“HotSpot continually analyzes the program's performance for hot spots which are
executed often or repeatedly. These are then targeted for optimizing, leading to
high-performance execution with a minimum of overhead for less performance-
critical code” - Wikipedia
33
Overview of OpenJ9
Designed from the start to span all the
operating systems needed by IBM products
This JVM can go from small to large
Can handle constrained environments or
memory rich ones
Is used by the largest enterprises on the
planet
34
Overview of OpenJ9
35
Overview of GraalVM
Original Release: May 2019 v19.0
Based on HotSpot OpenJDK with routes from the Maxine Virtual machine
developed by Sun (Oracal) and the University of Manchester UK.
Why is it different to other JVM’s?
• It has a new JIT compiler for Java, GraalVM Compiler
• It allows the ahead-of-time compilation of Java applications with the GraalVM Native Image
• Truffle Language Implementation framework and the GraalVM SDK to enable additional
programming language runtimes
• LLVM and JavaScript Runtime
36
GraalVM Project Goals:
• To improve the performance of Java virtual machine-based languages to
match the performance of native languages.
• To reduce the startup time of JVM-based applications by compiling them
ahead-of-time with GraalVM Native Image technology.
• To enable GraalVM integration into the Oracle Database, OpenJDK,
Node.js, Android/iOS, and to support similar custom embeddings.
• To allow freeform mixing of code from any programming language in a
single program, billed as "polyglot applications".
• To include an easily extended set of "polyglot programming tools".
37
37
Picking the right Runtime
Open Source Runtimes from IBM & RedHat
38
38
39
Liberty
• Developer friendly
• Just enough application server
• Fast inner loop with dev mode
• Support for industry standard
dev tools
• Jakarta EE, Java EE,
MicroProfile APIs
• Zero Migration
• Cloud Ready
• Container optimized
• Designed for dev/ops
• Small disk footprint
• Efficient memory usage
• Fast startup
• High throughput
• Self-Tuned Thread Pool
40
<feature>servlet-4.0</feature>
<feature>jsf-2.3</feature>
Just Enough Application Server
• You control which features are loaded into each server instance
Kernel
servlet-4.0
http-2.0 appmgr
jsp-2.3 jsf-2.3
Java EE/Jakarta EE
41
API Support
• First shipped in WAS 8.5 in 2012
o Servlet + JSP + JPA
• Web Profile 6 in 2014
• Java EE 7 in 2016 – first commercial
product to certify
• Java EE 8 in 2018 – first to certify
• Jakarta EE 8 in 2019 – first to certify
• Eclipse MicroProfile – first to deliver
1.0-1.4, 2.0-2.1, 3.0
42
43
Quarkus
• Unified Configuration
• Zero config, live reload
• Streamlined code for the 80% common usages
• Native Execution
• Support for many libraries such as MicroProfile
44
Quarkus
45
Other Runtimes
46
46
Tweaking the JVM
Making Your Java Code Perform
47
Making the most out of any JVM
1. Writing efficient code
2. Use the right JVM for your needs
3. Pick a runtime that is right for your application
4. Use Profiling to get the most out of your JVM
5. Tweak your JVM depending on your needs in development and
production
48
1. Writing efficient code
• Use primitives where possible
• Use a StingBuilder rather than an StringBuffer
• Avoid using an Iterator
• Avoid using BigInteger and BigDecimal
49
2. Use the right JVM for your needs
50
3. Pick a runtime that is right for your
application
Architectural style
Functions
Monolith Microservice
API
needs
Smaller
Larger
Macroservice
Open Liberty
WAS
Quarkus
51
4. Profiling
Java Profilers are really useful tools that enable you to monitor Java
bytecode constructs and operations inside the JVM. This includes
things such as:
• Garbage Collections
• Object Creation
• Method Executions
• Iterative Executions
• Thread Executions
52
4. Profiling Cont
Most Popular Java Profilers:
• JProfiler
• YourKit
• Java VisualVM
• NetBeans Profiler
• Oracle Java Mission Control (Included in Oracle JDK)
53
5. Tweak your JVM
• Tune your Garbage Collector (GC)
• Use the AOT Compiler
• Enable Class Data Sharing (HotSpot & OpenJ9)
• Enable Idle Tuning
• Use a JIT Server
• Start with min Heap Size
54
54
OpenJ9 Class Data Sharing
For Super Fast Start-up
55
• A shared classes cache is an area of shared memory of a fixed size that
persists beyond the lifetime of the JVM or a system reboot unless a non-
persistent shared cache is used. Any number of shared caches can exist on
a system, and all are subject to operating system settings and restrictions.
• A shared cache cannot grow in size. When it becomes full, JVMs can still
load classes from it but can no longer store any data into it. You can create a
large, shared classes cache up front, while setting a soft maximum limit on
how much shared cache space can be used. You can increase this limit
when you want to store more data into the shared cache without shutting
down the JVMs that are connected to it.
What is class sharing?
56
When a JVM loads a class, it first looks in the class loader cache to see if the class it needs is already present. If
yes, it returns the class from the class loader cache. Otherwise, it loads the class from the filesystem and writes
it into the cache as part of the defineClass() call. Therefore, a non-shared JVM has the following class loader
lookup order:
• Classloader cache
• Parent
• Filesystem
In contrast, a JVM running with the class sharing feature uses the following order:
• Classloader cache
• Parent
• Shared classes cache
• Filesystem
How does class sharing work?
57
To enable class sharing, add -Xshareclasses[:name=<cachename>] to
an existing Java command line.
You can specify the shared cache size using the parameter -
Xscmx<size>[k|m|g. This parameter only applies if a new shared cache
is created.
How to Enabling class sharing
58
0
2
4
6
8
10
12
Open Liberty 20.0.0.4 TomEE 8.0.0-M3-microprofile Tomcat 9.0.22 + OpenWebBeans
2.0.11(CDI) + CXF 3.3.2 (jaxrs)
Wildfly 17.0.1 javaee JBoss 7.2 Glassfish web 5 Payara web 5.192
PingPerf application startup time with HotSpot
(in seconds)
Startup time comparison (using HotSpot JVM)
59
0
1
2
3
4
5
6
7
8
Open Liberty 20.0.0.4 TomEE 8.0.0-M3-microprofile Tomcat 9.0.22 + OpenWebBeans
2.0.11(CDI) + CXF 3.3.2 (jaxrs)
Wildfly 17.0.1 javaee JBoss 7.2 Glassfish web 5 Payara web 5.192
PingPerf application startup time with OpenJ9 Shared Classes Cache (in seconds)
Startup time comparison (using OpenJ9 JVM)
60
Open Liberty and OpenJ9 shared classes
cache in Docker
0
2
4
6
8
Open Liberty Docker image without shared classes cache Open Liberty Docker image with shared classes cache
AcmeAir MS Startup time in Docker (in seconds)
61
0
0.5
1
1.5
2
2.5
December '18 March '19 April '19 July '19 August '19 September '19 April '20
2018-2020 Progression of OpenLiberty+OpenJ9 startup time (seconds)
Open Liberty with OpenJ9: the road to one
second startup time
OpenJ9 : Improved Cached feature metadata when no change to server.xml Changed bundle activation to start in parallel
Better AOT code RAS processing Optimized loading of CXF JSON/JSONB provider RAS annotation processing at build time
JMX MBeanServer init Cached annotation information for built-in JAX-RS Providers Cached plugin xml and OSGi metadata
OpenJ9 : GC hints in shared classes cache Reduced class loading during startup
Reduced logging overhead
OpenJ9 : More AOT code in shared classes cache
OpenJ9 : Optimize class verification overhead
62
62
OpenJ9 Class Cache
Demo
63
Interactive Demo
If you want to run through the demo’s at the same time please go to:
https://openliberty.skillsnetwork.site/cloud-native-java-made-easy-with-
microprofile
64
64
OpenJ9 Idle Tuning
65
OpenJ9 JVM judiciously uses computing resources
Computing resources ==
Cloud it’s about sharing; do not be greedy in using all resources
• OpenJ9 is conservative with heap growth
• OpenJ9 frees memory used transiently during JIT compilation
0
100
200
300
400
500
600
700
800
1GB 2GB 4GB
Resident
set
size
(MB)
Container limit
Steady state memory footprint in AcmeAir
OpenJ9 Hotspot
For large containers
OpenJ9 uses less than
half the memory
66
Free Resources when Applications are
Idling
-XX:+IdleTuningGcOnIdle
(default setting in container)
Benchmark: https://github.com/blueperf/acmeair
More details: https://developer.ibm.com/javasdk/2017/09/25/still-paying-unused-memory-java-app-idle
anthesisgroup.com: “Some 30 percent of VMs are zombies”
https://anthesisgroup.com/wp-content/uploads/2017/03/Comatsoe-Servers-Redux-2017.pdf
1. Detect idle state
2. Trigger GC
3. Compact Java heap
4. Send OS reclamation hint
OpenJ9 frees resources when applications are idling
67
67
OpenJ9 JIT Server
68
JIT server
JIT
JVM
JITServer
JIT
JVM
JIT
JVM Orchestrator
load balancing, affinity,
scaling, reliability
JITServer
69
JITServer Performance
Throughput benefits grow in constrained environments
0
200
400
600
800
1000
1200
1400
0 100 200 300 400 500 600
Throughput
(pages/sec)
Time (sec)
--cpus=1, -m=300m
JITServer OpenJ9
0
200
400
600
800
1000
1200
1400
0 100 200 300 400 500 600
Throughput
(pages/sec)
Time (sec)
--cpus=1, -m=256m
JITServer OpenJ9
0
200
400
600
800
1000
1200
1400
0 100 200 300 400 500 600
Throughput
(pages/sec)
Time (sec)
--cpus=1, -m=200m
JITServer OpenJ9
Smaller memory limit
JIT server performance : Open Liberty Daytrader7 throughput
70
How to enable a JIT Server
Launch OpenJ9 in client mode so that the VM sends requests to the
JITServer using the following command:
“-XX:+IseJITServer”
Then run the following command to start a JITServer process that
listens for incoming compilation requests:
“jitserver”
73
73
Recap
What if anything have you learned today?
74
How do you get the most out of
your JVM?
Write efficient code
Use the right JVM for your needs
Pick a runtime that is right for your application
Use Profiling
&
Tweaking your JVM
=
Less Money & Energy!
75
Links and Materials
JVM’s
• AdoptOpenJDK: https://adoptopenjdk.net/
• OpenJ9: https://www.eclipse.org/openj9/
• HotSpot JDK: https://openjdk.java.net/groups/hotspot/
• Oracle JDK: https://www.oracle.com/uk/java/technologies/javase-
downloads.html
• GraalVM: https://www.graalvm.org/
• Azul (Zulu): https://www.azul.com/downloads/zulu-community/
• Amazon JDK: https://aws.amazon.com/corretto/
Runtimes
• Open Liberty Site: https://openliberty.io/
• Open Liberty Guides: https://openliberty.io/guides
• Quarkus Site: https://quarkus.io/
Other Useful Links
• Jakarta EE Homepage: https://jakarta.ee/
• OpenJ9 JIT Server Doc:
https://www.eclipse.org/openj9/docs/jitserver/
• OpenJ9 Class Data Sharing Doc:
https://www.eclipse.org/openj9/docs/shrc/
• OpenJ9 Idle Tuning Doc:
https://www.eclipse.org/openj9/docs/xxidletuninggconidle/
76
References to research for this talk
• https://snyk.io/blog/36-of-developers-switched-from-oracle-jdk-to-an-alternate-openjdk-
distribution-over-the-last-year/
• https://en.wikipedia.org/wiki/List_of_Java_virtual_machines
• https://www.guru99.com/java-virtual-machine-
jvm.html#:~:text=Java%20Virtual%20Machine%20(JVM)%20is,code%20for%20a%20pa
rticular%20system.
• https://dzone.com/articles/jvm-architecture-explained
• https://www.quora.com/Whats-the-attraction-of-the-JVM-platform
• https://stackify.com/java-performance-tuning/
• https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines
• https://www.baeldung.com/java-profilers
77
77
Thank You
Jamie Lee Coleman
Software Developer/Advocate @ IBM
jlcoleman@uk.ibm.com
@Jamie_Lee_C

More Related Content

What's hot

Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise MiddlewareBehrad Zari
 
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...Uri Cohen
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?Maciej Lasyk
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTaro L. Saito
 
JDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGJDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGYuji Kubota
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuVMware Tanzu
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowKarsten Dambekalns
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design PatternsBilgin Ibryam
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionBrennan Saeta
 
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...Chris Fregly
 
Diagnosing Your Application on the JVM
Diagnosing Your Application on the JVMDiagnosing Your Application on the JVM
Diagnosing Your Application on the JVMStaffan Larsen
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Vinay Kumar
 
Efficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMEfficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMQAware GmbH
 
Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...Brennan Saeta
 
Are you ready for cloud-native java JavaCro2019
Are you ready for cloud-native java JavaCro2019Are you ready for cloud-native java JavaCro2019
Are you ready for cloud-native java JavaCro2019Jamie Coleman
 

What's hot (20)

Why Play Framework is fast
Why Play Framework is fastWhy Play Framework is fast
Why Play Framework is fast
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
 
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
 
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad PečanacJavantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
JEE on DC/OS
JEE on DC/OSJEE on DC/OS
JEE on DC/OS
 
JDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGJDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUG
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containers
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design Patterns
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
 
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
 
Diagnosing Your Application on the JVM
Diagnosing Your Application on the JVMDiagnosing Your Application on the JVM
Diagnosing Your Application on the JVM
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17
 
Efficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMEfficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVM
 
Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...
 
Are you ready for cloud-native java JavaCro2019
Are you ready for cloud-native java JavaCro2019Are you ready for cloud-native java JavaCro2019
Are you ready for cloud-native java JavaCro2019
 

Similar to Simple tweaks to get the most out of your jvm

Java-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfJava-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfRichHagarty
 
Cloud Native Compiler
Cloud Native CompilerCloud Native Compiler
Cloud Native CompilerSimon Ritter
 
javalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdfjavalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdfRichHagarty
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
JITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdfJITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdfRichHagarty
 
FOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VMFOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VMCharlie Gracie
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019graemerocher
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesBruno Borges
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSumanMitra22
 
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
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVMAlex Birch
 
JavaLand_To InstantOn and Beyond.pptx
JavaLand_To InstantOn and Beyond.pptxJavaLand_To InstantOn and Beyond.pptx
JavaLand_To InstantOn and Beyond.pptxGrace Jansen
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019graemerocher
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8AppDynamics
 

Similar to Simple tweaks to get the most out of your jvm (20)

Java-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdfJava-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdf
 
Cloud Native Compiler
Cloud Native CompilerCloud Native Compiler
Cloud Native Compiler
 
javalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdfjavalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdf
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
JITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdfJITServerTalk JCON World 2023.pdf
JITServerTalk JCON World 2023.pdf
 
FOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VMFOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VM
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
Peru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVMPeru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVM
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on Kubernetes
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptx
 
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
 
intoduction to java
intoduction to javaintoduction to java
intoduction to java
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Java hot spot
Java hot spotJava hot spot
Java hot spot
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVM
 
JavaLand_To InstantOn and Beyond.pptx
JavaLand_To InstantOn and Beyond.pptxJavaLand_To InstantOn and Beyond.pptx
JavaLand_To InstantOn and Beyond.pptx
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8
 

More from Jamie Coleman

Open Source Licence to Kill in Software Development
Open Source Licence to Kill in Software DevelopmentOpen Source Licence to Kill in Software Development
Open Source Licence to Kill in Software DevelopmentJamie Coleman
 
The Secret Life of Maven Central - LJC 2022.pptx
The Secret Life of Maven Central - LJC 2022.pptxThe Secret Life of Maven Central - LJC 2022.pptx
The Secret Life of Maven Central - LJC 2022.pptxJamie Coleman
 
Code to Cloud Workshop, Shifting Security to the Left
Code to Cloud Workshop, Shifting Security to the LeftCode to Cloud Workshop, Shifting Security to the Left
Code to Cloud Workshop, Shifting Security to the LeftJamie Coleman
 
The Death Star & The Ultimate Vulnerability.pptx
The Death Star & The Ultimate Vulnerability.pptxThe Death Star & The Ultimate Vulnerability.pptx
The Death Star & The Ultimate Vulnerability.pptxJamie Coleman
 
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptx
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptxWhy Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptx
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptxJamie Coleman
 
Code to Cloud Workshop.pptx
Code to Cloud Workshop.pptxCode to Cloud Workshop.pptx
Code to Cloud Workshop.pptxJamie Coleman
 
Magic of Automation and Everyday Chores.pptx
Magic of Automation and Everyday Chores.pptxMagic of Automation and Everyday Chores.pptx
Magic of Automation and Everyday Chores.pptxJamie Coleman
 
Code to Cloud Workshop
Code to Cloud WorkshopCode to Cloud Workshop
Code to Cloud WorkshopJamie Coleman
 
Using Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptxUsing Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptxJamie Coleman
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxJamie Coleman
 
Microservices made easy JavaCro 2021
Microservices made easy JavaCro 2021Microservices made easy JavaCro 2021
Microservices made easy JavaCro 2021Jamie Coleman
 
Replicating production on your laptop using the magic of containers v2
Replicating production on your laptop using the magic of containers v2Replicating production on your laptop using the magic of containers v2
Replicating production on your laptop using the magic of containers v2Jamie Coleman
 
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
 
Open Source In The World Of Java
Open Source In The World Of JavaOpen Source In The World Of Java
Open Source In The World Of JavaJamie Coleman
 
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containersReplicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containersJamie Coleman
 
Codecamp 2020 microservices made easy workshop
Codecamp 2020 microservices made easy workshopCodecamp 2020 microservices made easy workshop
Codecamp 2020 microservices made easy workshopJamie Coleman
 
Cloud native java workshop
Cloud native java workshopCloud native java workshop
Cloud native java workshopJamie Coleman
 
Seriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java MicroservicesSeriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java MicroservicesJamie Coleman
 
The new java developers kit bag
The new java developers kit bagThe new java developers kit bag
The new java developers kit bagJamie Coleman
 
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at JavanturaHands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at JavanturaJamie Coleman
 

More from Jamie Coleman (20)

Open Source Licence to Kill in Software Development
Open Source Licence to Kill in Software DevelopmentOpen Source Licence to Kill in Software Development
Open Source Licence to Kill in Software Development
 
The Secret Life of Maven Central - LJC 2022.pptx
The Secret Life of Maven Central - LJC 2022.pptxThe Secret Life of Maven Central - LJC 2022.pptx
The Secret Life of Maven Central - LJC 2022.pptx
 
Code to Cloud Workshop, Shifting Security to the Left
Code to Cloud Workshop, Shifting Security to the LeftCode to Cloud Workshop, Shifting Security to the Left
Code to Cloud Workshop, Shifting Security to the Left
 
The Death Star & The Ultimate Vulnerability.pptx
The Death Star & The Ultimate Vulnerability.pptxThe Death Star & The Ultimate Vulnerability.pptx
The Death Star & The Ultimate Vulnerability.pptx
 
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptx
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptxWhy Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptx
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptx
 
Code to Cloud Workshop.pptx
Code to Cloud Workshop.pptxCode to Cloud Workshop.pptx
Code to Cloud Workshop.pptx
 
Magic of Automation and Everyday Chores.pptx
Magic of Automation and Everyday Chores.pptxMagic of Automation and Everyday Chores.pptx
Magic of Automation and Everyday Chores.pptx
 
Code to Cloud Workshop
Code to Cloud WorkshopCode to Cloud Workshop
Code to Cloud Workshop
 
Using Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptxUsing Static Analysis Tools to Become a Superhero Programmer.pptx
Using Static Analysis Tools to Become a Superhero Programmer.pptx
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
 
Microservices made easy JavaCro 2021
Microservices made easy JavaCro 2021Microservices made easy JavaCro 2021
Microservices made easy JavaCro 2021
 
Replicating production on your laptop using the magic of containers v2
Replicating production on your laptop using the magic of containers v2Replicating production on your laptop using the magic of containers v2
Replicating production on your laptop using the magic of containers v2
 
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
 
Open Source In The World Of Java
Open Source In The World Of JavaOpen Source In The World Of Java
Open Source In The World Of Java
 
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containersReplicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
 
Codecamp 2020 microservices made easy workshop
Codecamp 2020 microservices made easy workshopCodecamp 2020 microservices made easy workshop
Codecamp 2020 microservices made easy workshop
 
Cloud native java workshop
Cloud native java workshopCloud native java workshop
Cloud native java workshop
 
Seriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java MicroservicesSeriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java Microservices
 
The new java developers kit bag
The new java developers kit bagThe new java developers kit bag
The new java developers kit bag
 
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at JavanturaHands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
 

Recently uploaded

ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesSoftwareMill
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorShane Coughlan
 
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds  with Cloud Native BuildpacksStreamlining Your Application Builds  with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native BuildpacksVish Abrams
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadIvo Andreev
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageDista
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfBrain Inventory
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptkinjal48
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmonyelliciumsolutionspun
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeNeo4j
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Jaydeep Chhasatia
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 

Recently uploaded (20)

ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retries
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS Calculator
 
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds  with Cloud Native BuildpacksStreamlining Your Application Builds  with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native Buildpacks
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdf
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.ppt
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 

Simple tweaks to get the most out of your jvm

  • 1. 1 Simple Tweaks To Get the Most Out Of Your JVM Jamie Lee Coleman Software Engineer/Developer Advocate @ IBM Twitter: @JamieLeeC
  • 2. 2 What we will be looking at… • What is a JVM and why is it important? • How the cloud has changed the JVM • HotSpot, OpenJ9 & GraalVM Overview • Picking the right runtime to run on your JVM • Tweaking your JVM • OpenJ9 Class Cache + Demo • OpenJ9 Idle Tuning • OpenJ9 JIT Server • Recap
  • 3. 3 3 Why is the JVM important? Well firstly without it we would have no Java!
  • 4. 4 What does the JVM do A Java Virtual Machine (JVM) is responsible for taking your application bite code and converting it to a machines language for execution. Most other languages compile code for a specific system but in Java, the compiler converts the code for a Java Virtual Machine that can be used on any system hence the phrase “Write once, run anywhere”.
  • 5. 5 Why do people use JVM’s? • Cross Platform • Large Library Ecosystem • Great Garbage collector • Powerful Monitoring tools • Proven and Robust!
  • 6. 7 JVM Architecture Class Loader Subsystem Runtime Data Area Method Area Heap JVM Language Stack PC Registers Native Method Stacks Execution Engine Native Method Interface Native Method Library's
  • 7. 8 ClassLoader Subsystem Loading • Loads classes using 3 different class loaders named the Bootstrap, Extension and Application ClassLoaders Linking • Verify the generated bite code, prepare all static variables and assign default values and resolves all symbolic memory references Initialization • Assigns static variables with their original values and executes the static block
  • 8. 9 Runtime Data Area Method Area: • Stores metadata, constant runtime pool and code for methods. Heap: • Common memory shared between multiple threads that stores Object, Instance Variables and Arrays. JVM Language Stacks: • Created when a thread is created and stores local variables PC Registers: • Every thread has its own Register, and it stores the address of the Java virtual machine instruction which is currently executing. Native Method Stack: • Holds Native method information. For every thread that is created so is a native method stack.
  • 9. 10 Execution Engine Execution Engine: • Reads bytecode and executes it using the Interpreter and JIT Compiler Native method interface (JNI): • Interacts with the Native Method Libraries to provide the required libraries for the execution engine. Native Method Library’s • A collection of Native Libraries.
  • 10. 11 11 How the cloud has changed the JVM $ $ $ $ $
  • 11. 12 Cloud computing energy = money Money changes everything With a measurable and direct relationship between $£€¥₽ and CPU/RAM, disk etc the financial success or failure of a project is even easier to see And that means… Even more focus on value for money and as a result focus on energy.
  • 12. 13 Demand One big server running all the time? time What the Cloud offers
  • 13. 14 Demand One big server running all the time? time What the Cloud offers
  • 14. 15 Demand time One big server running all the time? What the Cloud offers
  • 16. 17 Many metrics must be balanced for Java Performance • Wide variety of use cases means many metrics must be balanced • Different goals  different design decisions • No single “right” answer • Must keep a balance  make sensible trade-offs • Key performance metrics tracked • start-up time • ramp-up time • memory footprint • response time • CPU/Throughput Optimizing for cloud requires a different balance across these performance metrics start-up time footprint ramp-up response time CPU
  • 18. 19 JAVA ME REQUIREMENTS Small footprint - On disk and runtime. - Very limited RAM, usually more ROM Fast startup - Everybody wants their games to start quickly Quick / immediate rampup - Game shouldn’t play better the longer you play Java ME
  • 19. 20 JAVA ME REQUIREMENTS JVM IN THE CLOUD REQUIREMENTS Small footprint - On disk and runtime. - Very limited RAM, usually more ROM Small footprint - Improves density for providers - Improves cost for applications Fast startup - Everybody wants their games to start quickly Fast startup - Faster scaling for increased demand Quick / immediate rampup - Game shouldn’t play better the longer you play Quick / immediate rampup - GB/hr is key, if you run for less time you pay less money Java ME vs the JVM in the Cloud
  • 20. 21 21 Why should developers care about optimisation of our Applications? It does not save that much money!
  • 21. 22 Why should developers care? There is over 500,000 data centres worldwide The area of land they consume is around the same as 6,000 football pitches UK energy consumption x 1.5 == global data centre energy consumption.
  • 24. 25 There is a JVM for everything Azul Codename One (Mobile) Eclipse OpenJ9 GraalVM HotSpot JamVM (IOT Devices) JikesRVM (Research) leJOS (Robotics for Lego) Maxine Apache Harmony JOP Juice Jupiter Kaffe Mika VM (Embedded Devices) NanoVN (Asuro Robot) SableVM SquawkVM SuperWaba TakaTuka TinVM WonkaVM
  • 25. 26 Most popular JVM’s • Oracle JDK • OpenJDK (via Adopt OpenJDK) • OpenJDK (via Oracle) • OpenJDK (via Amazon Coretto) • Azul • GraalVM • Eclipse OpenJ9 (via Adopt OpenJDK)
  • 26. 31 31 HotSpot, OpenJ9 and GraalVM Overview
  • 27. 32 Overview of HotSpot Formally known as “Java HotSpot Performance Engine” Original release: 27th April 1999 HotSpot became the default Sun (Now Oracal) JVM in Java 1.3 On 13 November 2006, the HotSpot JVM and the Java Development Kit (JDK) became Open Source paving the way for OpenJDK and many other JVM implementations. “HotSpot continually analyzes the program's performance for hot spots which are executed often or repeatedly. These are then targeted for optimizing, leading to high-performance execution with a minimum of overhead for less performance- critical code” - Wikipedia
  • 28. 33 Overview of OpenJ9 Designed from the start to span all the operating systems needed by IBM products This JVM can go from small to large Can handle constrained environments or memory rich ones Is used by the largest enterprises on the planet
  • 30. 35 Overview of GraalVM Original Release: May 2019 v19.0 Based on HotSpot OpenJDK with routes from the Maxine Virtual machine developed by Sun (Oracal) and the University of Manchester UK. Why is it different to other JVM’s? • It has a new JIT compiler for Java, GraalVM Compiler • It allows the ahead-of-time compilation of Java applications with the GraalVM Native Image • Truffle Language Implementation framework and the GraalVM SDK to enable additional programming language runtimes • LLVM and JavaScript Runtime
  • 31. 36 GraalVM Project Goals: • To improve the performance of Java virtual machine-based languages to match the performance of native languages. • To reduce the startup time of JVM-based applications by compiling them ahead-of-time with GraalVM Native Image technology. • To enable GraalVM integration into the Oracle Database, OpenJDK, Node.js, Android/iOS, and to support similar custom embeddings. • To allow freeform mixing of code from any programming language in a single program, billed as "polyglot applications". • To include an easily extended set of "polyglot programming tools".
  • 32. 37 37 Picking the right Runtime Open Source Runtimes from IBM & RedHat
  • 33. 38 38
  • 34. 39 Liberty • Developer friendly • Just enough application server • Fast inner loop with dev mode • Support for industry standard dev tools • Jakarta EE, Java EE, MicroProfile APIs • Zero Migration • Cloud Ready • Container optimized • Designed for dev/ops • Small disk footprint • Efficient memory usage • Fast startup • High throughput • Self-Tuned Thread Pool
  • 35. 40 <feature>servlet-4.0</feature> <feature>jsf-2.3</feature> Just Enough Application Server • You control which features are loaded into each server instance Kernel servlet-4.0 http-2.0 appmgr jsp-2.3 jsf-2.3 Java EE/Jakarta EE
  • 36. 41 API Support • First shipped in WAS 8.5 in 2012 o Servlet + JSP + JPA • Web Profile 6 in 2014 • Java EE 7 in 2016 – first commercial product to certify • Java EE 8 in 2018 – first to certify • Jakarta EE 8 in 2019 – first to certify • Eclipse MicroProfile – first to deliver 1.0-1.4, 2.0-2.1, 3.0
  • 37. 42
  • 38. 43 Quarkus • Unified Configuration • Zero config, live reload • Streamlined code for the 80% common usages • Native Execution • Support for many libraries such as MicroProfile
  • 41. 46 46 Tweaking the JVM Making Your Java Code Perform
  • 42. 47 Making the most out of any JVM 1. Writing efficient code 2. Use the right JVM for your needs 3. Pick a runtime that is right for your application 4. Use Profiling to get the most out of your JVM 5. Tweak your JVM depending on your needs in development and production
  • 43. 48 1. Writing efficient code • Use primitives where possible • Use a StingBuilder rather than an StringBuffer • Avoid using an Iterator • Avoid using BigInteger and BigDecimal
  • 44. 49 2. Use the right JVM for your needs
  • 45. 50 3. Pick a runtime that is right for your application Architectural style Functions Monolith Microservice API needs Smaller Larger Macroservice Open Liberty WAS Quarkus
  • 46. 51 4. Profiling Java Profilers are really useful tools that enable you to monitor Java bytecode constructs and operations inside the JVM. This includes things such as: • Garbage Collections • Object Creation • Method Executions • Iterative Executions • Thread Executions
  • 47. 52 4. Profiling Cont Most Popular Java Profilers: • JProfiler • YourKit • Java VisualVM • NetBeans Profiler • Oracle Java Mission Control (Included in Oracle JDK)
  • 48. 53 5. Tweak your JVM • Tune your Garbage Collector (GC) • Use the AOT Compiler • Enable Class Data Sharing (HotSpot & OpenJ9) • Enable Idle Tuning • Use a JIT Server • Start with min Heap Size
  • 49. 54 54 OpenJ9 Class Data Sharing For Super Fast Start-up
  • 50. 55 • A shared classes cache is an area of shared memory of a fixed size that persists beyond the lifetime of the JVM or a system reboot unless a non- persistent shared cache is used. Any number of shared caches can exist on a system, and all are subject to operating system settings and restrictions. • A shared cache cannot grow in size. When it becomes full, JVMs can still load classes from it but can no longer store any data into it. You can create a large, shared classes cache up front, while setting a soft maximum limit on how much shared cache space can be used. You can increase this limit when you want to store more data into the shared cache without shutting down the JVMs that are connected to it. What is class sharing?
  • 51. 56 When a JVM loads a class, it first looks in the class loader cache to see if the class it needs is already present. If yes, it returns the class from the class loader cache. Otherwise, it loads the class from the filesystem and writes it into the cache as part of the defineClass() call. Therefore, a non-shared JVM has the following class loader lookup order: • Classloader cache • Parent • Filesystem In contrast, a JVM running with the class sharing feature uses the following order: • Classloader cache • Parent • Shared classes cache • Filesystem How does class sharing work?
  • 52. 57 To enable class sharing, add -Xshareclasses[:name=<cachename>] to an existing Java command line. You can specify the shared cache size using the parameter - Xscmx<size>[k|m|g. This parameter only applies if a new shared cache is created. How to Enabling class sharing
  • 53. 58 0 2 4 6 8 10 12 Open Liberty 20.0.0.4 TomEE 8.0.0-M3-microprofile Tomcat 9.0.22 + OpenWebBeans 2.0.11(CDI) + CXF 3.3.2 (jaxrs) Wildfly 17.0.1 javaee JBoss 7.2 Glassfish web 5 Payara web 5.192 PingPerf application startup time with HotSpot (in seconds) Startup time comparison (using HotSpot JVM)
  • 54. 59 0 1 2 3 4 5 6 7 8 Open Liberty 20.0.0.4 TomEE 8.0.0-M3-microprofile Tomcat 9.0.22 + OpenWebBeans 2.0.11(CDI) + CXF 3.3.2 (jaxrs) Wildfly 17.0.1 javaee JBoss 7.2 Glassfish web 5 Payara web 5.192 PingPerf application startup time with OpenJ9 Shared Classes Cache (in seconds) Startup time comparison (using OpenJ9 JVM)
  • 55. 60 Open Liberty and OpenJ9 shared classes cache in Docker 0 2 4 6 8 Open Liberty Docker image without shared classes cache Open Liberty Docker image with shared classes cache AcmeAir MS Startup time in Docker (in seconds)
  • 56. 61 0 0.5 1 1.5 2 2.5 December '18 March '19 April '19 July '19 August '19 September '19 April '20 2018-2020 Progression of OpenLiberty+OpenJ9 startup time (seconds) Open Liberty with OpenJ9: the road to one second startup time OpenJ9 : Improved Cached feature metadata when no change to server.xml Changed bundle activation to start in parallel Better AOT code RAS processing Optimized loading of CXF JSON/JSONB provider RAS annotation processing at build time JMX MBeanServer init Cached annotation information for built-in JAX-RS Providers Cached plugin xml and OSGi metadata OpenJ9 : GC hints in shared classes cache Reduced class loading during startup Reduced logging overhead OpenJ9 : More AOT code in shared classes cache OpenJ9 : Optimize class verification overhead
  • 58. 63 Interactive Demo If you want to run through the demo’s at the same time please go to: https://openliberty.skillsnetwork.site/cloud-native-java-made-easy-with- microprofile
  • 60. 65 OpenJ9 JVM judiciously uses computing resources Computing resources == Cloud it’s about sharing; do not be greedy in using all resources • OpenJ9 is conservative with heap growth • OpenJ9 frees memory used transiently during JIT compilation 0 100 200 300 400 500 600 700 800 1GB 2GB 4GB Resident set size (MB) Container limit Steady state memory footprint in AcmeAir OpenJ9 Hotspot For large containers OpenJ9 uses less than half the memory
  • 61. 66 Free Resources when Applications are Idling -XX:+IdleTuningGcOnIdle (default setting in container) Benchmark: https://github.com/blueperf/acmeair More details: https://developer.ibm.com/javasdk/2017/09/25/still-paying-unused-memory-java-app-idle anthesisgroup.com: “Some 30 percent of VMs are zombies” https://anthesisgroup.com/wp-content/uploads/2017/03/Comatsoe-Servers-Redux-2017.pdf 1. Detect idle state 2. Trigger GC 3. Compact Java heap 4. Send OS reclamation hint OpenJ9 frees resources when applications are idling
  • 63. 68 JIT server JIT JVM JITServer JIT JVM JIT JVM Orchestrator load balancing, affinity, scaling, reliability JITServer
  • 64. 69 JITServer Performance Throughput benefits grow in constrained environments 0 200 400 600 800 1000 1200 1400 0 100 200 300 400 500 600 Throughput (pages/sec) Time (sec) --cpus=1, -m=300m JITServer OpenJ9 0 200 400 600 800 1000 1200 1400 0 100 200 300 400 500 600 Throughput (pages/sec) Time (sec) --cpus=1, -m=256m JITServer OpenJ9 0 200 400 600 800 1000 1200 1400 0 100 200 300 400 500 600 Throughput (pages/sec) Time (sec) --cpus=1, -m=200m JITServer OpenJ9 Smaller memory limit JIT server performance : Open Liberty Daytrader7 throughput
  • 65. 70 How to enable a JIT Server Launch OpenJ9 in client mode so that the VM sends requests to the JITServer using the following command: “-XX:+IseJITServer” Then run the following command to start a JITServer process that listens for incoming compilation requests: “jitserver”
  • 66. 73 73 Recap What if anything have you learned today?
  • 67. 74 How do you get the most out of your JVM? Write efficient code Use the right JVM for your needs Pick a runtime that is right for your application Use Profiling & Tweaking your JVM = Less Money & Energy!
  • 68. 75 Links and Materials JVM’s • AdoptOpenJDK: https://adoptopenjdk.net/ • OpenJ9: https://www.eclipse.org/openj9/ • HotSpot JDK: https://openjdk.java.net/groups/hotspot/ • Oracle JDK: https://www.oracle.com/uk/java/technologies/javase- downloads.html • GraalVM: https://www.graalvm.org/ • Azul (Zulu): https://www.azul.com/downloads/zulu-community/ • Amazon JDK: https://aws.amazon.com/corretto/ Runtimes • Open Liberty Site: https://openliberty.io/ • Open Liberty Guides: https://openliberty.io/guides • Quarkus Site: https://quarkus.io/ Other Useful Links • Jakarta EE Homepage: https://jakarta.ee/ • OpenJ9 JIT Server Doc: https://www.eclipse.org/openj9/docs/jitserver/ • OpenJ9 Class Data Sharing Doc: https://www.eclipse.org/openj9/docs/shrc/ • OpenJ9 Idle Tuning Doc: https://www.eclipse.org/openj9/docs/xxidletuninggconidle/
  • 69. 76 References to research for this talk • https://snyk.io/blog/36-of-developers-switched-from-oracle-jdk-to-an-alternate-openjdk- distribution-over-the-last-year/ • https://en.wikipedia.org/wiki/List_of_Java_virtual_machines • https://www.guru99.com/java-virtual-machine- jvm.html#:~:text=Java%20Virtual%20Machine%20(JVM)%20is,code%20for%20a%20pa rticular%20system. • https://dzone.com/articles/jvm-architecture-explained • https://www.quora.com/Whats-the-attraction-of-the-JVM-platform • https://stackify.com/java-performance-tuning/ • https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines • https://www.baeldung.com/java-profilers
  • 70. 77 77 Thank You Jamie Lee Coleman Software Developer/Advocate @ IBM jlcoleman@uk.ibm.com @Jamie_Lee_C