metro
  1. metro
  2. METRO-17

[PERF] gmbal objects consuming large part of heap

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: code
    • Labels:
      None

      Description

      The gmbal API call in metro (and in GlassFish WebServicesContainer.java)

      mom = ManagedObjectManagerFactory.createFederated(MONITORING_SERVER);

      is causing a large number of gmbal instances to be created and is affecting GlassFish performance. See http://java.net/jira/browse/GLASSFISH-17044.
      Attached is the call stack.

      To reproduce follow the steps in GLASSFISH-17044, except deploy a web service instead of an app with an EJB.

      The fix should be to defer the gmbal API calls until there is a JMX client connection.

      From Naman: JMX service would start on 8686 (on DAS). So you can check localhost:8686 for the same. From quicklook workspace you can find the sample for the same.

      In GlassFish monitoring (StatsProviderManagerDelegateImpl), we defer the gmbal API calls by extending MBeanListener.CallbackImpl and overriding mbeanRegistered method. This method is called when AMX DomainRoot is loaded (when there is a JMX connection, for example). AMX DomainRoot needs to be ready before any other mbeans can be registered.

      Fix should be targeted for GlassFish 3.1.2.

        Issue Links

          Activity

          Hide
          Joe Di Pol added a comment -

          A test build with a fix was provided to the performance team on Dec 15th. The report from them when running with the fix:

          "the server restart time (with SPECjEnterprise deployed) goes down by 9.5%, and the footprint is reduced by 15% – 24MB of gmbal-related classes no longer show up in the heap dump."

          So the fix looks good.

          Show
          Joe Di Pol added a comment - A test build with a fix was provided to the performance team on Dec 15th. The report from them when running with the fix: "the server restart time (with SPECjEnterprise deployed) goes down by 9.5%, and the footprint is reduced by 15% – 24MB of gmbal-related classes no longer show up in the heap dump." So the fix looks good.
          Hide
          Michal Gajdos added a comment - - edited

          Attached a patch for review. The zip file consists of 3 svn diffs (jaxws, wsit, glassfish). These patches can be applied to the following repositories:

          JAXWS:
          https://svn.java.net/svn/jax-ws~sources/branches/jaxws22/jaxws-ri

          WSIT:
          https://svn.java.net/svn/wsit~svn/trunk/wsit

          GlassFish:
          https://svn.java.net/svn/glassfish~svn/branches/3.1.2

          When Metro is used as a standalone application/library the behaviour remains unchanged (Gmbal objects are created immediately). If Metro is used in GlassFish with no JMX connection created the Gmbal API calls and creation of objects are postponed. At the moment a JMX client is remotely connected to the GlassFish all postponed Gmbal objects are created and from this moment Metro will create these objects and process Gmbal calls immediately.

          Show
          Michal Gajdos added a comment - - edited Attached a patch for review. The zip file consists of 3 svn diffs (jaxws, wsit, glassfish). These patches can be applied to the following repositories: JAXWS: https://svn.java.net/svn/jax-ws~sources/branches/jaxws22/jaxws-ri WSIT: https://svn.java.net/svn/wsit~svn/trunk/wsit GlassFish: https://svn.java.net/svn/glassfish~svn/branches/3.1.2 When Metro is used as a standalone application/library the behaviour remains unchanged (Gmbal objects are created immediately). If Metro is used in GlassFish with no JMX connection created the Gmbal API calls and creation of objects are postponed. At the moment a JMX client is remotely connected to the GlassFish all postponed Gmbal objects are created and from this moment Metro will create these objects and process Gmbal calls immediately.
          Hide
          Martin Grebac added a comment -

          Integrated to GF.

          Show
          Martin Grebac added a comment - Integrated to GF.

            People

            • Assignee:
              Michal Gajdos
              Reporter:
              Jennifer Chou
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: