GraalVM’s Ahead-of-Time Compilation: Benefits and Challenges in Production
2024 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesis
Abstract [en]
The widespread adoption of containerization for application deployment emphasizes the need for improved performance and efficiency, particularly in Java Virtual Machine (JVM)-based applications. Traditional JVMs often struggle with resource efficiency and long startup times, leading to increased operational costs and a larger environmental footprint. This is especially significant in microservices architectures where resource optimization is crucial for sustainability and cost-effectiveness.
This thesis aims to evaluate the effectiveness of GraalVM’s Ahead-of-Time (AOT)compilation and native image support in enhancing the performance of JVM-based applications within a microservices architecture. The focus is reducing startup times, improving resource utilization, and overall operational efficiency at Ericsson, contributing to a greener economy.
The research involved migrating a JVM-based program to run on GraalVM. Systematic performance tests measured key metrics such as startup time, memory usage, and performance. Semi-structured interviews with industry professionals were also utilized to gather qualitative insights into the migration challenges and benefits.
The results indicated that native images significantly reduced startup times and memory usage compared to standard JVMs. Profile Guided Optimization (PGO)massively increased performance but at the cost of compilation time, memory usage, and build size. Interviews revealed that developers are cautiously optimistic about the benefits of AOT compilation with GraalVM but also revealed major concerns about complexity and compatibility.
GraalVM’s AOT benefits make it a viable option for both microservice and serverless architectures. However, the decision to adopt GraalVM requires careful consideration of the trade-offs. These include larger build sizes, longer compilation times, and the need for specialized knowledge to maintain stability. Future work should focus on case studies in real-world environments to further validate and explore the benefits and drawbacks of AOT compilation..
Place, publisher, year, edition, pages
2024. , p. 38
Keywords [en]
GraalVM, Resource Efficiency, Performance Optimization, JVM, AOT
National Category
Other Engineering and Technologies
Identifiers
URN: urn:nbn:se:bth-26504OAI: oai:DiVA.org:bth-26504DiVA, id: diva2:1875531
External cooperation
Ericsson
Subject / course
PA1445 Kandidatkurs i Programvaruteknik
Educational program
PAGPT Software Engineering
Presentation
2024-05-29, J1630, Valhallavägen 10, Karlskrona, 09:09 (English)
Supervisors
Examiners
2024-06-242024-06-232025-02-10Bibliographically approved