Skip to content

Commit

Permalink
refactor(util): use newer java memory args
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Jul 19, 2023
1 parent ad64a03 commit 06b0429
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ module.exports.downloadFileIfNeeded = async function ({ dest, uri }) {
* the given jar file.
*/
module.exports.getBaseOTPArgs = function (jarFile) {
// Use potentially all available memory minus 2GB for the OS, but use a
// minimum of 1.5GB to run OTP.
const memoryToUse = Math.max(
Math.round(os.totalmem() / 1000 - 2097152),
1500000
)
return ['-jar', `-Xmx${memoryToUse}k`, jarFile]
return ['-jar', '-XX:MaxRAMPercentage=80', jarFile]

Check failure on line 34 in lib/util.js

View workflow job for this annotation

GitHub Actions / test-build-release

Multiple spaces found before 'jarFile'
}

module.exports.waitOneSecond = async function () {
Expand Down

0 comments on commit 06b0429

Please sign in to comment.