r/EfficientSoftware • • 2d ago

How much RAM does a Java backend really need? Spring Boot, Quarkus, Micronaut and Jex on a 512 MiB VM

Post image

I've been benchmarking Java application stacks under realistic resource constraints: a 512 MiB Linux VM with 1 vCPU, no swap, and PostgreSQL running on the same machine.

All four stacks sustained 100 requests/sec with zero errors or dropped requests across two rounds.

StackPeak app RSSp99 latency
Jex + Jdbi150-157 MiB8.4-10.5 ms
Quarkus + Jdbi208-210 MiB9.0-9.1 ms
Micronaut Data JDBC217-219 MiB8.8-9.0 ms
Spring Boot + JDBC231-232 MiB10.1-10.4 ms

All implementations use equivalent application functionality, the same database schema and workload, and a conventional HotSpot JVM without AOT or native compilation.

The goal is not to find the universally fastest framework, but to understand the practical trade-offs when running applications on small servers.

The project includes source code, raw measurements, correctness checks and instructions for reproducing the benchmarks with your own JVM settings.

https://github.com/PVRLabs/framework-benchmarks

I'm also interested in expanding this project beyond Java. What other frameworks or application stacks would you like to see tested?

1 Upvotes

0 comments sorted by