glassfish
  1. glassfish
  2. GLASSFISH-14992

[PERF] Slower classloading with Felix 3.0.6

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1_b30
    • Fix Version/s: None
    • Component/s: OSGi
    • Labels:
      None
    • Environment:

      All Platforms

      Description

      The latest version of Felix 3.0.6 results in slower classloading due to changes in the resolver as compared to 2.0.5. This leads to slower deployment performance - see more details at http://java.net/jira/browse/GLASSFISH-13784

      Please use the attached war file to reproduce the issue.

      1) Start from fresh domain1

      2) With latest Felix:

      for i in 1 2 3; do asadmin start-domain domain1; time asadmin deploy v1.war; asadmin undeploy v1; asadmin stop-domain domain1; done

      3) Now repeat the same with Felix 2.0.5

      Here are some results posted from runs done by Richard:

      With Felix 2.0.5:

      real 0m2.668s
      user 0m0.555s
      sys 0m0.106s

      real 0m2.688s
      user 0m0.549s
      sys 0m0.111s

      real 0m2.772s
      user 0m0.553s
      sys 0m0.108s

      With Felix 3.0.6:

      real 0m3.191s
      user 0m0.557s
      sys 0m0.114s

      real 0m3.461s
      user 0m0.559s
      sys 0m0.109s

      real 0m3.157s
      user 0m0.557s
      sys 0m0.111s

      1. Deploy-v1-3.1.jps
        448 kB
        Santiago Pericas-Geertsen
      2. Deploy-v1-3.1-felix-2.jps
        433 kB
        Santiago Pericas-Geertsen
      3. Deploy-v1-3.1-patched-felix.jps
        431 kB
        Santiago Pericas-Geertsen
      4. Deploy-v1-3.1-patched-felix-baseline.jps
        435 kB
        Santiago Pericas-Geertsen
      5. gf-dynamic-import-stacks.txt
        83 kB
        Richard S. Hall
      6. GLASSFISH-14992.txt
        1 kB
        Richard S. Hall
      7. perftest.sh
        0.4 kB
        Santiago Pericas-Geertsen
      8. pom.xml
        11 kB
        Santiago Pericas-Geertsen
      9. Wget-v1-3.0.1.jps
        431 kB
        Santiago Pericas-Geertsen
      10. Wget-v1-3.1.jps
        463 kB
        Santiago Pericas-Geertsen
      1. wget-security.jpg
        58 kB

        Issue Links

          Activity

          Hide
          Richard S. Hall added a comment -

          Santiago, why didn't you give a separate breakdown for felix-optimize-resolved-bundles.jar for as_developerScenario?

          Regardless, this is all pretty good. I think we can try to start wrapping things up. For me, the patch for custom manifest parsing and resolved bundle optimization are highly likely to go into the next Felix release.

          As for the api-exporter-fragment, I think it is less necessary with these other changes. No matter what, I think Sahoo should be involved in a decision on it.

          Show
          Richard S. Hall added a comment - Santiago, why didn't you give a separate breakdown for felix-optimize-resolved-bundles.jar for as_developerScenario? Regardless, this is all pretty good. I think we can try to start wrapping things up. For me, the patch for custom manifest parsing and resolved bundle optimization are highly likely to go into the next Felix release. As for the api-exporter-fragment, I think it is less necessary with these other changes. No matter what, I think Sahoo should be involved in a decision on it.
          Hide
          Sanjeeb Sahoo added a comment -

          Committed initial version of api-exporter-fragment:
          ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -F msg core/pom.xml core/api-exporter-fragment/ packager/glassfish-nucleus/
          Adding core/api-exporter-fragment
          Adding core/api-exporter-fragment/pom.xml
          Sending core/pom.xml
          Sending packager/glassfish-nucleus/pom.xml
          Transmitting file data ...
          Committed revision 44082.

          Santiago to update the package list in pom.xml.

          Show
          Sanjeeb Sahoo added a comment - Committed initial version of api-exporter-fragment: ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -F msg core/pom.xml core/api-exporter-fragment/ packager/glassfish-nucleus/ Adding core/api-exporter-fragment Adding core/api-exporter-fragment/pom.xml Sending core/pom.xml Sending packager/glassfish-nucleus/pom.xml Transmitting file data ... Committed revision 44082. Santiago to update the package list in pom.xml.
          Hide
          Richard S. Hall added a comment -

          I have integrated Felix 3.0.7, so I am resolving this bug. Please close if satisfied. Thanks.

          Show
          Richard S. Hall added a comment - I have integrated Felix 3.0.7, so I am resolving this bug. Please close if satisfied. Thanks.
          Hide
          Santiago Pericas-Geertsen added a comment -

          In order to take full advantage of the api-exporter-fragment we need the following packages in its pom.xml:

          Index: pom.xml
          ===================================================================
          — pom.xml (revision 44186)
          +++ pom.xml (working copy)
          @@ -330,6 +330,25 @@
          org.xml.sax; \
          org.xml.sax.ext; \
          org.xml.sax.helpers; \
          +com.sun.enterprise.v3.admin; \
          +com.sun.enterprise.naming.impl; \
          +com.sun.grizzly.http.res; \
          +com.sun.enterprise.security.ssl; \
          +com.sun.org.apache.xerces.internal.jaxp; \
          +com.sun.org.apache.xalan.internal.xsltc.trax; \
          +com.sun.org.apache.xerces.internal.parsers; \
          +com.sun.pkg.client; \
          +com.ctc.wstx.stax; \
          +com.sun.jmx.remote.protocol.jmxmp; \
          +com.sun.enterprise.security.provider; \
          +com.sun.enterprise.security.auth.realm.file; \
          +com.sun.enterprise.security.auth.realm.certificate; \
          +com.sun.enterprise.security; \
          +com.sun.faces.config; \
          +com.sun.jersey.server.impl.container.servlet; \
          +org.apache.jasper.runtime; \
          +com.sun.xml.ws.transport.http.servlet; \
          +org.apache.jasper.servlet; \
          resolution:=optional
          </Import-Package>
          <Bundle-Description>$

          {project.description}

          </Bundle-Description>

          I'll request permission to update this pom on the dev alias.

          Show
          Santiago Pericas-Geertsen added a comment - In order to take full advantage of the api-exporter-fragment we need the following packages in its pom.xml: Index: pom.xml =================================================================== — pom.xml (revision 44186) +++ pom.xml (working copy) @@ -330,6 +330,25 @@ org.xml.sax; \ org.xml.sax.ext; \ org.xml.sax.helpers; \ +com.sun.enterprise.v3.admin; \ +com.sun.enterprise.naming.impl; \ +com.sun.grizzly.http.res; \ +com.sun.enterprise.security.ssl; \ +com.sun.org.apache.xerces.internal.jaxp; \ +com.sun.org.apache.xalan.internal.xsltc.trax; \ +com.sun.org.apache.xerces.internal.parsers; \ +com.sun.pkg.client; \ +com.ctc.wstx.stax; \ +com.sun.jmx.remote.protocol.jmxmp; \ +com.sun.enterprise.security.provider; \ +com.sun.enterprise.security.auth.realm.file; \ +com.sun.enterprise.security.auth.realm.certificate; \ +com.sun.enterprise.security; \ +com.sun.faces.config; \ +com.sun.jersey.server.impl.container.servlet; \ +org.apache.jasper.runtime; \ +com.sun.xml.ws.transport.http.servlet; \ +org.apache.jasper.servlet; \ resolution:=optional </Import-Package> <Bundle-Description>$ {project.description} </Bundle-Description> I'll request permission to update this pom on the dev alias.
          Hide
          Sanjeeb Sahoo added a comment -

          See GLASSFISH-15532. We no longer need the fragment jar it seems. So removing it from being part of the distribution. It is still there in the build tree just in case we need this functionality some other day.

          ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -m "Issue #14992: Remove api-exporter fragment, as it is not needed any more to optimize startup time" packager/glassfish-nucleus/pom.xml
          Sending packager/glassfish-nucleus/pom.xml
          Transmitting file data .
          Committed revision 44460.

          Show
          Sanjeeb Sahoo added a comment - See GLASSFISH-15532 . We no longer need the fragment jar it seems. So removing it from being part of the distribution. It is still there in the build tree just in case we need this functionality some other day. ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -m "Issue #14992: Remove api-exporter fragment, as it is not needed any more to optimize startup time" packager/glassfish-nucleus/pom.xml Sending packager/glassfish-nucleus/pom.xml Transmitting file data . Committed revision 44460.

            People

            • Assignee:
              Richard S. Hall
              Reporter:
              Dhiru Pandey
            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: