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

Use sbt default JVM memory allocations #3436

Merged
merged 4 commits into from
Dec 7, 2023
Merged

Use sbt default JVM memory allocations #3436

merged 4 commits into from
Dec 7, 2023

Conversation

yhtill
Copy link
Collaborator

@yhtill yhtill commented Dec 6, 2023

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
  • I've written a descriptive PR title.

@misaugstad
Copy link
Member

I increased the memory size from 1 gb to 1.5 gb as a stop gap to address #3438. Once we fix that, we should be able to bring this back down to 1 gb. The change in this PR from 12 gb to 1.5 gb is still very important 😁

@misaugstad misaugstad merged commit d523cf8 into develop Dec 7, 2023
@misaugstad misaugstad deleted the default-sbt-mem branch December 7, 2023 01:07
@misaugstad misaugstad mentioned this pull request Dec 7, 2023
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.

2 participants