Blogs

SpringSource Blog

5x startup performance boost in Virgo milestone M02

Glyn Normington

Virgo 2.1.0.M02-incubator is available for download. Apart from completing the "getting started guide", this milestone dramatically reduces startup time – by as much as 5x on some systems.

This should be a further incentive for users of dm Server to migrate to Virgo: Virgo is the codebase for future development, has more liberal licensing, and now provides much faster startup.

Measurements

We measured elapsed time for a warm startup (i.e. without -clean) of the Virgo web server and compared milestone M02 to M01.

On a quad-core Intel Xeon 2.66 GHz machine, startup reduced from 68 to 12 seconds, an improvement of 5.6x.

However some other systems do not achieve the same level of improvement. For example, startup on a dual-core Intel Core i7 2.66 GHz machine reduced from the (blazingly fast) 15.4 to 14.2 seconds, an improvement of only 8%.

Changes

Profiling showed that in-memory logging was the main hotspot during startup. However our experience over the last couple of years, in the field and during development, is that in-memory logging is hardly ever useful in practice. The in-memory log buffer is visible only in dumps, but when a dump occurs the other contents of the dump are always more interesting and useful than log entries. In addition to the overhead of in-memory logging, the circular buffer used to record in-memory log entries is likely to make garbage collection more frequent and increase the cost of marking live objects.

This is clearly a trade-off, but we believe many users will benefit from the increased speed and will rarely, if ever, miss the log entries which are suppressed.

Other changes:

  • avoided the use of 'cflowbelow' from the entry/exit logging aspect
  • suppressed method entry/exit logging of the (well tested and reliable) artifact repository component
  • suppressed method entry/exit logging of getter and setter methods

Similar Posts

Share this Post
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Slashdot
  • Technorati
  • Twitter
 

8 responses


  1. Hi all very good, but is there a windows installer that runs it as a system deamon.
    Thank you, Oscar


  2. Unfortunately the service wrapper function had to be dropped as a result of the Eclipse IP review. Please refer to http://wiki.eclipse.org/Virgo/Community#Migrating_from_dm_Server_2.0.x_to_Virgo_2.1.0.x


  3. Hi,

    A Tanuki compatible wrapper:

    http://yajsw.sourceforge.net/

    Advantages:

    1. Plain java
    2. More features/flexibility than Tanuki
    3. Install services from Java code (can probably be integrated into something like izPack)
    4. Good license

    Disadvantages:

    1. It's not maven friendly, several obscure apache commons snapshots not available in maven repositories
    2. It's bloated for small projects the wrapper (and its dependencies) will be larger than the executable.

    Anycase looking forward to replacing our DMS2 with Virgo in probably our next release.

    Cheers,

    Ric


  4. Just tested the startup time of the kernel – crazy fast! Look forward to testing it out further.


  5. Can we expect similar improvements in performance in other areas, notably JSP compilation for web bundles which is very slow as of now.


  6. Anoop: we don't have any plans to optimise JSP compilation. It *should* be similar to that of native Tomcat. Please raise a Gemini Web bugzilla to record the issue. If you can include a sample application which consistently shows the problem, that would be very helpful. If you've tried profiling the compilation using e.g. YourKit, it would be really helpful if you could include your findings.


  7. wow… still just as bad as JBoss AS…


  8. Ric: thanks for the pointer. We won't be able to integrate yajsw into Virgo as Eclipse won't let us distribute LGPL code, but it's a good resource for users to build their own service wrapper from.

One trackback