-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building native-image with Micronaut Data JDBC, Oracle and JDK11 uses more memory than before #2150
Comments
Just a little bit more of information. This is the first commit in which I've seen it fail on CI: https://gitlab.com/micronaut-projects/micronaut-graal-tests/pipelines/116467455 |
@pejovica it looks like turning on the ParallelGC for Native Image in 5751bb1 generation increases memory usage on JDK 11. @ilopmar In 92d44c1 we merged a feature that improves the Native Image analysis performance: it significantly reduces both memory footprint and analysis time at the cost of a slight accuracy loss. This feature will be part of the 20.1.0 release but it is disabled by default; it can be enabled using |
@cstancu Thanks for the explanation. I've been doing some tests with the same test application and this is the output. Tests only with
|
Yes, the output is as expected. You need to focus on the |
Thank you very much for the explanation :) |
I am using Micronaut + Java 11 + Redis Cache + native-image, when deployed to k8s I can see the memory consumed per pod is between 45-55 Mi when ideal. |
|
Describe GraalVM and your environment:
Have you verified this issue still happens when using the latest snapshot?
Yes, trying with master branch.
Describe the issue
I've noticed that starting on commit
351f064c8d62989bb4592a3e4928c782e4bbe212
it seems that building native images with jdk 11 takes more memory than before.Our Micronaut test application for Micronaut Data JDBC and Oracle has started to fail consistently after the mentioned commit with OOM exceptions.
The last successful build was with the commit
d0421f791a1f24626729b90cc21b309780675dc1
.As you know we use Gitlab CI for the testing and it has some memory constraints but at to this point everything has worked.
Please also keep in mind that this works properly with JDK8.
Steps to reproduce the issue
This is how to reproduce the issue, but keep in mind that only happens because of the memory constraints of Gitlab CI. I was able to build it on my laptop and everything works without issues.
git clone https://github.com/micronaut-graal-tests/micronaut-data-jdbc-graal
cd micronaut-data-jdbc-graal
git checkout oracle
./build-native-image.sh
Expected behavior
It should be possible to generate the native image.
Additional context
This is the job detail of the failure: https://gitlab.com/micronaut-projects/micronaut-graal-tests/-/jobs/432151581
The error also points to
Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing oracle.jdbc.driver.OracleSqlReadOnly.<clinit>()
but I'm not really sure if it's related to this or just happened while processing this class.Details
The text was updated successfully, but these errors were encountered: