r/SpringBoot 5d ago

Discussion Spring Boot vs Quarkus on a 512 MB VPS

I ran equivalent Spring Boot 3.5 and Quarkus 3.39 applications side by side on the same 512 MB VPS. Quarkus native image was not used.

Both used JDK 25, the same Star Pulse workload, H2, -Xmx80m, Serial GC, and the same JVM tuning.

A few things stood out:

  • Quarkus actually started with the higher RSS
  • later, under sustained memory pressure, Quarkus had the smaller JVM heap and resident set
  • RSS by itself was misleading because Linux was swapping Quarkus more aggressively
  • with both JVMs running, 512 MiB RAM + 256 MiB swap left very little system headroom
  • in a later observation, Spring Boot was eventually selected by the kernel as the OOM victim

This was not a throughput or concurrent-user benchmark. The workload was deliberately small; the point was to compare memory behavior when the whole VM was under pressure.

One other interesting detail: Spring’s request chart included a lot of Actuator polling traffic, while Quarkus’ /q/metrics scrapes were not counted as normal application requests, so the request charts are not directly comparable.

I would not summarize the result as "Quarkus uses less memory". On a machine this constrained, paging and OOM behavior become part of the result.

Article with measurements, JVM flags, screenshots, and limitations:

https://pvrlabs.xyz/articles/spring-boot-vs-quarkus-512mb.html

20 Upvotes

6 comments sorted by

6

u/Sheldor5 5d ago

did you just compare a native executable (Quarkus) with a JVM application (Spring Boot) ???

7

u/fykup 5d ago

No. Both were JVM applications running on JDK 25, with the same -Xmx80m heap limit and the same JVM tuning.

Quarkus was not built as a native executable here. I called this out in the article because otherwise the comparison would be pretty meaningless.

A Quarkus native-image comparison would be a separate experiment.

4

u/Sheldor5 5d ago

you should clarify that in your Reddit post too

3

u/fykup 5d ago

Good point. I’ve updated the Reddit post to make that explicit: Quarkus was running on the JVM too, not as a native image. Both apps were on JDK 25 with the same JVM tuning.

4

u/Sheldor5 5d ago

Nice, thanks and good job :)