glassfish
  1. glassfish
  2. GLASSFISH-18275

JMSRA jar files have redundent classpath entries, which cause startup/deployment performance hit

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2_b19
    • Fix Version/s: 4.0_b72_EE7MS4
    • Component/s: jms
    • Labels:
      None

      Description

      When deploying new apps (or starting up with apps deployed), each app gets a new ASURLClassLoader, and we spend a fair amount of time in ASURLCLassLoader.appendURL().

      The time spent here is dominated by processing of the jmsra jar files, which contain many repeated and non-existent entries in the classpath; still, appendURL() blindly goes through all of them, regardless of whether they exist or have been processed before.

      As an example, imqbroker.jar's manifest contains this classpath entry:
      Class-Path: imqutil.jar imqjmx.jar ../imqjmx.jar ../../../share/lib/im
      qjmx.jar jsse.jar jnet.jar jcert.jar ../imq.jar ../jms.jar imq.jar jm
      s.jar ../../../share/lib/imq.jar ../../../share/lib/jms.jar imqjmsbri
      dge.jar imqstomp.jar imql10n_server_ja.jar imql10n_server_zh_CN.jar i
      mql10n_server_fr.jar imql10n_server_de.jar imql10n_server_es.jar imql
      10n_server_it.jar imql10n_server_sw.jar imql10n_server_ko.jar imql10n
      _server_zh_TW.jar imql10n_server_pt_BR.jar imql10n_server_lang1.jar i
      mqbroker_ja.jar imqbroker_zh_CN.jar imqbroker_fr.jar imqbroker_de.jar
      imqbroker_es.jar imqbroker_it.jar imqbroker_sw.jar imqbroker_ko.jar
      imqbroker_zh_TW.jar imqbroker_pt_BR.jar imqbroker_lang1.jar

      We need only one path to imq.jar and similar files; we're never going to find jsse.jar, jcert.jar, and jnet.jar in this directory, and to a large extent the internationalization files are never present in downloaded bundles. Even if we cannot completely remove the internalization entries (e.g., if it is too hard to have 2 builds, one with and one without the entries and put the correct build into the correct bundle), we still can clean this up significantly, because every jar file that imqbroker does include (e.g. imqstomp.jar) also includes all those same internationalization files in its manifest. They should be included only in one place.

      We've run some simple tests cleaning up the manifests of imqbroker.jar, imqjmsbridge.jar, imqjmx.jar, imqstomp.jar to remove all the non-existent jar files but keeping (only one) set of internationalization files, and on simple startup and deployment benchmarks, this improves performance between 2.5% and 5%.

        Activity

        Hide
        David Zhao added a comment -

        The problem is in MQ codebase instead of GlassFish codebase.

        A seperate MQ defect(http://java.net/jira/browse/MQ-143) is created and it has been fixed. The fix contains removing jsse.jar, jnet.jar, jcert.jar and I10n jars. It is marked fixed in 5.0 which will go to BG, but they are not causing any
        problems in 4.x so we're not back porting(@Jill).

        The redundant jars with ““../../../share/lib/”, for example “../../../share/lib/imq.jar”, are present for the native pkging which is being deprecated. I'd like to leave them in for another release(@Jill).

        Show
        David Zhao added a comment - The problem is in MQ codebase instead of GlassFish codebase. A seperate MQ defect( http://java.net/jira/browse/MQ-143 ) is created and it has been fixed. The fix contains removing jsse.jar, jnet.jar, jcert.jar and I10n jars. It is marked fixed in 5.0 which will go to BG, but they are not causing any problems in 4.x so we're not back porting(@Jill). The redundant jars with ““../../../share/lib/”, for example “../../../share/lib/imq.jar”, are present for the native pkging which is being deprecated. I'd like to leave them in for another release(@Jill).
        Hide
        scatari added a comment -

        Can we back port these changes back to 4.5SP2? This would help us to better 3.1.2 performance numbers.

        Show
        scatari added a comment - Can we back port these changes back to 4.5SP2? This would help us to better 3.1.2 performance numbers.
        Hide
        Jill Sato added a comment -

        The multiple imq.jars are there to support other distributions (e.g., native
        SVR4 packaging, RPM packaging). We can remove this in 5.0 but we need to leave this for 4.x.

        Though the locales are not installed by GF, the mq-locale IPS package
        is available through the Update Center and through the OpenSource community distributions.

        The reason each locale is a separate jar
        is because MQ used to be a bundled solaris product and the solaris installation required
        us to choose an install per locale.

        However, we can clean up some old locale jars (e.g., imqadmin_<lc>.jar, imqbroker_<lc>.jar,
        imqutil_<lc>.jar. We needed those for a while to support the older pkging but those
        are no longer needed. (this is already cleanced up in MQ 5.0).

        Agreed, we can remove i18n jars from imqstomp.jar and imqjmsbridge.jar (this is already fixed in MQ5.0).

        Agreed, we can remove the jsse.jar, jnet.jar, jcert.jar which was leftover to support an
        older version of the JDK (this is already fixed in MQ 5.0).

        Thanks. We'll try to be more conscious when adding jars to the manifest in the future.

        Show
        Jill Sato added a comment - The multiple imq.jars are there to support other distributions (e.g., native SVR4 packaging, RPM packaging). We can remove this in 5.0 but we need to leave this for 4.x. Though the locales are not installed by GF, the mq-locale IPS package is available through the Update Center and through the OpenSource community distributions. The reason each locale is a separate jar is because MQ used to be a bundled solaris product and the solaris installation required us to choose an install per locale. However, we can clean up some old locale jars (e.g., imqadmin_<lc>.jar, imqbroker_<lc>.jar, imqutil_<lc>.jar. We needed those for a while to support the older pkging but those are no longer needed. (this is already cleanced up in MQ 5.0). Agreed, we can remove i18n jars from imqstomp.jar and imqjmsbridge.jar (this is already fixed in MQ5.0). Agreed, we can remove the jsse.jar, jnet.jar, jcert.jar which was leftover to support an older version of the JDK (this is already fixed in MQ 5.0). Thanks. We'll try to be more conscious when adding jars to the manifest in the future.
        Hide
        scatari added a comment -

        To be considered for the next release, increasing priority.

        Show
        scatari added a comment - To be considered for the next release, increasing priority.
        Hide
        David Zhao added a comment -

        Forward to Jill.

        Show
        David Zhao added a comment - Forward to Jill.
        Hide
        Jill Sato added a comment -

        Removed jcert.jar, jsse.jar.
        Consolidated the imq*l10n<lc>jar entries to either
        broker imq_l10n_server.ljar or
        client imq_l10.jar.
        Thanks.

        Show
        Jill Sato added a comment - Removed jcert.jar, jsse.jar. Consolidated the imq* l10n <lc>jar entries to either broker imq_l10n_server.ljar or client imq_l10.jar. Thanks.

          People

          • Assignee:
            Jill Sato
            Reporter:
            Scott Oaks
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: