However, playing with native vs non-native container builds, I see that the memory usage actually got slightly bigger. Am I misconfiguring something? The code itself is fairly simple, consisting of a Hibernate class that interacts with a single Postgres table. Thank you.
Expected behavior
Smaller file memory usage when deployed into Docker
Actual behavior
Larger memory size in Docker
How to Reproduce?
Native container build: mvnw clean install -Dnative "-Dquarkus.container-image.build=true" "-Dquarkus.native.container-build=true" "-Dquarkus.buildpack.builder-env.BP_JVM_VERSION=17"
leads to a Docker file of size 300.95 MB, and docker stat of:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
f9f9dac37ad3 focused_swartz 0.10% 230.2MiB / 7.671GiB 2.93% 10.6kB / 8.04kB 0B / 0B 50
vs
Non-native container build: mvnw clean install "-Dquarkus.container-image.build=true" "-Dquarkus.buildpack.builder-env.BP_JVM_VERSION=17"
leads to a Docker file of size 254.35 MB - it builds properly but I'm currently unable to reproduce this (ERROR: failed to launch: determine start command: when there is no default process a command is required - will update issue when I figure this out, but from a previous run, my 'docker stat' was:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
cdb6992ba593 reverent_bhaskara 0.09% 212.7MiB / 7.671GiB 2.71% 10.3kB / 8.08kB 0B / 0B 48
Output of uname -a or ver
Windows 11
Output of java -version
liberica 21.0.3-12
Mandrel or GraalVM version (if different from Java)
Describe the bug
Hello, sorry, I am pretty new to web development, so I apologize if this is a basic question. I am trying to build a Quarkus tutorial into native container as I saw that it would lead to less memory usage so I can deploy it on a smaller VM (currently targeting fly.io's free tier) after working through guides such as https://www.codecentric.de/wissens-hub/blog/spring-boot-flyio and https://www.freecodecamp.org/news/get-started-with-quarkus-and-jpastreamer-2/
However, playing with native vs non-native container builds, I see that the memory usage actually got slightly bigger. Am I misconfiguring something? The code itself is fairly simple, consisting of a Hibernate class that interacts with a single Postgres table. Thank you.
Expected behavior
Smaller file memory usage when deployed into Docker
Actual behavior
Larger memory size in Docker
How to Reproduce?
Native container build:
mvnw clean install -Dnative "-Dquarkus.container-image.build=true" "-Dquarkus.native.container-build=true" "-Dquarkus.buildpack.builder-env.BP_JVM_VERSION=17"
leads to a Docker file of size 300.95 MB, anddocker stat
of:vs
Non-native container build:
mvnw clean install "-Dquarkus.container-image.build=true" "-Dquarkus.buildpack.builder-env.BP_JVM_VERSION=17"
leads to a Docker file of size 254.35 MB - it builds properly but I'm currently unable to reproduce this (ERROR: failed to launch: determine start command: when there is no default process a command is required
- will update issue when I figure this out, but from a previous run, my 'docker stat' was:Output of
uname -a
orver
Windows 11
Output of
java -version
liberica 21.0.3-12
Mandrel or GraalVM version (if different from Java)
Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37)
Quarkus version or git rev
3.12.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)3.9.7 (via Scoop)
Additional information
pom.xml: