Uploaded image for project: 'Network Controller'
  1. Network Controller
  2. SDNC-858

Tune OpenDaylight Java settings for NETCONF

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Medium Medium
    • El Alto Release
    • None
    • None
    • None
    • El Alto Sprint 3

      From Jeff Hartley - Lumina Networks:

      Since the netconf connector is very "burst-like", consuming large amounts of Heap and then going quiet, it is prone to creating disruptive Java Garbage Collection pauses when connecting to devices with large amounts of yang.
      The simple/standard solution is to tell Java to use G1GC with short pauses rather than the defaults. This can be enabled in the ./bin/setenv script, which is a good place for setting any Java options.
      Here is a snippet of the Fluorine-SR2 setenv:
      ...
      #
      general settings which should be applied for all scripts go here; please keep
      in mind that it is possible that scripts might be executed more than once, e.g.
      in example of the start script where the start script is executed first and the
      karaf script afterwards.
      #
      #
      The following section shows the possible configuration options for the default
      karaf scripts
      #
      export JAVA_HOME # Location of Java installation
      export JAVA_MIN_MEM # Minimum memory for the JVM
      export JAVA_MAX_MEM # Maximum memory for the JVM
      export JAVA_PERM_MEM # Minimum perm memory for the JVM
      export JAVA_MAX_PERM_MEM # Maximum perm memory for the JVM
      export EXTRA_JAVA_OPTS # Additional JVM options
      ...
      Thus inserting the following options will enable G1GC garbage collection:
      export EXTRA_JAVA_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=200"

      Since these options are only made effective at startup, a good choice would be to edit the setenv file (or replace it) during the dockerfile steps.

      Increasing JAVA_MAX_MEM is optional but recommended; this is subjective based on how much netconf will be used in a user's own installation. A general guideline is to start with 8GB and increase based on your monitored Java Heap usage trends.

      -Jeff Hartley
      Lumina Networks

       

       

            djtimoney Dan Timoney
            djtimoney Dan Timoney
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: