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

Reduce Java Heap for Mill Client #4163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gamlerhart
Copy link
Contributor

@gamlerhart gamlerhart commented Dec 18, 2024

The Mill Client only forwards requests and therefore does not need much memory.
However, Java doesn't know that an allocates a large heap based on the machines memory size.

Therefore, give a way lower heap limit,
creating a leaner client memory wise.

Example on my machine:

  • Before: A Mill client reserved ~500MByte
  • After: A Mill client reserves the specified 24Mbyte

This is mostly relevant for a long running mill client (examples --watch clients, -i --no-build-lock and --bsp`).

The Mill Client only forwards requests and therefore
does not need much memory.
However, Java doesn't know that an allocates a large heap
based on the machines memory size.

Therefore, give a way lower heap limit,
creating a leaner client memory wise.
@gamlerhart
Copy link
Contributor Author

gamlerhart commented Dec 19, 2024

facepalm. Its also added to the test-runner (mill.testrunner.entrypoint.TestRunnerMain), creating out of memory exceptions. Will take a look later.

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.

1 participant