-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for MaxRAM restriction for the native image driver process #557
Comments
For the bash launcher some |
@jerboaa I did some measurements and it looks like the maximum RSS of I tried setting Xmx to 128m and it resulted in similar RSS usage, same when setting Xmx to 256m. I believe adopting the upstream limit of 256MB is OK if we really want to constraint its memory usage. |
@zakkak Yes, we really should constrain it. But we should set |
So what about Assuming we need a machine with at least 4G of RAM (@Karm may have used less though in some of his experiments) to build a native image the minimum |
It looks odd. If |
Feel free to test with something like:
|
I see, I misunderstood the If the percentage refers to the MaxRAM value and not the actual RAM size I agree with 80% making sense and being enough for the driver. |
According to my tests they don't populate to the builder process, we would need to use |
Historic reasons. It makes sense for multi-user systems. Not so much for containers with a single process and a single JVM. |
Great! |
Fixed for 23.1 in graalvm/mandrel-packaging#365 |
Closes graalvm/mandrel#557 (cherry picked from commit 6c406e3)
Closes graalvm/mandrel#557 (cherry picked from commit 6c406e3)
When GraalVM Community for JDK 21 (internal version 23.1) comes out the
native-image
driver will limit itself with a heap size of 256MB. See oracle#7277 (comment)Mandrel uses the bash launcher which doesn't impose a limit for the driver process. Note that a regular
native-image
build goes like this:So in a container build you have two processes running possibly competing for resources. It makes sense to keep the driver process with certain bounds. The native-launcher (macro
--macro:native-image-launcher
) will do that.The text was updated successfully, but these errors were encountered: