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

Increase build memory #1803

Merged
merged 4 commits into from
Oct 30, 2022
Merged

Increase build memory #1803

merged 4 commits into from
Oct 30, 2022

Conversation

elevenfive
Copy link
Contributor

Fixes build issue with JVM OOM, when user's build environment is not already setting these values to an increased memory amount in ~/.gradle/gradle.properties

@ale5000-git
Copy link
Member

ale5000-git commented Oct 7, 2022

In the GitHub action it has always set -Xmx2048m, I don't think it really need -Xmx3072m.

Isn't just this enough? org.gradle.jvmargs=-Xmx2048m

@elevenfive
Copy link
Contributor Author

elevenfive commented Oct 7, 2022

There's kotlin heap and regular heap, which is why it looks duplicated. Will try locally with 2048. Parallel GC is recommended these days, probably should keep that if no disagreement there.

@ale5000-git
Copy link
Member

ale5000-git commented Oct 7, 2022

Quote from here:

Currently Kotlin daemon uses the same JVM arguments as Gradle daemon. It is possible to override it in gradle.properties:
org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=-Xmx1500m,-Xms=500m
but it is hard to discover.

So setting it with org.gradle.jvmargs=-Xmx2048m -XX:+UseParallelGC affect both Kotlin and Gradle (if I'm not wrong).

@elevenfive
Copy link
Contributor Author

elevenfive commented Oct 7, 2022

Neat - thank you, didn't realize that!

Confirmed ./gradlew build now works with this change.

@mar-v-in mar-v-in merged commit 14d8d00 into microg:master Oct 30, 2022
@elevenfive elevenfive deleted the patch-2 branch November 1, 2022 02:13
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.

3 participants