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
all time in millisecondes
Remarks
Conclusions
Raw startup time data available here
Learn MoreBuilding Universal Apache Tomcat Native Library on OS/X
Last Updated on Jeudi, 1 décembre 2011 08:39 Written by Henri Gomez Mercredi, 13 juillet 2011 03:41
I recently notice that my Apache Tomcat running on OS/X 10.6.8 couldn’t use Apache Tomcat Native Library.
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java Jul 13, 2011 11:02:30 AM org.apache.coyote.http11.Http11Protocol init
After digging around and with the help of ASFer Mladen Turk, I figure my previous build was stick to 64bits mode only and I switched my JVM to 32bits mode using -d32.
The fix was then easy, just had to rebuild tomcat-native and asking OS/X gcc to produce both 32/64 bits model library using the following CLFAGS/APXSLDFLAGS.
CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386-arch x86_64'
Here is a small script I’m using now to produce Apache Tomcat Native Library on OS/X.
curl http://mir2.ovh.net/ftp.apache.org/dist//tomcat/tomcat-connectors/native/1.1.20/source/tomcat-native-1.1.22-src.tar.gz -o tomcat-native-1.1.22-src.tar.gz tar xvzf tomcat-native-1.1.22-src.tar.gz cd tomcat-native-1.1.22-src/jni/native CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386 -arch x86_64' ./configure --with-apr=/usr --with-ssl=/usr --with-java-home=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home make clean make sudo cp .libs/libtcnative-1.0.1.22.dylib /usr/lib/java sudo rm -f /usr/lib/java/libtcnative-1.dylib sudo ln -s /usr/lib/java/libtcnative-1.0.1.22.dylib /usr/lib/java/libtcnative-1.dylib
A note about Lion
If you get Java on Lion using the java command on terminal or via the Java Developer Package for Mac OS X 10.7, Java headers are not on the usual location and you could find them under /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
You should then update the configure command line like this :
CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386 -arch x86_64' ./configure --with-apr=/usr --with-ssl=/usr --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/A/
Lion came with Xcode 4.1 and there is also an impact on linker side, libtcnative is now produced as libtcnative-1.0.dylib
Commands became so :
curl http://mir2.ovh.net/ftp.apache.org/dist//tomcat/tomcat-connectors/native/1.1.20/source/tomcat-native-1.1.22-src.tar.gz -o tomcat-native-1.1.22-src.tar.gz tar xvzf tomcat-native-1.1.22-src.tar.gz cd tomcat-native-1.1.22-src/jni/native CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386 -arch x86_64' ./configure --with-apr=/usr --with-ssl=/usr --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/A/ make clean make sudo cp .libs/libtcnative-1.0.dylib /usr/lib/java sudo rm -f /usr/lib/java/libtcnative-1.dylib sudo ln -s /usr/lib/java/libtcnative-1.0.dylib /usr/lib/java/libtcnative-1.dylibLearn More
