9 Replies Latest reply on Jan 9, 2011 7:00 AM by Christian Kaltepoth

    Much slower startup with JBoss 6 final vs JBoss 6 CR

    Patrick Ruckstuhl Newbie

      There seems to be a huge increase in startup time between JBoss 6 CR and JBoss 6 Final

       

       

      JBoss 6 CR

      • Normal: ~1.5 min
      • Debug: ~2 min

       

       

      JBoss 6 Final

      • Normal: ~5 min
      • Debug: ~8 min

       

      For both servers I use the standard server profile and did not modify any settings

       

      I'm deploying one ear directory with an ejb jar directory, some jmx services in a sar directory and a war directory with jsf 2.

       

      I'm running on Linux 32bit

       

      What could be the reason for this huge difference? With this startup times JBoss 6 Final is unusable for development. Any ideas what goes wrong and what I could improve?

        • 1. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
          jaikiran pai Master

          What's the startup time without your application deployed? Then we can narrow down the problem. Also please provide more details about the application. And do you see any significant info in the server.log or on the console on where the time is being spent?

          • 2. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
            Patrick Ruckstuhl Newbie

            JBoss without our ear deployed:

             

             

            JBoss 6 CR

            • Normal: ~30 s
            • Debug: ~50 s

             

             

            JBoss 6 Final

            • Normal: ~30 s
            • Debug: ~55 s

             

             

            From the log it takes the most time here

             

            Final (~3 minutes)

             

            12:52:44,914 INFO  [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0]
            12:55:50,535 INFO  [PersistenceUnitValueMetaData] iDependOn persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb
            12:55:50,886 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@25174658{vfs:///home/eorders/jboss-final/server/default/deploy/eorders.ear/eorders.jar/}
            12:55:50,887 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@25174658{vfs:///home/eorders/jboss-final/server/default/deploy/eorders.ear/eorders.jar/}
            12:55:50,887 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@14952099{vfs:///home/eorders/jboss-final/server/default/deploy/eorders.ear/haydn.war/}
            12:55:50,887 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@14952099{vfs:///home/eorders/jboss-final/server/default/deploy/eorders.ear/haydn.war/}

             

             

            CR (17 seconds)

             

            13:02:21,868 INFO  [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0]
            13:02:38,926 INFO  [PersistenceUnitValueMetaData] iDependOn persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb
            13:02:39,318 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@26981563{vfs:///home/eorders/jboss-pre/server/default/deploy/eorders.ear/eorders.jar/}
            13:02:39,319 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@26981563{vfs:///home/eorders/jboss-pre/server/default/deploy/eorders.ear/eorders.jar/}
            13:02:39,319 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@16847489{vfs:///home/eorders/jboss-pre/server/default/deploy/eorders.ear/haydn.war/}
            13:02:39,319 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@16847489{vfs:///home/eorders/jboss-pre/server/default/deploy/eorders.ear/haydn.war/}

             

             

            Some information about the application

             

            eorders.ear is a folder in my case and contains the following folders

             

            eorders.jar an ejb 3.0 application

            • uses a persistence-context
            • uses an interceptor:

             

            <assembly-descriptor>

                            <interceptor-binding>
                            <ejb-name>*</ejb-name>
                            <interceptor-class>bla.interceptors.MDCInterceptor</interceptor-class>
                            </interceptor-binding>

            </assembly-descriptor>

             

             

            haydn.war a JSF 2.0 application and interface classes and containers for accessing the ejbs, it is a very simiple "hello world" JSF application that calls one EJB

             

             

            eorders.sar mbeans to export some functionality

             

            jboss-service.xml looks like this:

             

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
            <server>
                    <mbean code="bla.mbean.MyController"
                               name="bla:service=eorders/MyController"/>

             

                    <mbean code="bla.simulator.mbean.SimulatorController"
                               name="bla:service=eorders/SimulatorController"/>

             

            </server>

             

            various dependency jars

             

             

            the META-INFO of the ear does contain an application.xml

             

            <?xml version="1.0" encoding="UTF-8"?>
            <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
                    <display-name>Haydn</display-name>
                    <module>
                            <web>
                                    <web-uri>haydn.war</web-uri>
                                    <context-root>haydn</context-root>
                            </web>
                    </module>
                    <module>
                            <ejb>eorders.jar</ejb>
                    </module>
            </application>

             

            and an jboss-app.xml

             

            <?xml version='1.0' encoding='UTF-8'?>
            <!DOCTYPE jboss-app PUBLIC  "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
            <jboss-app>
                    <loader-repository>bla:loader=foo/eorders.ear
                            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
                 </loader-repository>
                    <module>
                            <service>eorders.sar</service>
                    </module>
            </jboss-app>

            • 3. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
              jaikiran pai Master

              Patrick Ruckstuhl wrote:

               

              JBoss without our ear deployed:

               

               

              JBoss 6 CR

              • Normal: ~30 s
              • Debug: ~50 s

               

               

              JBoss 6 Final

              • Normal: ~30 s
              • Debug: ~55 s

               

               

              So it's an application deployment time issue then.

               

               

              Patrick Ruckstuhl wrote:

               

              From the log it takes the most time here

               

              Final (~3 minutes)

               

              12:52:44,914 INFO  [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0]
              12:55:50,535 INFO  [PersistenceUnitValueMetaData] iDependOn persistence.unit:unitName=jboss-ejb3-timerservice-

              Try enabling DEBUG level logs and check the server.log to see if you can get more information on what is being done during that time.

               

               

              Patrick Ruckstuhl wrote:

               

               

              Some information about the application

               

              eorders.ear is a folder in my case and contains the following folders

               

              eorders.sar mbeans to export some functionality

               

              jboss-service.xml looks like this:

               

              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
              <server>
                      <mbean code="bla.mbean.MyController"
                                 name="bla:service=eorders/MyController"/>

               

                      <mbean code="bla.simulator.mbean.SimulatorController"
                                 name="bla:service=eorders/SimulatorController"/>

               

              </server>

               

              Is there any time consuming code in the create/start() methods of those MBeans?

               

              Patrick Ruckstuhl wrote:

               

              various dependency jars

              How many of them? Where are they placed? And approximately what is the size of those jars altogether?

              • 4. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
                Patrick Ruckstuhl Newbie

                I had debug log enabled (-Djboss.server.log.threshold=DEBUG), if there is another option please point it out.

                 

                 

                As for the two mbeans

                SimulatorController

                • very small
                • does not have any create()/start() code in it

                 

                MyController

                • does only have start() and stop() code in it
                • does log start and end of start() call and takes about 5 seconds and is started much later

                 

                 

                JARs

                The jar files are in in eorders.ear/XXXXX.jar

                 

                there are 73 jar files with a total size of about 35 MB

                • 5. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
                  jaikiran pai Master

                  Patrick Ruckstuhl wrote:

                   

                   

                  JARs

                  The jar files are in in eorders.ear/XXXXX.jar

                   

                  there are 73 jar files with a total size of about 35 MB

                  Are those just plain java libraries? Or do they contain any EJBs or other similar components? If they are just libraries then move those to eorders.ear/lib folder (create a lib folder if it isn't there).

                  • 6. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
                    Patrick Ruckstuhl Newbie

                    Thank you very much, that was exactly the problem.

                    • 7. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
                      Christian Kaltepoth Newbie

                      Sorry for hijacking the thread, but I have similar problems with 6.0.0.Final and I don't think it makes sense to open a separate thread for this.

                       

                      In my case not EAR file deployment but WAR files (deployed independently, meaning not included in an EAR archive) is very slow. The deployment of a simple WAR archive takes more then one minute where as 4.2.2.GA deployed it in about 10 seconds. The WAR file has about 30MB of JAR files in its WEB-INF/lib/ directory.

                       

                      From what I understand the problem with the EAR file was that all JAR libraries where scanned for annotations because they were not placed in the lib/ directory of the EAR. I think the app server always scans the WEB-INF/lib directory of WAR files, correct? In my case this is really not necessary. Is there any way of prevening this behavior?

                      • 8. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
                        jaikiran pai Master

                        Christian Kaltepoth wrote:

                         

                         

                         

                        In my case not EAR file deployment but WAR files (deployed independently, meaning not included in an EAR archive) is very slow. The deployment of a simple WAR archive takes more then one minute where as 4.2.2.GA deployed it in about 10 seconds. The WAR file has about 30MB of JAR files in its WEB-INF/lib/ directory.

                         

                        This is a different problem. And I'm guessing that it's because of this issue http://community.jboss.org/thread/160718?tstart=0 (JIRA here https://issues.jboss.org/browse/JBAS-8786)

                        • 9. Re: Much slower startup with JBoss 6 final vs JBoss 6 CR
                          Christian Kaltepoth Newbie

                          Thank you for the reference to the other forum thread. I will follow the discussion there.