SlideShare a Scribd company logo
How Class Data Sharing Can
Speed up Your Jakarta EE
Application Startup
Rudy De Busscher
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
Rudy De Busscher
• Payara
• Technical Sales
• Developer Advocate
• Involved in
• Committer of MicroProfile
• Committer in Eclipse EE4J groups
• Java EE Security API Expert group member
@rdebusscher
https://blog.payara.fish/
https://www.atbash.be
Agenda
• JVM internals related to Class
• Why fast startup important?
• Class Data Sharing
• Basics
• Demos
• Conclusion
Using a class
• new MyClass();
• Load Java Byte code (through the Classloader)
• Verification of Byte code
• Class file derivation (can result in IncompatibleClassChangeError)
• Preparation (~ variable initialisation)
• Resolution (resolve symbolic references)
• Interpreter uses code
Improvements?
• Can we improve this?
1. —noverify option
• Opens door for malicious byte code.
2. Native compilation
• Slow
• Lower peak performance
• Obscurity with reflection
• No JVTMI, Java Agents, …
3. Class Data Sharing - CDS
Why Fast Startup Important?
• Large surge in requests
• React fast
• Avoid refused connection during scale up.
• (Not cold startup problem with serverless)
Class Data Sharing - CDS
• Load, verify, derive
• Perform upfront
• Store info in memory mapped read-only file
• Loading class is much faster
• Memory requirements are lower (can be shared)
• Hello world -> 437 classes
• Payara Micro -> 15.000 classes
appCDS
• CDS
• JVM classes only (~ rt.jar)
• AppCDS
• Including your class-path
Using CDS
• OpenJDK
• -XX:DumpLoadedClassList=
• -XX:SharedArchiveFile=
• -XX:share:dump|on
• OpenJ9
• -Xshareclasses
Demo
Gain
• OpenJDK
• OpenJ9
Startup Time Memory
Plain 8,2 sec 49,8 Mb
CDS 5,2 sec 49,5 Mb
Startup Time Memory
Plain 7,9 sec 45.4 Mb
CDS 5,1 sec 42,9 Mb
35%
Docker images
• Several steps required
• Multi stage Docker file
• Shared Archive file can be in Image
• Layer is reused
• Shared Archive file can be outside
• On a volume
• Extra step in build or use podman build
Demo
“Pitfalls”
• Class path issues
• Classpath must be identical when using CDS than when CDS is
prepared
• Dynamic proxies can’t be used
• Pre 1.6 class formatted files can’t be used.
• Investigate issues -> -Xlog:load+class
• Shared Archive file is version and OS dependent
We’ll Support You With:
Let us help you spread the word about our open source software. Join the Reef!
• Event, JUG, conference sponsorship
• Freebies, swag, handouts, speakers
• Promotion and advertising of events and articles
• Community forum
Learn More:
www.payara.fish/reef
Payara Reef: Community Growth Program
Download the open source software:
payara.fish/downloads
Get Started:
payara.fish/get-started

More Related Content

What's hot (20)

PPTX
MVC 6 - the new unified Web programming model
Alex Thissen
 
PDF
CFWheels - Pragmatic, Beautiful Code
indiver
 
PPTX
ElasticKube, a Container Management Platform for Kubernetes
Matt Baldwin
 
PDF
Streaming to a New Jakarta EE
J On The Beach
 
PPT
Sebastien goasguen cloud stack the next year
ShapeBlue
 
PDF
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Arun Gupta
 
PDF
Application Deployment and Management at Scale with 1&1 by Matt Baldwin
Docker, Inc.
 
PPTX
Glass fish performance tuning tips from the field
Payara
 
PPTX
Microcontainers and Tools for Hardcore Container Debugging
Oracle Developers
 
PPTX
Сергей Радзыняк ".NET Microservices in Real Life"
Fwdays
 
PPT
Monitoring and Tuning GlassFish
C2B2 Consulting
 
PPTX
JavaEE Microservices platforms
Payara
 
PPTX
Container orchestration overview
Wyn B. Van Devanter
 
PPTX
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
Docker, Inc.
 
PPTX
Container Patterns
Matthias Luebken
 
PPTX
Application Deployment and Management at Scale at 1&1
Matt Baldwin
 
PPTX
Игорь Леонтьев "Azure Container Service: not only Docker"
Fwdays
 
PDF
On Prem Container Cloud - Lessons Learned
CodeOps Technologies LLP
 
PDF
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
PDF
Keynote Oracle Fusion Middleware Summit_2020
Michel Schildmeijer
 
MVC 6 - the new unified Web programming model
Alex Thissen
 
CFWheels - Pragmatic, Beautiful Code
indiver
 
ElasticKube, a Container Management Platform for Kubernetes
Matt Baldwin
 
Streaming to a New Jakarta EE
J On The Beach
 
Sebastien goasguen cloud stack the next year
ShapeBlue
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Arun Gupta
 
Application Deployment and Management at Scale with 1&1 by Matt Baldwin
Docker, Inc.
 
Glass fish performance tuning tips from the field
Payara
 
Microcontainers and Tools for Hardcore Container Debugging
Oracle Developers
 
Сергей Радзыняк ".NET Microservices in Real Life"
Fwdays
 
Monitoring and Tuning GlassFish
C2B2 Consulting
 
JavaEE Microservices platforms
Payara
 
Container orchestration overview
Wyn B. Van Devanter
 
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
Docker, Inc.
 
Container Patterns
Matthias Luebken
 
Application Deployment and Management at Scale at 1&1
Matt Baldwin
 
Игорь Леонтьев "Azure Container Service: not only Docker"
Fwdays
 
On Prem Container Cloud - Lessons Learned
CodeOps Technologies LLP
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
Keynote Oracle Fusion Middleware Summit_2020
Michel Schildmeijer
 

Similar to How Class Data Sharing Can Speed up Your Jakarta EE Application Startup (20)

PDF
Java Cloud and Container Ready
CodeOps Technologies LLP
 
PDF
JVMs in Containers
David Delabassee
 
PPTX
Start from the Package in Spring CDS - Basic course
João Esperancinha
 
PDF
It's always sunny with OpenJ9
DanHeidinga
 
PDF
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...
mfrancis
 
PPTX
Millions quotes per second in pure java
Roman Elizarov
 
PDF
Introduction to OSGi (Tokyo JUG)
njbartlett
 
PDF
Java is Container Ready - Vaibhav - Container Conference 2018
CodeOps Technologies LLP
 
PDF
JVMs in Containers - Best Practices
David Delabassee
 
PPTX
JIT vs. AOT: Unity And Conflict of Dynamic and Static Compilers
Nikita Lipsky
 
PDF
Mobile Code Optimisation Services
Raja Nagendra Kumar
 
PDF
Java Interview Questions Answers Guide
DaisyWatson5
 
PDF
Modular Architectures using Micro Services
Marcel Offermans
 
PPTX
Beirut Java User Group JVM presentation
Mahmoud Anouti
 
PPT
Best Practices for performance evaluation and diagnosis of Java Applications ...
IndicThreads
 
PPTX
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Anton Arhipov
 
PDF
Sample SRS format
Sachin Sharma
 
PPTX
Ahead-Of-Time Compilation of Java Applications
Nikita Lipsky
 
PDF
Jvm internals
Luiz Fernando Teston
 
DOC
Java Class Loading
Sandeep Verma
 
Java Cloud and Container Ready
CodeOps Technologies LLP
 
JVMs in Containers
David Delabassee
 
Start from the Package in Spring CDS - Basic course
João Esperancinha
 
It's always sunny with OpenJ9
DanHeidinga
 
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...
mfrancis
 
Millions quotes per second in pure java
Roman Elizarov
 
Introduction to OSGi (Tokyo JUG)
njbartlett
 
Java is Container Ready - Vaibhav - Container Conference 2018
CodeOps Technologies LLP
 
JVMs in Containers - Best Practices
David Delabassee
 
JIT vs. AOT: Unity And Conflict of Dynamic and Static Compilers
Nikita Lipsky
 
Mobile Code Optimisation Services
Raja Nagendra Kumar
 
Java Interview Questions Answers Guide
DaisyWatson5
 
Modular Architectures using Micro Services
Marcel Offermans
 
Beirut Java User Group JVM presentation
Mahmoud Anouti
 
Best Practices for performance evaluation and diagnosis of Java Applications ...
IndicThreads
 
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Anton Arhipov
 
Sample SRS format
Sachin Sharma
 
Ahead-Of-Time Compilation of Java Applications
Nikita Lipsky
 
Jvm internals
Luiz Fernando Teston
 
Java Class Loading
Sandeep Verma
 
Ad

More from Rudy De Busscher (16)

PDF
jakarta-integration-testing.pdf
Rudy De Busscher
 
PDF
core-profile_jakartaOne2022.pdf
Rudy De Busscher
 
PDF
MicroStream-WithoutDatabase.pdf
Rudy De Busscher
 
PDF
Jakarta EE 8 on JDK17
Rudy De Busscher
 
PDF
Finally, easy integration testing with Testcontainers
Rudy De Busscher
 
PDF
Control and monitor_microservices_with_microprofile
Rudy De Busscher
 
PDF
Transactions in micro-services (fall 2019)
Rudy De Busscher
 
PDF
Transactions in micro-services (summer 2019)
Rudy De Busscher
 
PDF
Gradual migration to MicroProfile
Rudy De Busscher
 
PDF
Secure JAX-RS
Rudy De Busscher
 
PDF
From Monolith to micro-services and back : The Self Contained Systems
Rudy De Busscher
 
PDF
Java EE Security API - JSR375: Getting Started
Rudy De Busscher
 
PDF
What is tackled in the Java EE Security API (Java EE 8)
Rudy De Busscher
 
PPTX
Java ee 8 + security overview
Rudy De Busscher
 
PPTX
Extending Arquillian graphene
Rudy De Busscher
 
PPTX
Octopus framework; Permission based security framework for Java EE
Rudy De Busscher
 
jakarta-integration-testing.pdf
Rudy De Busscher
 
core-profile_jakartaOne2022.pdf
Rudy De Busscher
 
MicroStream-WithoutDatabase.pdf
Rudy De Busscher
 
Jakarta EE 8 on JDK17
Rudy De Busscher
 
Finally, easy integration testing with Testcontainers
Rudy De Busscher
 
Control and monitor_microservices_with_microprofile
Rudy De Busscher
 
Transactions in micro-services (fall 2019)
Rudy De Busscher
 
Transactions in micro-services (summer 2019)
Rudy De Busscher
 
Gradual migration to MicroProfile
Rudy De Busscher
 
Secure JAX-RS
Rudy De Busscher
 
From Monolith to micro-services and back : The Self Contained Systems
Rudy De Busscher
 
Java EE Security API - JSR375: Getting Started
Rudy De Busscher
 
What is tackled in the Java EE Security API (Java EE 8)
Rudy De Busscher
 
Java ee 8 + security overview
Rudy De Busscher
 
Extending Arquillian graphene
Rudy De Busscher
 
Octopus framework; Permission based security framework for Java EE
Rudy De Busscher
 
Ad

Recently uploaded (20)

PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Biography of Daniel Podor.pdf
Daniel Podor
 
July Patch Tuesday
Ivanti
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 

How Class Data Sharing Can Speed up Your Jakarta EE Application Startup

  • 1. How Class Data Sharing Can Speed up Your Jakarta EE Application Startup Rudy De Busscher
  • 3. Rudy De Busscher • Payara • Technical Sales • Developer Advocate • Involved in • Committer of MicroProfile • Committer in Eclipse EE4J groups • Java EE Security API Expert group member @rdebusscher https://blog.payara.fish/ https://www.atbash.be
  • 4. Agenda • JVM internals related to Class • Why fast startup important? • Class Data Sharing • Basics • Demos • Conclusion
  • 5. Using a class • new MyClass(); • Load Java Byte code (through the Classloader) • Verification of Byte code • Class file derivation (can result in IncompatibleClassChangeError) • Preparation (~ variable initialisation) • Resolution (resolve symbolic references) • Interpreter uses code
  • 6. Improvements? • Can we improve this? 1. —noverify option • Opens door for malicious byte code. 2. Native compilation • Slow • Lower peak performance • Obscurity with reflection • No JVTMI, Java Agents, … 3. Class Data Sharing - CDS
  • 7. Why Fast Startup Important? • Large surge in requests • React fast • Avoid refused connection during scale up. • (Not cold startup problem with serverless)
  • 8. Class Data Sharing - CDS • Load, verify, derive • Perform upfront • Store info in memory mapped read-only file • Loading class is much faster • Memory requirements are lower (can be shared) • Hello world -> 437 classes • Payara Micro -> 15.000 classes
  • 9. appCDS • CDS • JVM classes only (~ rt.jar) • AppCDS • Including your class-path
  • 10. Using CDS • OpenJDK • -XX:DumpLoadedClassList= • -XX:SharedArchiveFile= • -XX:share:dump|on • OpenJ9 • -Xshareclasses
  • 11. Demo
  • 12. Gain • OpenJDK • OpenJ9 Startup Time Memory Plain 8,2 sec 49,8 Mb CDS 5,2 sec 49,5 Mb Startup Time Memory Plain 7,9 sec 45.4 Mb CDS 5,1 sec 42,9 Mb 35%
  • 13. Docker images • Several steps required • Multi stage Docker file • Shared Archive file can be in Image • Layer is reused • Shared Archive file can be outside • On a volume • Extra step in build or use podman build
  • 14. Demo
  • 15. “Pitfalls” • Class path issues • Classpath must be identical when using CDS than when CDS is prepared • Dynamic proxies can’t be used • Pre 1.6 class formatted files can’t be used. • Investigate issues -> -Xlog:load+class • Shared Archive file is version and OS dependent
  • 16. We’ll Support You With: Let us help you spread the word about our open source software. Join the Reef! • Event, JUG, conference sponsorship • Freebies, swag, handouts, speakers • Promotion and advertising of events and articles • Community forum Learn More: www.payara.fish/reef Payara Reef: Community Growth Program
  • 17. Download the open source software: payara.fish/downloads Get Started: payara.fish/get-started