Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-3643

Set appropriate default DYNAMIC_HEAP_FRACTION value to avoid OOM error

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • 2.2.0.GA
    • 1.8.4.GA
    • cluster-operator
    • None

      • Set appropriate default DYNAMIC_HEAP_FRACTION value to avoid OOM error
        • The default DYNAMIC_HEAP_FRACTION values of KakfaConnect, MirrorMaker and CruiseControl are 1.0(=100%)[1], however this seems dangerous default value.
        • DYNAMIC_HEAP_FRACTION=1.0 means that the entire memory of the container is specified as the heap size if -Xmx is not specified, but it will lead to frequent OOM errors, because JVM use metaspace, code cache and threads, etc. as non-heap memory and the container will also be using memory for outside of the JVM.
        • The workawound is to set -Xmx and -Xms in jvmOptions explicitly.
      • Also, it should be documented on our document that the default heap allocation rate for each component by DYNAMIC_HEAP_FRACTION when -Xmx -in jvmOptions is not specified ( Kafka=0.5(=50%), Zookeeper=0.75(=75%), KakfaConnect=1.0(=100%), MirrorMaker=1.0(=100%), CruiseControl=1.0(=100%) [1] ). In general, if -Xmx is not specified, it is assumed that 25% of the container memory will be used for the heap, so changing the default heap size by cluster operator is counter-intuitive at first glance and should be documented.
      • FYI, there are some cases of frequent OOM errors on MirorrMaker2. I haven't fully tested it, but I was able to avoid it by increasing the memory resources of the MirorrMaker2 container and setting -Xms and -Xmx explicitly.

      [1] https://github.com/strimzi/strimzi-kafka-operator/search?q=heapOptions

              Unassigned Unassigned
              rhn-support-tyamashi Tomonari Yamashita
              Michal Toth Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: