Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Memory consumption is bigger in native images #787

@ghost

Description

In a Kubernetes environment, when I switched from JVM-hotspot images to native images, all built with Spring Native 0.10.0-SNAPSHOT and Spring-Boot 2.5.0-RC1, I notice that memory consumption of pods is bigger for Native images that HotSpot running images.

I coded a POC in https://github.com/scalastic/hotspot-vs-native where hasher-java and rng-java sub-projects are the apps deployed as HotSpot or Native pods in Kubernetes.

Here the screen capture of Grafana showing RAM consumption https://github.com/scalastic/hotspot-vs-native#switch-to-native-built-app:

  1. Graphs line Random Number Generation monitors rng-java app
  2. Graphs line Hasher monitors hasher-java app
  • At 13:51: Switch is done
  • Between 13:51 and 13:56: JVM and Native images co-exist
  • At 13:56: Only native images exist and we see memory increasing

Is that normal while everyone praises the frugality of native images ? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions