Servlet containers, startup time

Last Updated on Vendredi, 15 juillet 2011 01:12 Written by Henri Gomez Vendredi, 15 juillet 2011 12:11

With the release of JBoss AS7, we see many comments around about the startup time of Application Servers.
Even if this appears marginal in real life (an application server is expected to run 24/24 7/7), there is area where startup time is still important like for developpers. In developpment phase, when you have to start/stop your server dozens of times by day, you need fastest start time as possible.

I conducted a very basic and simple test on my MacBook Pro, take various application servers and servlet containers and measure their startup time.

And in this days of Java 7 fever, try these servers with OpenJDK 7 (OS/X version).

Results on MacBook Pro – Core2Duo 2.66Ghz

Startup Time of App Servers (3rd try)

all time in millisecondes

Remarks

  • JBoss AS 6 (minimal profile) startup time was about 27s. I didn’t include it in graph to keep a good scale for others engines
  • JBoss AS6 seems to start well with OpenJDK 7 but was a bit long to stop, so I had to kill the process
  • JBoss AS7 web-profile and non certified full edition came with no webapp, so a bit less works at startup since no webapp has to be deployed and managed. Injecting a basic webapp take an extra 30ms on next starts.
  • All servers performed pretty the same under Apple JDK 1.6.0-26 and OpenJDK 7.
  • Conclusions

  • Jetty is still the fastest container to start around.
  • Apache Tomcat team does a good job on Apache Tomcat 7, near twice faster than Apache Tomcat 6 in startup time and not too far than Jetty.
  • JBoss AS7 startup speed improvements are tremendous, about 13 times faster than its predecessor JBoss AS6, congrats guys !
  • Raw startup time data available here

    Learn More

    Apple JDK’s / OpenJDK – back to benchs

    Last Updated on Dimanche, 17 avril 2011 05:59 Written by Henri Gomez Samedi, 16 avril 2011 02:52

    It’s good to see works in progress for Aqua/Cocoa – AWT ports but what about JVM performances ?

    Test vms

    I selected 4 VMs to be tested


    Apple Java 1.6.0_22 - java version "1.6.0_22"
    Java(TM) SE Runtime Environment (build 1.6.0_22-b04-314-10M3406a)
    Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-314, mixed mode)


    Apple Java 1.6.0_24 - java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07-348-10M3406a)
    Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-348, mixed mode)


    OpenJDK 7 bsd-port - openjdk version "1.7.0-internal"
    OpenJDK Runtime Environment (build 1.7.0-internal-henri_2011_04_11_08_24-b00)
    OpenJDK 64-Bit Server VM (build 21.0-b07, mixed mode)


    OpenJDK 7 macosx-port - openjdk version "1.7.0-internal"
    OpenJDK Runtime Environment (build 1.7.0-internal-b00)
    OpenJDK 64-Bit Server VM (build 21.0-b07, mixed mode)

    Test system

    My test system is an Apple iMac (iMac11,1 ) with Intel i7 2.80Ghz and 8Gb DDR3 1067Mhz, running under SnowLeopard 10.6.7 64bits.
    I wanted to test 64bits VMs on a 64bits machine and this time use a stronger processor with more threads (ie: 4 cores with hyperthreading).

    DaCapo Benchmarks

    I keep the DaCapo 9.12-bach.

    Bench tests launched with -n X, ie (java -jar dacapo-9.12-bach.jar -n 10 pmd)

    BenchApple JDK6 b22Apple JDK6 b24OpenJDK 1.7 bsd-portOpenJDK 1.7 macosx-port
    avrora (10 iterations)3464ms3406ms3281ms3410ms
    eclipse (2 iterations)25635ms23264ms22156ms23503ms
    fop (10 iterations)379ms351ms301ms305ms
    h2 (2 iterations)5662ms5308ms4557ms4694ms
    jython (2 iterations)4287ms4188msFailure (Trace/BPT trap)4004ms
    luindex (10 iterations)2402ms763ms623ms670ms
    lusearch (10 iterations)1500ms2173ms1190ms4019ms
    pmd (10 iterations)2054ms1860ms1582ms1891ms
    sunflow (10 iterations)2763ms2658ms2342ms2292ms
    tomcat (5 iterations)1943ms1884ms1653ms1778ms
    tradebeans (5 iterations)6702ms6199ms4968ms5080ms
    tradesoap (5 iterations)20058ms18501ms21850ms20114ms
    xalan (10 iterations)1080ms926ms788ms805ms

    Conclusion

    Latest Apple JVM, 1.6.0-24 perform better than the old 1.6.0-22 in all of the tests and is near OpenJDK 7 results.

    OpenJDK 7 from the bsd-port perform a little better than the macosx-port. The main difference in build is bsd-port is using stock gcc whereas macos-port use llvm-gcc.

    bsd-port using stock-gcc during OpenJDK build

    Compiling /Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/share/vm/adlc/arena.cpp
    rm -f ../generated/adfiles/arena.o
    /Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/ALT_COMPILER_PATH/g++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/share/vm/prims -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/share/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/cpu/x86/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/os_cpu/bsd_x86/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/os/bsd/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/os/posix/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/share/vm/adlc -I../generated -DASSERT -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -Werror -g -c -o ../generated/adfiles/arena.o /Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-bsdport-x86_64/workspace/hotspot/src/share/vm/adlc/arena.cpp
    

    macosx-port using llvm-gcc during OpenJDK build

    Compiling /Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/share/vm/adlc/arena.cpp
    rm -f ../generated/adfiles/arena.o
    llvm-g++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA32 -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/share/vm/prims -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/share/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/cpu/x86/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/os_cpu/bsd_x86/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/os/bsd/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/os/posix/vm -I/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/share/vm/adlc -I../generated -DASSERT -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_32 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_32 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions -pthread -fcheck-new -m32 -march=i586 -mstackrealign -pipe -Werror -g -c -o ../generated/adfiles/arena.o /Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/hotspot/src/share/vm/adlc/arena.cpp
    

    Performances gain in OpenJDK7 VM vs latest Apple 6 VM is smaller than previously (see previous articles on Apple JDK vs OpenJDK 6), switching to OpenJDK 7 will not be only for pure speed but for functionalities.

    Learn More

    OpenJDK 7 on OS/X and IntelliJ IDEA EAP

    Last Updated on Samedi, 16 avril 2011 02:20 Written by Henri Gomez Samedi, 16 avril 2011 02:16

    During the last weeks, Apple started to contribute it’s Aqua/Cocoa port to OpenJDK 7 on the macosx-port branch. It’s still works it progress but it was nice to see some SWING apps like IntelliJ IDEA works on the preliminary release.

    I used IntelliJ IDEA EAP (10.5) and tweaked it’s startup shell.sh to define AWT_TOOLKIT=CToolkit and add -Dswing.defaultlaf=com.apple.laf.AquaLookAndFeel since Aqua Look and Feel is not default for now.

    export CLASSPATH
    
    LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATHAWT_TOOLKIT
    
    # AWT/Cocoa port for OpenJDK 7 macosx-port
    export=CToolkit
    JVM_ARGS="-Dswing.defaultlaf=com.apple.laf.AquaLookAndFeel $JVM_ARGS"
    
    cd "$IDEA_BIN_HOME"
    while true ; do
      $IDEA_JDK/bin/java $JVM_ARGS -Djb.restart.code=88 $IDEA_MAIN_CLASS_NAME $*
      test $? -ne 88 && break
    done
    

    Then defined OpenJDK 7 from macosx port (available here) as default JVM and started IntelliJ by calling its shell script :

    export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
    /Applications/IdeaX-IU-106.396.app/bin/idea.sh
    

    And I could see a Swing based application running on OpenJDK 7 and OS/X.

    IntelliJ IDEA is so the second major IDE to be compatible with OpenJDK 7 and OS/X – Cocoa, first one was Eclipse thanks to it’s SWT/Cocoa bridge.
    I tested with both NetBeans 7 RC1 and RC2 but it didn’t works. I hope it will be fixed in NetBeans 7 final release.

    Learn More
    Designed by RocketTheme
    WordPress is Free Software released under the GNU/GPL License.