Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-306

Limiting GraalVM memory usage on Quarkus s2i images builds

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 0.5.0
    • 0.3.0
    • Image
    • None
    • 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.

            rhn-support-fspolti Filippe Spolti
            rhn-support-zanini Ricardo Zanini Fernandes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: