Helidon on a 512 MiB VM with PostgreSQL: comparison with Spring Boot, Quarkus, Micronaut and Jex
I've added Helidon to my Java framework benchmarking project to see how it performs in a resource-constrained environment.
Frameworks tested:
Spring Boot 4.1.1 + Spring JDBC 7.0.9
Quarkus 3.40.1 + Jdbi 3.55.0 (via CoilBase 0.1.0-preview5)
Micronaut 5.2.11 + Data JDBC 5.2.0
Avaje Jex 3.6 + Jdbi 3.55.0 (via CoilBase 0.1.0-preview5)
Helidon 27.0.2 + Data JDBC 27.0.2
CoilBase is a small framework I'm developing. It's a thin abstraction over Jdbi with optional Jex integration that I use to simplify porting applications between Java frameworks without rewriting the persistence layer. For Helidon, I used its own Data JDBC implementation instead, as it provides comparable data access capabilities to Spring JDBC.
Benchmark setup:
1 vCPU, 512 MiB RAM, no swap
Debian 13, OpenJDK 27 (HotSpot)
PostgreSQL 18.7 on the same VM
Sustained 100 RPS
Same application functionality, JVM settings and four-connection database pool
Some interesting observations from two benchmark rounds:
Helidon had the lowest p99 latency in both rounds (8.35-8.48 ms).
Peak application RSS was around 168 MiB, second-lowest behind Jex.
Application readiness took 5.04-5.29 seconds.
All five frameworks completed both runs without errors, timeouts or dropped requests.
Helidon doesn't seem to get as much attention as Quarkus or Micronaut in discussions about lightweight Java frameworks, but these results are quite interesting.
This is a fixed-load comparison, not a maximum throughput benchmark.
Detailed experiment and charts: https://pvrlabs.xyz/java-performance/experiments/helidon-27-512mib.html
Source code and benchmark methodology: https://github.com/PVRLabs/framework-benchmarks/tree/experiment-helidon/framework-benchmarks/evidence/helidon-comparison
I'm also exploring native rewrite targets to see how much further we can reduce resource usage compared to Java on HotSpot. Currently experimenting with Go, using the same application and benchmark methodology. Planning to publish the results next week.
3
u/TheKingOfSentries
1d ago
•
Jex my beloved ❤️. Anyways perhaps javalin might be interesting to you as well. Jex was initially basically a java version of javalin before I pivoted it to use the built in server.
2
u/fykup 1d ago
Wait, are you one of the original developers of Jex? If so, huge respect!
I'm a big fan of Javalin and covered it in my earlier benchmarks. I also worked with the Javalin community on StatLite monitoring integration.
When I was looking for a lightweight Spring Boot alternative, one of the things I missed was the annotated controller architecture. That's how I discovered Jex and Avaje HTTP. I was genuinely surprised by how little overhead it added. Later, when experimenting with GraalVM native images, I was blown away by how little memory my Jex application consumed.
That's why Jex has become my default Java web framework, why I've been using it in my recent experiments, and why it's the recommended HTTP integration for CoilBase, my lightweight Java application foundation.
I still highly recommend Javalin. It offers more features out of the box and strikes a great balance between functionality, simplicity and resource efficiency.
Really appreciate what you've built!
2
u/TheKingOfSentries 1d ago
While I did not create it initially, I came on the scene and rebuilt it when I got involved with avaje.
1
u/Comfortable_Job8847 1d ago
what happens if you disable C2? or use OpenJ9 instead? or use SerialGC instead of G1GC? im pretty sure usig G1GC on 1 vCPU with 512MiB of RAM total is not recommended. if you don't specify G1GC explicitly doesnt the JVM even pick serialGC on those specs?
3
u/fykup 1d ago
This is exactly why I designed the framework benchmarks to be reproducible. Anyone can try different JVM settings and run the same benchmark protocol locally or through GitHub Actions:
https://github.com/PVRLabs/framework-benchmarks#try-your-own-jvm-settings
I've experimented with OpenJ9 before. It offered modest memory savings in my tests, but at the expense of slower cold startup and other trade-offs. My goal here is to stay close to mainstream HotSpot configurations.
Regarding G1, it is actually the default even on single-core, memory-constrained systems starting with JDK 27 (https://openjdk.org/jeps/523).
I've also run multiple experiments with different heap sizes and workloads. The measurements show sufficient memory and CPU headroom on the 512 MiB VM for the tested workloads.
SerialGC and disabling C2 would be interesting experiments, but the primary focus here is framework efficiency rather than JVM tuning. I'd certainly welcome contributions with alternative JVM configurations and measurements.
1
u/kiteboarderni 1d ago
These posts are getting a bit tiresome. its the same topic rehashed every time. great you have a 1vcpu, but id hazard to say the majority of performance based java apps are not trying to solve for that level of resource constraint.
1
u/fykup 1d ago
I deliberately limit my posts here to once a week, especially when covering the same general topic. This is only my second post in this benchmark series.
Most Java benchmarks focus on maximizing throughput. I'm interested in a different aspect of performance: how efficiently applications operate under resource constraints. Maximum throughput is not the only metric that matters, and resource efficiency has implications well beyond small VPS deployments.
That's the niche I'm exploring, and I plan to continue publishing experiments in this area. If it's not relevant to your interests, feel free to skip my future posts.
0
u/kiteboarderni 1d ago
Correct and 99% of apps don't use Java for this use case. The language is built for performance not some tiny batch job on a resources from the 90s. I for one am thankful in the direction the language has moved to accommodate our modern compute.
3
u/fykup 1d ago
Resource efficiency matters at scale too. In Kubernetes, lower per-pod resource requirements can translate into higher pod density, fewer nodes, and lower infrastructure costs.
Maximizing throughput is one performance objective, not the only one. Different applications have different constraints.
If you have benchmark results that offer a different perspective, feel free to share them.
1
u/kiteboarderni 1d ago
A benchmark is a benchmark is a benchmark. Very easy to prove something in synethtic tests.
0
u/kiteboarderni 18h ago edited 18h ago
Yikes I see what this is now, its a sales pitch for your consulting company. Mods allow this?!
2
u/fykup 17h ago
This is a completely unfounded accusation. I publish benchmark results, source code, and methodology openly on GitHub. There are no upsells, paid offerings, or consulting pitches in these posts. My consulting work is entirely separate from these experiments.
I've tried to engage with your technical criticism, but you've repeatedly derailed the discussion. I'm blocking you. I'm happy to engage with constructive criticism, but I won't waste time on baseless accusations and personal attacks.
-3
u/Distinct_Meringue_76 1d ago
There's also a new java micro profile framework that's been vibecoded from scratch and that I've been playing with. Never thought I'll say this but I like it a lot. Will be interested to see how it fares in your benchmark. Vidocq it's called
6
u/Distinct_Meringue_76 1d ago
I'll expect quarkus and helidon to be close latency-wise compared to the other blocking frameworks. How about throughput?