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

Memory strangeness on OpenComputer #59

Open
bombcar opened this issue Dec 28, 2021 · 4 comments
Open

Memory strangeness on OpenComputer #59

bombcar opened this issue Dec 28, 2021 · 4 comments

Comments

@bombcar
Copy link
Contributor

bombcar commented Dec 28, 2021

repo had an issue compiling OpenComputer on Windows - it crashed out due to lack of RAM.

there are jvm options in the gradlew and gradle.bat but the same limit didn’t seem to crash me out but it may have reused a previous gradle.

It would be nice for those to be reasonable amounts and easily changed in one place.

What’s interesting is if CI worked with them - did it actually use them? They were like 64m

@SinTh0r4s
Copy link
Owner

setupCIworkspace will not install graphics and audio libs and such client runtime things. Less dependencies -> less ram usage. We can probably just double the values and be fine with it on all projects

@bombcar
Copy link
Contributor Author

bombcar commented Dec 28, 2021

open computer by far will be the worst of all I've seen - it's entirely SCALA and large

@bombcar
Copy link
Contributor Author

bombcar commented Dec 28, 2021

bombcar          56236   0.4  5.2 36769760 879844   ??  Ss    9:59AM   0:33.25 /Library/Java/JavaVirtualMachines/graalvm-ce-java8-21.0.0.2/Contents/Home/bin/java -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /Users/bombcar/.gradle/wrapper/dists/gradle-6.9.1-bin/8v22qtfm3hkyawbegpd68cyk3/gradle-6.9.1/lib/gradle-launcher-6.9.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.9.1
bombcar          56220   0.2  1.4 35930492 241752 s002  S+    9:59AM   0:01.55 /Library/Java/JavaVirtualMachines/graalvm-ce-java8-21.0.0.2/Contents/Home/bin/java -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/bombcar/IdeaProjects/OpenComputers/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/bombcar/IdeaProjects/OpenComputers/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain clean setupDecom idea genI

So on my Mac with all gradles dead, it does above - it calls it with 64mb but something else ups that to 512.

it is NOT JAVA_OPTS or GRADLE_OPTS at least by default, as those aren't set:

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

@bombcar
Copy link
Contributor Author

bombcar commented Dec 28, 2021

The org.gradle.jvmargs Gradle property controls the VM running the build. It defaults to -Xmx512m "-XX:MaxMetaspaceSize=256m"

https://docs.gradle.org/6.9.1/userguide/build_environment.html#sec:configuring_jvm_memory

The JAVA_OPTS environment variable controls the command line client, which is only used to display console output. It defaults to -Xmx64m

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

No branches or pull requests

2 participants