Use sbt default JVM memory allocations #3436
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An investigation revealed that the test and prod servers are invoking sbt without a -mem argument (they don't use npm start, so don't use the command-line in package.json). That means that they have been using sbt's default JVM memory allocation (which currently is 1GB), instead of the 12GB (!) specified in package.json. Some (anecdotal) testing of servers running with 12GB vs 1GB showed no obvious performance difference, and apparently the servers have been stable at 1GB for years in prod, so it was recommended that the package.json command-line be modified to put dev instances in line with test and prod.
One other note: we're in the process of migrating the test and prod servers to a new host, and out of Docker. Post-migration, the server processes actually will use npm (and therefore package.json) for startup -- specifically, the 'start-no-docker' script -- and thus, the sbt -mem argument could be reintroduced to control the JVM size. But we should be careful, because there are a lot of servers running simultaneously on that host, and we should make sure that it can handle all of them without having to swap resident memory.
Things to check before submitting the PR