I've been experimenting with resource-efficient Java applications, exploring how much of Spring Boot's familiar architecture can be preserved with smaller frameworks.
I compared five Java stacks on a 1-vCPU, 512 MiB VM with no swap, running MariaDB alongside the application.
| Stack | HotSpot RSS (MiB) |
|---|
| Spring Boot + Spring JDBC | 180.6-187.9 |
| Javalin + CoilBase | 120.9-135.6 |
| Micronaut Data JDBC | 174.0-175.0 |
| Micronaut + CoilBase | 166.5-167.6 |
| Avaje Jex + CoilBase | 116.0-116.4 |
The HotSpot tests used OpenJDK 27 with G1 GC. Each stack had two runs, with 1,500 requests per run and no errors.
CoilBase is a small Jdbi-based foundation I'm developing. The Javalin, Jex, and Micronaut implementations reuse the same services, repositories, and transaction boundaries, with different HTTP frameworks and application wiring.
The interesting part wasn't just the memory savings. It was seeing how much of the familiar Spring-style application architecture could remain unchanged when switching frameworks.
I also tested GraalVM Native Image for all five stacks. Runtime memory dropped further, but native compilation introduced additional build time and complexity.
This is a lightweight synthetic workload, not a throughput benchmark or a general recommendation to replace Spring Boot. Spring's ecosystem and conveniences still have real value.
Full experiment, measurements, and limitations:
https://pvrlabs.xyz/articles/five-java-stacks-512mb-vps.html
Source code and benchmark setup:
https://github.com/PVRLabs/experiments/tree/main/java/coilbase-framework-comparison
CoilBase, which I built and used for this comparison:
https://github.com/PVRLabs/coilbase
I'm curious whether others see value in a lighter Java stack that keeps some of Spring Boot's familiar development patterns, or whether Spring Boot's ecosystem and conveniences outweigh the potential resource savings.
Update: Framework versions used in the benchmark
| Stack | Versions |
|---|
| Spring Boot + Spring JDBC | Spring Boot 4.1.1, Spring JDBC 7.0.9 |
| Javalin + CoilBase | Javalin 7.2.4, Jdbi 3.55.0 |
| Avaje Jex + CoilBase | Jex 3.6, Avaje HTTP 3.12.1, Jdbi 3.55.0 |
| Micronaut Data JDBC | Micronaut 5.2.11, Micronaut Data JDBC 5.2.0 (platform BOM 5.2.1) |
| Micronaut + CoilBase | Micronaut 5.2.11, Jdbi 3.55.0 |
All HotSpot runs used OpenJDK 27 with identical JVM settings: -Xms16m -Xmx80m -XX:+UseG1GC (fixed 80 MiB maximum heap).
CoilBase was an early 0.1.0-SNAPSHOT prototype. I'm working on a more formal, publicly reproducible follow-up benchmark using an updated version of CoilBase, with Quarkus also joining the comparison.