<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-tested-three-spring-boot-runtime-layouts-the-big-difference-was-getting-out-of-the-fat-jar-fh35xffqh" -->

---
title: I tested three Spring Boot runtime layouts. The big...
description: Three experiments comparing Spring Boot runtime layouts on JDK 25 found the biggest performance gain comes from moving away from the nested fat JAR to a normal...
canonical: https://daily.dev/posts/i-tested-three-spring-boot-runtime-layouts-the-big-difference-was-getting-out-of-the-fat-jar-fh35xffqh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I tested three Spring Boot runtime layouts. The big difference was getting out of the fat JAR | daily.dev
og:description: Three experiments comparing Spring Boot runtime layouts on JDK 25 found the biggest performance gain comes from moving away from the nested fat JAR to a normal...
og:url: https://daily.dev/posts/i-tested-three-spring-boot-runtime-layouts-the-big-difference-was-getting-out-of-the-fat-jar-fh35xffqh
og:image: https://api.daily.dev/og/posts/fH35xffQh.png
og:image:alt: I tested three Spring Boot runtime layouts. The big difference was getting out of the fat JAR
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I tested three Spring Boot runtime layouts. The big difference was getting out of the fat JAR

**[Java and Spring Boot Squad](https://daily.dev/sources/javaandspringbootsquad)** · [@ejboy](https://daily.dev/ejboy) · 2 min read · 0 upvotes · 0 comments

## Summary

Three experiments comparing Spring Boot runtime layouts on JDK 25 found the biggest performance gain comes from moving away from the nested fat JAR to a normal filesystem layout, cutting median startup time by 23.3% and first-request latency by 34.1%. Further changes, like switching to a Gradle application distribution or a Jib-style fully exploded layout, made much smaller differences. The conclusion is that most overhead stems from Spring Boot's nested executable JAR mechanism rather than from keeping application classes bundled inside app.jar, though a larger codebase might show different results.

## Content

**TL;DR:** Across three experiments, Spring Boot's nested executable fat JAR was consistently the slow path. Moving dependencies out to a normal filesystem layout gave a clear startup and first-request improvement. Switching between different filesystem layouts, including Gradle `application` and a Jib-style exploded layout, made much less difference.

The original experiment used six paired runs on JDK 25. Spring Boot's official extracted layout reduced median startup from **11.056 s to 8.476 s (-23.3%)** and median first-request latency from **2.196 s to 1.448 s (-34.1%)**. Memory differences were small.

That result led to two follow-ups.

A conventional Gradle `application` distribution behaved much more like Spring Boot's extracted layout than the nested fat JAR.

Then I compared Spring Boot's extracted layout with a Jib-style exploded layout, where the application's own classes and resources are also moved out of `app.jar`. For this relatively small application, that additional step did not show a measurable runtime benefit.

So the pattern so far is:

**fat JAR → filesystem layout: noticeable improvement**
**filesystem layout → another filesystem layout: much smaller difference**

My current interpretation is that most of the overhead comes from Spring Boot's nested executable JAR path rather than from keeping the application's own classes inside `app.jar`.

One caveat: this application's own codebase is small compared with its dependencies. A much larger application could show a larger difference between extracted and fully exploded layouts.

Main experiment:
[https://pvrlabs.xyz/articles/spring-boot-extracted-layout.html](https://pvrlabs.xyz/articles/spring-boot-extracted-layout.html)

Gradle follow-up:
[https://pvrlabs.xyz/java-performance/experiments/gradle-application-vs-spring-boot.html](https://pvrlabs.xyz/java-performance/experiments/gradle-application-vs-spring-boot.html)

Jib follow-up:
[https://pvrlabs.xyz/java-performance/experiments/spring-boot-jib-layout.html](https://pvrlabs.xyz/java-performance/experiments/spring-boot-jib-layout.html)

## Similar posts on daily.dev

- [Improving First Request Latency in Java Spring Application](https://daily.dev/posts/improving-first-request-latency-in-java-spring-application-ngw8nzoq2) · Awesome Java Newsletter · 26 upvotes · 0 comments
- [Spring, Quarkus,Jooby, or Vert.x: Java Framework Comparison](https://daily.dev/posts/spring-quarkus-jooby-or-vert-x-java-framework-comparison-xbdsfwtwa) · Foojay.io · 15 upvotes · 0 comments
- [GraalVM: Fast Java, Fine Print](https://daily.dev/posts/graalvm-fast-java-fine-print-fgozwvxtr) · Medium · 11 upvotes · 0 comments
- [Speed up Java Startup with Spring Boot and Project Leyden](https://daily.dev/posts/speed-up-java-startup-with-spring-boot-and-project-leyden-14bdnocfp) · Piotr Minkowski TechBlog · 13 upvotes · 1 comments

---

Tags: [#java](https://daily.dev/tags/java), [#spring-boot](https://daily.dev/tags/spring-boot), [#gradle](https://daily.dev/tags/gradle)

[View this post on daily.dev](https://daily.dev/posts/i-tested-three-spring-boot-runtime-layouts-the-big-difference-was-getting-out-of-the-fat-jar-fh35xffqh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/i-tested-three-spring-boot-runtime-layouts-the-big-difference-was-getting-out-of-the-fat-jar-fh35xffqh","headline":"I tested three Spring Boot runtime layouts. The big difference was getting out of the fat JAR","text":"Three experiments comparing Spring Boot runtime layouts on JDK 25 found the biggest performance gain comes from moving away from the nested fat JAR to a normal filesystem layout, cutting median startup time by 23.3% and first-request latency by 34.1%. Further changes, like switching to a Gradle application distribution or a Jib-style fully exploded layout, made much smaller differences. The conclusion is that most overhead stems from Spring Boot's nested executable JAR mechanism rather than from keeping application classes bundled inside app.jar, though a larger codebase might show different results.","url":"https://daily.dev/posts/i-tested-three-spring-boot-runtime-layouts-the-big-difference-was-getting-out-of-the-fat-jar-fh35xffqh","datePublished":"2026-09-21T20:44:41.764Z","dateModified":"2026-09-21T20:44:59.093Z","author":{"@type":"Person","name":"Ted K","url":"https://daily.dev/ejboy","image":"https://media.daily.dev/image/upload/s--PzSRqJKu--/f_auto/v1787843390/avatars/avatar_Szw3t3q8eJYj5aTperuyF?_a=BAMAMicg0","description":"Building lightweight developer tools at PVR Labs.","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2380}},"image":"https://media.daily.dev/image/upload/s--2khZvnuo--/f_auto/v1790023482/posts/fH35xffQh?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/javaandspringbootsquad","name":"Java and Spring Boot Squad"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Java and Spring Boot Squad","item":"https://daily.dev/squads/javaandspringbootsquad"},{"@type":"ListItem","position":3,"name":"I tested three Spring Boot runtime layouts. The big difference was getting out of the fat JAR"}]}
```

