Skip to content

Commit

Permalink
Limits system ram to 4GB
Browse files Browse the repository at this point in the history
OpenJDK assumes total system RAM of 128GB. Setting it to 4GB manually
reduces the greediness of the JVM drastically.
  • Loading branch information
freimair committed Mar 11, 2020
1 parent dbecc0a commit dc7a904
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ configure([project(':cli'),
unixScriptFile.text = unixScriptFile.text.replace(
'cd "`dirname \\"$PRG\\"`/.." >/dev/null', 'cd "`dirname \\"$PRG\\"`" >/dev/null')

def script = file("${rootProject.projectDir}/bisq-$applicationName")
script.text = script.text.replace(
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=4GB"')

if (osdetector.os != 'windows')
delete fileTree(dir: rootProject.projectDir, include: 'bisq-*.bat')
else
Expand Down

0 comments on commit dc7a904

Please sign in to comment.