<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/optimized-spring-boot-on-jdk-27-68-faster-startup-and-25-mib-less-ram-on-a-512-mib-vm-tested-spri-zmgtnvwbz" -->

---
title: Optimized Spring Boot on JDK 27: 68% faster startup and...
description: Combining extracted layout, Spring AOT and a trained JDK 27 AOT cache cut Spring Boot startup from 11.91 to 3.79 seconds and lowered median app RSS from 212.0...
canonical: https://daily.dev/posts/optimized-spring-boot-on-jdk-27-68-faster-startup-and-25-mib-less-ram-on-a-512-mib-vm-tested-spri-zmgtnvwbz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Optimized Spring Boot on JDK 27: 68% faster startup and 25 MiB less RAM on a 512 MiB VM. Tested Spring AOT, JDK AOT cache, MyBatis, and embedded H2. Results and trade-offs included. | daily.dev
og:description: Combining extracted layout, Spring AOT and a trained JDK 27 AOT cache cut Spring Boot startup from 11.91 to 3.79 seconds and lowered median app RSS from 212.0...
og:url: https://daily.dev/posts/optimized-spring-boot-on-jdk-27-68-faster-startup-and-25-mib-less-ram-on-a-512-mib-vm-tested-spri-zmgtnvwbz
og:image: https://api.daily.dev/og/posts/zmGtnVWBZ.png
og:image:alt: Optimized Spring Boot on JDK 27: 68% faster startup and 25 MiB less RAM on a 512 MiB VM. Tested Spring AOT, JDK AOT cache, MyBatis, and embedded H2. Results and trade-offs included.
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.

# Optimized Spring Boot on JDK 27: 68% faster startup and 25 MiB less RAM on a 512 MiB VM. Tested Spring AOT, JDK AOT cache, MyBatis, and embedded H2. Results and trade-offs included.

**[Java Experiments](https://daily.dev/sources/javaexperiments)** · [@ejboy](https://daily.dev/ejboy) · 1 upvotes · 2 comments

## Summary

Combining extracted layout, Spring AOT and a trained JDK 27 AOT cache cut Spring Boot startup from 11.91 to 3.79 seconds and lowered median app RSS from 212.0 to 186.9 MiB. On a 512 MiB VM, the ordinary JAR deployment spent 148 of 298 load samples below 32 MiB available host memory, while the optimized build had none. Replacing Spring JDBC with MyBatis Core showed no clear memory saving and cost automatic transaction and metrics integration. Swapping MariaDB for file-backed H2 raised app RSS to 202.9 MiB but freed more host memory by removing the separate database process. Spring Boot 4.1.1 and HotSpot 27+35 were used, with a -Xmx80m max heap.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://pvrlabs.xyz/articles/spring-boot-jdk27-optimizations.html>

## Community discussion

Top comments from developers on daily.dev.

**@ahmetozel** · 0 upvotes

> The timestamp-changing transfer is a useful distinction between application readiness and optimization readiness. Both deployments can pass health checks while one silently falls back from the trained cache, so the performance premise needs its own observable signal.
>
> I would capture cache acceptance and the artifact/JDK identity in the deployment record, then deliberately test a rejected-cache artifact. That gives the release pipeline a recognizable degraded state instead of relying on startup timing to infer cache use. It also makes a later regression easier to separate from changes in the...

## 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
- [How is Leyden improving Java Performance? Part 2 of](https://daily.dev/posts/how-is-leyden-improving-java-performance-part-2-of-k95xs5i7z) · Foojay.io · 1 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
- [GraalVM: Fast Java, Fine Print](https://daily.dev/posts/graalvm-fast-java-fine-print-fgozwvxtr) · Medium · 11 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/optimized-spring-boot-on-jdk-27-68-faster-startup-and-25-mib-less-ram-on-a-512-mib-vm-tested-spri-zmgtnvwbz)

```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/optimized-spring-boot-on-jdk-27-68-faster-startup-and-25-mib-less-ram-on-a-512-mib-vm-tested-spri-zmgtnvwbz","headline":"Optimized Spring Boot on JDK 27: 68% faster startup and 25 MiB less RAM on a 512 MiB VM. Tested Spring AOT, JDK AOT cache, MyBatis, and embedded H2. Results and trade-offs included.","text":"Shared: How Far Can You Optimize Spring Boot Without Overengineering It?","url":"https://daily.dev/posts/optimized-spring-boot-on-jdk-27-68-faster-startup-and-25-mib-less-ram-on-a-512-mib-vm-tested-spri-zmgtnvwbz","datePublished":"2026-10-27T17:27:28.491Z","dateModified":"2026-10-27T17:50:04.013Z","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":2490}},"image":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/pzcmEtW78"},"comment":[{"@type":"Comment","text":"The timestamp-changing transfer is a useful distinction between application readiness and optimization readiness. Both deployments can pass health checks while one silently falls back from the trained cache, so the performance premise needs its own observable signal.\nI would capture cache acceptance and the artifact/JDK identity in the deployment record, then deliberately test a rejected-cache artifact. That gives the release pipeline a recognizable degraded state instead of relying on startup timing to infer cache use. It also makes a later regression easier to separate from changes in the application workload.","datePublished":"2026-10-30T05:49:14.490Z","url":"https://daily.dev/posts/zmGtnVWBZ#c-0Hq88Hy3v","author":{"@type":"Person","name":"Ahmet Özel","url":"https://daily.dev/ahmetozel","image":"https://avatars.githubusercontent.com/u/70992231?v=4"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/javaexperiments","name":"Java Experiments"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Java Experiments","item":"https://daily.dev/squads/javaexperiments"},{"@type":"ListItem","position":3,"name":"Optimized Spring Boot on JDK 27: 68% faster startup and 25 MiB less RAM on a 512 MiB VM. Tested Spring AOT, JDK AOT cache, MyBatis, and embedded H2. Results and trade-offs included."}]}
```

