Skip to content

Heap capacity is way too generous than what's actually needed (for Quarkus) #521

@franz1981

Description

@franz1981

Since we claimed Quarkus to be very "dense" and memory efficient - i would like this to show up in JVM mode as well.
JVM mode sadly is relying on the usual generational hp and typical batchy/delayed laziness of runtime GCs (serialGC probably is slightly different).

I have verified that Spring and Quarkus, on the tuned profile, in the perf lab, have both some spare heap capacity, by using Flight Recorder
using the default 512 MB and G1:

Quarkus3-jvm

Image

Spring4-jvm

Image

This shows that Quarkus can run quite efficiently young GC pauses, getting back (after GC runs) to ~45MB while Spring ~90MB.

The performance is 13.8K tps for Quarkus and 7.6K tps for Spring.

If we reduce the heap to 128 MB - the numbers clearly change dramatically - given that:

  • Spring has a much higher allocation rate
  • Spring has less available capacity

I feel bad about it, but - let me show you the numbers first:

  • Spring4 jvm drop from 7.6K tps to 734 tps (!!!!!!!!!)
  • Quarkus3 jvm drop from 13.8K tps to 10.5K tps

And the GC behaviour, instead...

Quarkus3

Image

Spring4

Image

The statistics helps too, to understand what's going on:

Quarkus3

Image

Spring4

Image

Which shows that Spring is dying due to old-gen pauses while Quarkus is still operating at a decent SLA level.

So, 128m is good and enough w Quarkus, but Spring nope - what should be right to do here?

The purpose of the benchmark is to "stress what the framework does" - at CPU level - but GC is a kind of tax which is known to be paid only if you don't use it well. And currently we give to Quarkus way more capacity than it really needs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions