-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
Reduce Java Heap for Mill Client #4163
Conversation
facepalm. Its also added to the test-runner (mill.testrunner.entrypoint.TestRunnerMain), creating out of memory exceptions. Will take a look later. |
096c27c
to
2819232
Compare
Question: Are some tests flacky? And if so, how can I rerun that specific test suite/github action? |
yes some tests are flaky. I'll give them a kick |
2819232
to
aa24db9
Compare
aa24db9
to
51a1198
Compare
@gamlerhart could you test this out with Mill's new ability to download JVMs on demand using Coursier (https://mill-build.org/mill/main-branch/cli/installation-ide.html#_customizing_mills_jvm)? I expect that will take more memory than the base Mill client, and we should adjust the number accordingly |
51a1198
to
3dac87b
Compare
The Memory is enough to download a JDK. It downloaded a Zulu JDK without issues for me. However, the question is if this PR is still required. Now that we have native Graal clients, I assume most setups will use those. So, this optimization is less relevant. |
3dac87b
to
0631a67
Compare
I think it's still worth doing. We will need to continue support the JVM launcher anyway, either as a cross-platform launcher, or for platforms like Windows-ARM (e.g. my surface 7 laptop) that do not have Graal native image support yet |
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.
0631a67
to
35b100f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks @gamlerhart ! |
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`). Co-authored-by: Li Haoyi <[email protected]>
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:
This is mostly relevant for a long running mill client (examples
--watch
clients,-i --no-build-lock
and --bsp`).