1 2 Previous Next 21 Replies Latest reply: Mar 29, 2011 4:21 AM by jaikiran pai RSS

Any improvements in JBoss AS startup speed planned?

henk de boer Master

I remember that improving the startup performance of JBoss AS was one of the issues for JBoss AS 6.

 

A boot of a stock JBoss AS without any applications deployed is indeed significantly faster on the same hardware compared to JBoss AS 5.1. However, with a medium sized EAR application (50k LOC in WAR, 10k LOC in EJB, couple of dozen EJB beans and JPA entities, ~250 Facelets and JSP pages) deployed, startup time has become worse instead of better.

 

Something that I notice is that CPU utilization is typically between the 100% and 200% on my 8 core machine. I/O peaks to 1200~2000 (random) IOPS at most, which is a good deal below the specs of my SSD.

 

Perhaps it would be possible to do more stuff in parallel to take advantage of machines with many cores? Wouldn't something like annotation scanning be inherently parallelizable? Is there anything specifically planned here for JBoss AS 7 (yes, I know we users are asking a lot, but just curious )

  • 1. Any improvements in JBoss AS startup speed planned?
    Ales Justin Master
    Perhaps it would be possible to do more stuff in parallel to take advantage of machines with many cores? Wouldn't something like annotation scanning be inherently parallelizable? Is there anything specifically planned here for JBoss AS 7 (yes, I know we users are asking a lot, but just curious )

    AS7 services and classloading is all done in parallel.

  • 2. Any improvements in JBoss AS startup speed planned?
    henk de boer Master

    Ales Justin wrote:

     

    Perhaps it would be possible to do more stuff in parallel to take advantage of machines with many cores? Wouldn't something like annotation scanning be inherently parallelizable? Is there anything specifically planned here for JBoss AS 7 (yes, I know we users are asking a lot, but just curious )

    AS7 services and classloading is all done in parallel.

     

    Sounds good! In how much is this a change from AS 6 btw? If AS7 would do ~100% of that in parallel, what would approximately the percentage be in JBoss AS 6?

  • 3. Any improvements in JBoss AS startup speed planned?
    Ales Justin Master
    In how much is this a change from AS 6 btw?

    What do you mean?

    AS7 is completely new code base.

    Apart from VFS, everything was written from scratch.

     

    what would approximately the percentage be in JBoss AS 6?

    In AS6 you have ASYNCH controller mode, but I don't think it's used a lot.

  • 4. Any improvements in JBoss AS startup speed planned?
    henk de boer Master

    Ales Justin wrote:

     

    In how much is this a change from AS 6 btw?

    What do you mean?

    AS7 is completely new code base.

    Apart from VFS, everything was written from scratch.

     

    Well, I mean how much JBoss AS 6 does things in parallel right now? Since the CPU does go higher than 100%, I assume at least some things are being done in parallel but obviously not a lot. With "things" I thus mean all the work that needs to be done during startup.

  • 5. Any improvements in JBoss AS startup speed planned?
    jaikiran pai Master

    henk de boer wrote:

     

     

     

    However, with a medium sized EAR application (50k LOC in WAR, 10k LOC in EJB, couple of dozen EJB beans and JPA entities, ~250 Facelets and JSP pages) deployed, startup time has become worse instead of better.

     

    Any chance this app can be shared or maybe some other reproducible application? AS6 should in no way be worse than JBoss AS5, so it would be interesting to see where the time is being spent.

  • 6. Any improvements in JBoss AS startup speed planned?
    henk de boer Master

    jaikiran pai wrote:

    Any chance this app can be shared or maybe some other reproducible application? AS6 should in no way be worse than JBoss AS5, so it would be interesting to see where the time is being spent.

    I wish I could, really wish so. But this app is proprietary to a company I work for. I can of course do tracing and posting of logs.

  • 7. Any improvements in JBoss AS startup speed planned?
    jaikiran pai Master

    henk de boer wrote:

     

    I can of course do tracing and posting of logs.

    Sure, that might help too.

  • 8. Any improvements in JBoss AS startup speed planned?
    henk de boer Master

    Ales Justin wrote:

    What do you mean?

    AS7 is completely new code base.

    Apart from VFS, everything was written from scratch.

     

    I forgot to ask about this earlier, but, is AS7 really completely rewritten from scratch? Didn't you 'just' take 3 years to do a major rewrite of the kernel between AS4 and 5? Are you really going to do that all over again?

     

    Does rewriting also include e.g. creating a completely new EJB3 implementation, or is it just about the "glue" that binds all the separate projects (Mojarra, Hibernate, EJB3, etc) into the product called "AS"?

  • 10. Any improvements in JBoss AS startup speed planned?
    henk de boer Master

    Ales Justin wrote:

     

    * http://community.jboss.org/wiki/JBossAS7UserGuide

     

    Thanks for the pointer Ales, but it didn't really answer any of the questions I had. The guide mainly talks about the domain mode and stand alone mode and at the end about what is already working in AS 7.

     

    My question was actually to what extend you are rewriting things. Is e.g. the microcontainer completely thrown away and rewritten from scratch? Is the JPA implementation (Hibernate) also written from scratch again? Logic says you probably aren't going to rewrite Hibernate, but what exactly constitutes "everything was written from scratch"?

  • 11. Re: Any improvements in JBoss AS startup speed planned?
    Ales Justin Master

    MC is not part of AS7, hence you need its replacement.

    But most of the same concepts are still there, just re-written to be more optimized.

    e.g.

    * less reflection usage when dealing with services / beans

    * fine grained service control; each state is its own service

    * less lookup/dependency-resolving magic; plain hash eq

    * pure modular CL, no more big-ball-o-mud aka CL repository/domain

    * simplified VDF; deployers --> processors

    * ...

     

    The sub-systems are of course mostly the same; e.g. no Hibernate rewrite.

  • 12. Any improvements in JBoss AS startup speed planned?
    henk de boer Master

    Ok, that makes it more clear. Thanks Ales!

  • 13. Any improvements in JBoss AS startup speed planned?
    Benjamin Seyinbour Expert

    (I hate "I am okay" or "it works for me" kind of response myself) But doesn't the startup speed depends on one's system specs? JBoss6 startup on my system takes less than 3 minutes: size of EAR file is 17.2MB and still counting.

  • 14. Any improvements in JBoss AS startup speed planned?
    henk de boer Master

    Benjamin Seyinbour wrote:

     

    (I hate "I am okay" or "it works for me" kind of response myself) But doesn't the startup speed depends on one's system specs? JBoss6 startup on my system takes less than 3 minutes: size of EAR file is 17.2MB and still counting.

     

    Well, it depends on what's the definition of "okay". In my case, I have a 2.93Ghz quad core i7 with 8 GB memory and a fast SSD, running OS X 10.6 (64 bits). With JBoss AS 5 the startup took something like 36 seconds with the EAR mentioned in the openings post and some 50 seconds with a second EAR deployed to the same AS instance. The first EAR is 62 MB (exploded) and the second is 10 MB (also exploded).

     

    With JBoss AS 6, one EAR is something like a minute and the two ears together is a minute and a half.

     

    In absolute terms these numbers might not be that radical, but in practice it's the difference between waiting for the restart and switching away to reading some web page at every restart (and thus loosing focus on the task currently working on).

     

    Since JBoss AS 6 should have been faster, I was hoping to improve on the 36 seconds for the single EAR. (unfortunately we just removed all JBoss AS 5 specific files from both EARs, so at the moment I can't do a direct head to head comparison with the exact same code base) 

1 2 Previous Next