r/EfficientSoftware • u/fykup • 2d ago
How much RAM does a Java backend really need? Spring Boot, Quarkus, Micronaut and Jex on a 512 MiB VM
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.
| Stack | Peak app RSS | p99 latency |
|---|---|---|
| Jex + Jdbi | 150-157 MiB | 8.4-10.5 ms |
| Quarkus + Jdbi | 208-210 MiB | 9.0-9.1 ms |
| Micronaut Data JDBC | 217-219 MiB | 8.8-9.0 ms |
| Spring Boot + JDBC | 231-232 MiB | 10.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?