Skip to content
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

use --no-server and set Xmx to a higher value when invoking native-image #370

Merged
merged 2 commits into from
Feb 20, 2020

Conversation

johanvos
Copy link
Contributor

Fixes #369 and #362

@@ -132,6 +132,8 @@ public boolean compile(String cp) throws IOException, InterruptedException {
}
compileRunner.addArg("--report-unsupported-elements-at-runtime");
compileRunner.addArg("-Djdk.internal.lambda.eagerlyInitialize=false");
compileRunner.addArg("--no-server");
compileRunner.addArg("-J-Xmx24G");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 24G? Wouldn't it depend on the user's machine? Maybe we need some system property to set it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with a system property that, if set, can overrule this value. But we still need a default.
@lazar-mitrovic do you think 24G is an ok default?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had issues when building on older llvm with graalpython included, where I had to bump it to > 40G (with swap enabled).

If you look at SubstrateVM's source it is clamped down to 80% of user memory, so maybe bumping this up to something crazy high like 128G wouldn't be a bad idea.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or omitting Xmx since docs state that using only --no-server would:

If you run with --no-server option, you will get the whole 80% of what is reported as physical RAM as the baseline. This mode respects -Xmx arguments additionally.

@johanvos
Copy link
Contributor Author

Ok, I removed that Xmx option. It can always be added via a property in the mvn client

@johanvos johanvos merged commit 4795b0a into gluonhq:master Feb 20, 2020
abhinayagarwal pushed a commit to abhinayagarwal/substrate that referenced this pull request Mar 8, 2020
…age (gluonhq#370)

* use --no-server and set Xmx to a higher value when invoking native-image
Fixes gluonhq#369 and gluonhq#362

* don't specify xmx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use native-image with --no-server
3 participants