-
Enhancement
-
Resolution: Done
-
Major
-
0.3.0
-
None
-
Medium
-
2019 Week 38-40 (from Sep 16), 2019 Week 41-43 (from Okt 7)
Taking this question as an example, we could limit the memory used by GraalVM to compile from JAVA to Native.
The Operator is setting a environment variable LIMIT_MEMORY and LIMIT_CPU to the build containers that would be read by the image to set the flags correctly.
That way, we shouldn't have problems with out of memory problems during builds.
The s2i script should take the value from LIMIT_MEMORY and discount 15% of it to set to the JVM. Hence, leaving some room for the build container to use for others processes.
The values on LIMIT_MEMORY is in the int64 format. Documentation of Kubernetes Resources can be found in: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
Take this example:
128974848, 129e6, 129M, 123Mi
The value on LIMIT_MEMORY will be 128974848, that is the binary size.
- is related to
-
KOGITO-419 When building native applications, builder pods get OOMKilled
- Resolved
-
KOGITO-416 Limiting GraalVM memory usage relying on container cgroups
- Resolved
- relates to
-
KOGITO-127 Optimize native build performed by OpenShift S2I
- Resolved