Setting the heap memory based on the percentage instead of hardcoding

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Affects Version/s: None
    • Component/s: Environment - Docker
    • None

      It would be good if the heap memory is set using percentage -XX:MinRAMPercentage and -XX:MaxRAMPercentage.

      The Atlassian Confluence Docker images hard-wire -Xms and -Xmx into setenv.sh during the Docker build (see the sed command in the Dockerfile).

       && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \
      

      When the JVM is started with explicit -Xms/-Xmx, it ignores -XX:MinRAMPercentage and -XX:MaxRAMPercentage, so percentage-based sizing can't take effect unless those fixed values are removed first.

              Assignee:
              Unassigned
              Reporter:
              Saurabh
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: