You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using native-image --no-effect -J-Xmx2048m ... has no effect, in spite of the documentation saying it's supported, because the custom -Xmx is appended to the arguments after native-image's own calculated -Xmx, and the JVM is taking the first -Xmx it finds.
This was also reported in a comment on #903, but that issue was closed.
By the way, why does it default to using 80% of the machines physical memory? On my machine, I'm running browsers and slack and all sorts of other stuff, I definitely never have 80% of my physical memory free to do just one thing, so I frequently see my native-image processes being OOM killed by the OS due to this. I don't understand why that default would be chosen, it only makes sense on a dedicated build machine, and even then, build tools (like Maven) that are likely invoking the graal compiler are probably already taking up more than 20% of the available memory.
The text was updated successfully, but these errors were encountered:
Using native-image --no-effect -J-Xmx2048m ... has no effect
If you are using server-based building -J-Xmx2048m indeed has no effect. This is for a reason. In server mode native-image decides the mem args so that it can reuse already running servers as much as possible.
To ensure -J-Xmx2048m gets taken into account you have to combine it with --no-server.
Using
native-image --no-effect -J-Xmx2048m ...
has no effect, in spite of the documentation saying it's supported, because the custom-Xmx
is appended to the arguments afternative-image
's own calculated-Xmx
, and the JVM is taking the first-Xmx
it finds.This was also reported in a comment on #903, but that issue was closed.
By the way, why does it default to using 80% of the machines physical memory? On my machine, I'm running browsers and slack and all sorts of other stuff, I definitely never have 80% of my physical memory free to do just one thing, so I frequently see my native-image processes being OOM killed by the OS due to this. I don't understand why that default would be chosen, it only makes sense on a dedicated build machine, and even then, build tools (like Maven) that are likely invoking the graal compiler are probably already taking up more than 20% of the available memory.
The text was updated successfully, but these errors were encountered: