-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
HelloWorld compilation times and memory usage increased in 21.2.0-dev #3435
Comments
Note: after restricting the max heap size I get (in the GH workflow):
source: https://github.com/graalvm/mandrel/runs/2681905662?check_suite_focus=true#step:9:316 |
The heap usage increase has been observed in #3427 as well. |
Tracked internally on GR-31714 |
Thanks for sharing! When you say "HelloWorld", do you mean a hello world plain Java application with just a System.out.println or a Quarkus application? Can your infrastructure help with bisecting commits to find the exact spot where it changed? The commit referenced as "first failing" looks very unrelated to native image, so I don't think this one can be the issue. |
Ooops, sorry, I should have pasted the source code. I refer to the following plain Java application: public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Unfortunately not, we don't have anything in place for achieving this.
That makes sense, the commit itself is probably not the one at fault. We test nightly so the commit is the one that just happened to be the HEAD of https://github.com/oracle/graal when the workflow started. These commit hashes are just an indication that the change at fault is probably somewhere between 29d856e and 3ec3ea3. |
After some manual bisecting between 29d856e and 3ec3ea3 with e92dab0
see https://github.com/graalvm/mandrel/actions/runs/906586079 as well 698d863 (the commit right before e92dab0)
see https://github.com/graalvm/mandrel/actions/runs/906585936 as well Please note however that the committed heap size in 698d863 is still higher than the committed heap size in GraalVM CE 21.1.0 (~3.2 GB vs ~ 2.3 GB), possibly indicating that there was another memory usage increase before this one that slipped our attention. |
Cool, thanks, yes, this commit looks like a possible candidate. It is an architectural improvement (parse bytecodes once instead of twice); but there could be some issues in this initial version. CC @christianwimmer |
GraalVM 21.2-dev introduces a new enhancement (enabled by default) to avoid parsing compiler graphs twice. This enahancement however results in increased memory usage at the moment (oracle/graal#3435) which then results in Quarkus' Integration Test failures in CI.
For anyone interested in a workaround till this gets fixed, you may use
|
GraalVM 21.2-dev introduced a new enhancement (enabled by default) to avoid parsing compiler graphs twice. This enahancement however results in increased memory usage at the moment (oracle/graal#3435) which then results in Quarkus' Integration Test failures in CI. In GraalVM 21.2 this appears to no longer be an issue.
GraalVM 21.2-dev at some point introduced a new enhancement (enabled by default) to avoid parsing compiler graphs twice. This enhancement however results in increased memory usage at the moment (oracle/graal#3435) which then results in Quarkus' Integration Test failures in CI. In GraalVM 21.2 this appears to no longer be an issue.
Disable single parsing of compiler graphs till the impact of it on heap usage decreases see oracle/graal#3435 and graalvm/mandrel#304 (comment)
Disable single parsing of compiler graphs till the impact of it on heap usage decreases see oracle/graal#3435 and graalvm/mandrel#304 (comment) quarkusio#19511 didn't take into account runs with constraint memory. Bringing back `-H:-ParseOnce` reduces the heap usage significantly, from 3.9G down to 2.7G in integration-tests/main.
Disable single parsing of compiler graphs till the impact of it on heap usage decreases see oracle/graal#3435 and graalvm/mandrel#304 (comment) quarkusio#19511 didn't take into account runs with constraint memory. Bringing back `-H:-ParseOnce` reduces the heap usage significantly, from 3.9G down to 2.7G in integration-tests/main.
Disable single parsing of compiler graphs till the impact of it on heap usage decreases see oracle/graal#3435 and graalvm/mandrel#304 (comment) quarkusio#19511 didn't take into account runs with constraint memory. Bringing back `-H:-ParseOnce` reduces the heap usage significantly, from 3.9G down to 2.7G in integration-tests/main.
Disable single parsing of compiler graphs till the impact of it on heap usage decreases see oracle/graal#3435 and graalvm/mandrel#304 (comment) quarkusio#19511 didn't take into account runs with constraint memory. Bringing back `-H:-ParseOnce` reduces the heap usage significantly, from 3.9G down to 2.7G in integration-tests/main.
GraalVM 21.2-dev at some point introduced a new enhancement (enabled by default) to avoid parsing compiler graphs twice. This enhancement however results in increased memory usage at the moment (oracle/graal#3435) which then results in Quarkus' Integration Test failures in CI. In GraalVM 21.2 this appears to no longer be an issue. (cherry picked from commit 054236b)
Disable single parsing of compiler graphs till the impact of it on heap usage decreases see oracle/graal#3435 and graalvm/mandrel#304 (comment) quarkusio#19511 didn't take into account runs with constraint memory. Bringing back `-H:-ParseOnce` reduces the heap usage significantly, from 3.9G down to 2.7G in integration-tests/main. (cherry picked from commit 201b9a6)
GraalVM 21.2-dev at some point introduced a new enhancement (enabled by default) to avoid parsing compiler graphs twice. This enhancement however results in increased memory usage at the moment (oracle/graal#3435) which then results in Quarkus' Integration Test failures in CI. In GraalVM 21.2 this appears to no longer be an issue. (cherry picked from commit 054236b)
Disable single parsing of compiler graphs till the impact of it on heap usage decreases see oracle/graal#3435 and graalvm/mandrel#304 (comment) quarkusio#19511 didn't take into account runs with constraint memory. Bringing back `-H:-ParseOnce` reduces the heap usage significantly, from 3.9G down to 2.7G in integration-tests/main. (cherry picked from commit 201b9a6)
Closing this as it's now out of date and a better analysis has been performed in graalvm#316. Note:
|
We no longer need to disable `ParseOnce` as memory usage with it enabled has improved in GraalVM 22.2. See https://docs.google.com/spreadsheets/d/15PJ1Qd7kgneuP61N1T2_AyJ3WBsbXpVHIPKbxgH1qfM/edit#gid=1672873268 for a comparison between using and not using `ParseOnce` with 22.2. Relates to oracle/graal#3435 and graalvm/mandrel#316 Fixes quarkusio#25944
We no longer need to disable `ParseOnce` as memory usage with it enabled has improved in GraalVM 22.2. See https://docs.google.com/spreadsheets/d/15PJ1Qd7kgneuP61N1T2_AyJ3WBsbXpVHIPKbxgH1qfM/edit#gid=1672873268 for a comparison between using and not using `ParseOnce` with 22.2. Relates to oracle/graal#3435 and graalvm/mandrel#316 Fixes quarkusio#25944
GraalVM 21.2-dev introduces a new enhancement (enabled by default) to avoid parsing compiler graphs twice. This enahancement however results in increased memory usage at the moment (oracle/graal#3435) which then results in Quarkus' Integration Test failures in CI.
We no longer need to disable `ParseOnce` as memory usage with it enabled has improved in GraalVM 22.2. See https://docs.google.com/spreadsheets/d/15PJ1Qd7kgneuP61N1T2_AyJ3WBsbXpVHIPKbxgH1qfM/edit#gid=1672873268 for a comparison between using and not using `ParseOnce` with 22.2. Relates to oracle/graal#3435 and graalvm/mandrel#316 Fixes quarkusio#25944 (cherry picked from commit 03ea11c)
Describe the issue
The last 6 days Mandrel's nightly CI consistently times out in a couple of Quarkus integration test groups.
The first failing run was with 3ec3ea3: https://github.com/graalvm/mandrel/actions/runs/862486805
The last passing run was with 29d856e: https://github.com/graalvm/mandrel/actions/runs/858957124
From some testing it looks like compilation times have increased in 21.1 (compared to 21.0 and 20.3) and now they increased further in 21.2-dev (~13% compared to 21.1 and ~20% compared to 21.0 and 20.3).
Steps to reproduce the issue
For my testing I compile
HelloWorld
10 times using GraalVM CE 20.3.2, 21.0.0, 21.1.0, and 21.2.0-dev (built from e279970) and generate violin plots using the[total]
time reported bynative-image
(y-axis is ms).The raw numbers are:
FWIW the script to generate the plot is:
Describe GraalVM and your environment:
More details
These last 6 days I have also noticed some out of memory errors (due to me not restricting the max heap size in the workflow), which made me think that memory usage has also increased, which seems true but only for 21.2.0-dev. The numbers used in the violin plots for heap size are the
[total]
heap usage reported at the end ofnative-image
.Raw data:
Edit: I originally pasted the commit hashes in reverse order. We noticed the failure while testing 3ec3ea3 and the last time we checked and didn't fail was 29d856e.
The text was updated successfully, but these errors were encountered: