Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-10332

Memory related env-variables from /etc/sysconfig/minion are not honored

    XMLWordPrintable

    Details

    • Sprint:
      Horizon - August 29th 2018, Horizon - September 05 2018, Horizon - September 12 2018

      Description

      I've discovered that if I set:

      export JAVA_MIN_MEM=512M
      export JAVA_MAX_MEM=8G 

      and restart Minion, the changes are not taken.

      They are taken if and only if I also set JAVA_OPTS like this:

      JAVA_OPTS="-Xms${JAVA_MIN_MEM} -Xmx${JAVA_MAX_MEM}" 

      The current workaround to use on Minion, similar settings like with OpenNMS, I should do:

      export JAVA_MIN_MEM=512M
      export JAVA_MAX_MEM=16G
      
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -d64"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -Xms${JAVA_MIN_MEM} -Xmx${JAVA_MAX_MEM}"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -Djava.net.preferIPv4Stack=true"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -XX:+PrintGCTimeStamps -XX:+PrintGCDetails"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -Xloggc:/opt/minion/data/gc.log"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -XX:+UseGCLogFileRotation"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -XX:NumberOfGCLogFiles=10"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -XX:GCLogFileSize=10M"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -XX:+UseStringDeduplication"
      ADDITIONAL_MANAGER_OPTIONS="$ADDITIONAL_MANAGER_OPTIONS -XX:+UseG1GC"
      
      export JAVA_OPTS=$ADDITIONAL_MANAGER_OPTIONS
      

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: