Java & Programing languagesJava & Programing languages
Conference50min
ADVANCED

Project Lilliput: What If Your Java Objects Took Less Space?

This talk explains Java object memory overhead, including headers, alignment, and JVM options, and shows how Project Lilliput’s Compact Object Headers reduce heap usage. Using JOL, attendees will learn to inspect real object layouts and understand performance and cost impacts at scale.

talk.summaryAiDisclaimer

Achraf Hasbi
Achraf HasbiMargo
Meryem Arroussi
Meryem ArroussiMargo
talks.description
This presentation explores the hidden memory cost of Java objects and how Project Lilliput reduces it through Compact Object Headers.

Java performance is strongly influenced by memory footprint. The more heap an application consumes, the more pressure it puts on the garbage collector, CPU caches, pause times, and infrastructure costs. Yet before storing any business data, every Java object already carries metadata in the form of an object header. Invisible in the source code, this overhead becomes significant when applications create millions or billions of objects.

We will examine how Java objects are represented in memory inside the JVM: object headers, field layout, references, alignment, padding, compressed ordinary object pointers, and the impact of JVM options on object size.

We will then introduce Project Lilliput and Compact Object Headers, explaining how they reduce object header size in HotSpot on 64-bit architectures and why a few bytes saved per object can matter at application scale.

To make the session practical, we will use JOL, the Java Object Layout tool from OpenJDK, to inspect real object layouts and compare JVM configurations.

Attendees will leave with a clear understanding of what a Java object really costs on the heap, how JVM features influence memory usage, and how to measure object layouts in practice.

This talk is aimed at Java developers, JVM enthusiasts, backend engineers, performance engineers, architects, and anyone interested in Java memory internals.
memory
java
objectheaders
lilliput
talks.speakers
Achraf Hasbi

Achraf Hasbi

Margo

France

Passionate about the Java ecosystem and the JVM, Achraf Hasbi works at the intersection of software development, performance engineering, and financial markets.

With a strong interest in low-latency challenges and high-throughput processing, he explores the inner workings of the JVM, Java application optimization, and the design of robust systems.

He is currently a Java Practice Lead and R&D Engineer at an investment bank. He also shares his expertise through technical articles on Medium, with a particular focus on the Java platform applied to the financial industry.

As the creator of Quant4J, an open-source Java library dedicated to quantitative finance, he enjoys exploring, experimenting, and sharing knowledge around Java, performance, and financial systems.

Medium: https://medium.com/@achrafhasbi
Meryem Arroussi

Meryem Arroussi

Margo

France

Meryem Arroussi is a Java Software Engineer working on algo trading systems in the financial sector. She specializes in building high-performance applications with Java and Spring, and is passionate about modern Java, software architecture, and AI-powered systems.
She regularly explores technologies such as Spring AI, Retrieval-Augmented Generation (RAG), Tool Calling, and Structured Outputs to help developers build intelligent applications.
Meryem shares her knowledge through technical writing and public speaking. She presented at Spring Meetup Paris on building intelligent chatbots with Spring AI and is the author of articles focused on Java, AI, and software engineering.
Her interests include java development, low-latency systems, distributed architectures, and the intersection of Artificial Intelligence and enterprise Java.