SlideShare ist ein Scribd-Unternehmen logo
1 von 34
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
graalvm-performance/
Presented at QCon New York
www.qconnewyork.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Maximizing Performance
with
Thomas Wuerthinger (@thomaswue)
Senior Research Director
Oracle Labs
June 25, 2019
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, timing, and pricing of any
features or functionality described for Oracle’s products may change and remains at the
sole discretion of Oracle Corporation.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Startup Time Peak Throughput
Memory Footprint Max Latency
Packaging Size
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
standalone
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
native-image MyMainClass
./mymainclass
JIT AOT
java MyMainClass
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
GraalVM AOT for Native Images
Ahead-of-Time
Compilation
Application
Libraries
JDK
Substrate VM
Points-to Analysis
Run Initializations
Heap Snapshotting
Input:
All classes from application,
libraries, and VM
Iterative analysis until
fixed point is reached
Code in
Text Section
Image Heap in
Data SectionImage Heap
Writing
Output:
Native executable
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Startup Time
• JIT
– Load JVM executable
– Load classes from file system
– Verify bytecodes
– Start interpreting
– Run static initializers
– First tier compilation (C1)
– Gather profiling feedback
– Second tier compilation (GraalVM or C2)
– Finally run with best machine code
• AOT
– Load executable with prepared heap
– Immediately start with best machine code
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Startup Time
940 ms
2101 ms
988 ms
16 ms
37 ms
35 ms
0 ms 500 ms 1000 ms 1500 ms 2000 ms 2500 ms
Quarkus
Micronaut
Helidon
GraalVM AOT GraalVM JIT
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Java Flight Recorder Compilation Information
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Memory Footprint
• JIT
– Loaded JVM executable
– Application data
– Loaded bytecodes
– Reflection meta-data
– Code cache
– Profiling data
– JIT compiler data structures
• AOT
– Loaded application executable
– Application data
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
121 MB
180 MB
106 MB
17 MB
41 MB
31 MB
0 MB 20 MB 40 MB 60 MB 80 MB 100 MB 120 MB 140 MB 160 MB 180 MB 200 MB
Quarkus
Micronaut
Helidon
GraalVM AOT GraalVM JIT
AOT vs JIT: Memory Footprint
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Web Server Startup and Memory Footprint
• JIT 800ms / 350Mb • AOT 8ms / 13Mb
Starting up and serving 2 requests in the first 10s
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Which is fastest?
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Performance is hard to measure
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Throughput
0
2,000
4,000
6,000
8,000
10,000
12,000
14,000
16,000
18,000
1,000 10,000 100,000 1,000,000 10,000,000
Cumulative number of requests sent by ApacheBench
Native Image (CE)
JDK 8, Java HotSpot VM
Handled requests per second
GraalVM AOT
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Profile-Guided Optimizations (PGO)
native-image
--pgo-instrument
Instrumented
Binary
native-image --pgo
Optimized
Binary
Profiles (.iprof)
Relevant
Workloads
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Throughput
0
2,000
4,000
6,000
8,000
10,000
12,000
14,000
16,000
18,000
1,000 10,000 100,000 1,000,000 10,000,000
Cumulative number of requests sent by ApacheBench
Native Image (EE with PGO)
Native Image (CE)
JDK 8, Java HotSpot VM
Handled requests per second
GraalVM AOT with PGO
GraalVM AOT
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Peak Performance
• JIT
– Profiling at startup enabled better
optimizations
– Can make optimistic assumptions about
the profile and deoptimize
• AOT
– Needs to handle all cases in machine code
– Profile-guided optimizations help
– Predictable performance
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
More Benchmarks…
• Optimizing a compiler for too few benchmarks results in typical
overfitting problems
• Therefore we started together with academic collaborators
https://renaissance.dev
• All benchmark data can be interesting; careful with conclusions though.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Rennaissance.dev
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Max Latency
• JIT
– Many low latency GC options available
• G1
• CMS
• ZGC
• Shenandoah
• AOT
– Only regular stop&copy collector
– Assumes small heap configuration
– Can quickly restart; could use load
balancer instead of GC
• Peak vs max latency trade-offs:
– Loop safepoints
– Parallel stop-the-world GC
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
AOT vs JIT: Packaging Size
• JIT
– Use jlink for smaller package
– Lightweight docker image
(e.g., alpine linux)
• AOT
– Everything in single binary
– Can run on bare metal docker
– Substantially smaller constant overhead
• Peak vs packaging trade-offs:
– Inlining
– Code duplication
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Startup TimePeak Throughput
Memory FootprintMax Latency
Packaging Size
GraalVM JIT GraalVM AOT
No Configuration
Can AOT get better?
– Collecting profiles up-front
– Low-latency GC option
– Tracing agent for configuration
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
GraalVM can to much more…
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Multiplicative Value-Add of GraalVM Ecosystem
Languages GraalVM Embeddings* *
Java
JavaScript
Ruby
R
Python
C/C++. FORTRAN, …
HotSpot JVM
Oracle RDBMS
Node.js
Standalone
Spark
…
Optimizations
Tooling
Interoperability
Security
Add your own language or emedding or language-agnostic tools!
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
GraalVM Community
• https://www.graalvm.org
• Open source on GitHub at
https://github.com/oracle/graal
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
@thomaswue
Q/A
@graalvm
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
graalvm-performance/

Weitere ähnliche Inhalte

Mehr von C4Media

Mehr von C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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...
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Maximizing Performance with GraalVM

  • 1.
  • 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ graalvm-performance/
  • 3. Presented at QCon New York www.qconnewyork.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  • 4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Maximizing Performance with Thomas Wuerthinger (@thomaswue) Senior Research Director Oracle Labs June 25, 2019
  • 5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation.
  • 6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Startup Time Peak Throughput Memory Footprint Max Latency Packaging Size
  • 7. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | standalone
  • 8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
  • 9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | native-image MyMainClass ./mymainclass JIT AOT java MyMainClass
  • 10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | GraalVM AOT for Native Images Ahead-of-Time Compilation Application Libraries JDK Substrate VM Points-to Analysis Run Initializations Heap Snapshotting Input: All classes from application, libraries, and VM Iterative analysis until fixed point is reached Code in Text Section Image Heap in Data SectionImage Heap Writing Output: Native executable
  • 11. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Startup Time • JIT – Load JVM executable – Load classes from file system – Verify bytecodes – Start interpreting – Run static initializers – First tier compilation (C1) – Gather profiling feedback – Second tier compilation (GraalVM or C2) – Finally run with best machine code • AOT – Load executable with prepared heap – Immediately start with best machine code
  • 12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Startup Time 940 ms 2101 ms 988 ms 16 ms 37 ms 35 ms 0 ms 500 ms 1000 ms 1500 ms 2000 ms 2500 ms Quarkus Micronaut Helidon GraalVM AOT GraalVM JIT
  • 13. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Java Flight Recorder Compilation Information
  • 14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Memory Footprint • JIT – Loaded JVM executable – Application data – Loaded bytecodes – Reflection meta-data – Code cache – Profiling data – JIT compiler data structures • AOT – Loaded application executable – Application data
  • 15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 121 MB 180 MB 106 MB 17 MB 41 MB 31 MB 0 MB 20 MB 40 MB 60 MB 80 MB 100 MB 120 MB 140 MB 160 MB 180 MB 200 MB Quarkus Micronaut Helidon GraalVM AOT GraalVM JIT AOT vs JIT: Memory Footprint
  • 16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Web Server Startup and Memory Footprint • JIT 800ms / 350Mb • AOT 8ms / 13Mb Starting up and serving 2 requests in the first 10s
  • 17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Which is fastest?
  • 18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Performance is hard to measure
  • 19. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Throughput 0 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 1,000 10,000 100,000 1,000,000 10,000,000 Cumulative number of requests sent by ApacheBench Native Image (CE) JDK 8, Java HotSpot VM Handled requests per second GraalVM AOT
  • 20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Profile-Guided Optimizations (PGO) native-image --pgo-instrument Instrumented Binary native-image --pgo Optimized Binary Profiles (.iprof) Relevant Workloads
  • 21. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Throughput 0 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 1,000 10,000 100,000 1,000,000 10,000,000 Cumulative number of requests sent by ApacheBench Native Image (EE with PGO) Native Image (CE) JDK 8, Java HotSpot VM Handled requests per second GraalVM AOT with PGO GraalVM AOT
  • 22. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Peak Performance • JIT – Profiling at startup enabled better optimizations – Can make optimistic assumptions about the profile and deoptimize • AOT – Needs to handle all cases in machine code – Profile-guided optimizations help – Predictable performance
  • 23. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | More Benchmarks… • Optimizing a compiler for too few benchmarks results in typical overfitting problems • Therefore we started together with academic collaborators https://renaissance.dev • All benchmark data can be interesting; careful with conclusions though.
  • 24. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Rennaissance.dev
  • 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Max Latency • JIT – Many low latency GC options available • G1 • CMS • ZGC • Shenandoah • AOT – Only regular stop&copy collector – Assumes small heap configuration – Can quickly restart; could use load balancer instead of GC • Peak vs max latency trade-offs: – Loop safepoints – Parallel stop-the-world GC
  • 26. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | AOT vs JIT: Packaging Size • JIT – Use jlink for smaller package – Lightweight docker image (e.g., alpine linux) • AOT – Everything in single binary – Can run on bare metal docker – Substantially smaller constant overhead • Peak vs packaging trade-offs: – Inlining – Code duplication
  • 27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Startup TimePeak Throughput Memory FootprintMax Latency Packaging Size GraalVM JIT GraalVM AOT No Configuration Can AOT get better? – Collecting profiles up-front – Low-latency GC option – Tracing agent for configuration
  • 28. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | GraalVM can to much more…
  • 29. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Multiplicative Value-Add of GraalVM Ecosystem Languages GraalVM Embeddings* * Java JavaScript Ruby R Python C/C++. FORTRAN, … HotSpot JVM Oracle RDBMS Node.js Standalone Spark … Optimizations Tooling Interoperability Security Add your own language or emedding or language-agnostic tools!
  • 30. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | GraalVM Community • https://www.graalvm.org • Open source on GitHub at https://github.com/oracle/graal
  • 31. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | @thomaswue Q/A @graalvm
  • 32. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
  • 33.
  • 34. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ graalvm-performance/