Liferay on Native JBoss-Tomcat

A few weeks ago I blogged about Tomcat's JNI native library.  Recently, I have been at a client site trying to squeeze every bit of speed out of the servers while running on a deployment with JBoss-Tomcat.  Now, I realized that you could not just run the standard Tomcat APR code because JBoss makes their own customizations to get Tomcat to run.  Rather, JBoss distributes what they call JBoss Native (version 2.0.1 will work fine with JBoss AS 4.0.x) -- their own version of the Tomcat APR.  The installation is fairly straight forward, although JBoss does not distribute OS X binaries (see wiki).

But how does it perform?  Since I was at a client site and we were running performance tests on the system and hammering it with hundreds of concurrent users, I thought I would see how much speed I could get from the native code.  For most processes, I was seeing as high as 20-25% speed boost!  Moral of the story... native code rocks!!

Blogs
We're actually moving away from JBoss in favor of a pure Tomcat solution, but I'll keep this in mind for other implementations!
Hi Josh,

Yah, I have seen clients running JBoss-Tomcat mainly for JBoss' web-console -- which I have to admit, is pretty nice. Our recommendation is normally to just go with pure Tomcat, as you are doing... though do make sure to use the APR! It'll help. emoticon
I just deployed the Tomcat APR in production, and it certainly feels snappier. I'll report back some metrics in a couple of days.
Is there a reason why tomcat is preferred ? Im interested in going with JBOSS to leverage the EJB container, any tips ?
Hi Nic,

In general, what we have found is when you compare Tomcat vs. JBoss-Tomcat, there is a lot more overhead in EJBs that require more memory and processing cycles. So, if you load test a vanilla Liferay installed on Tomcat vs. a vanilla Liferay installed on JBoss-Tomcat, the former outperforms the EJB container quite a bit.

Is there any reason why you require an EJB container? Liferay portal used to be distributed as both a WAR and an EAR, and we switched between the two implementations using Spring. At the end, we realised that the EJBs weren't buying us much.. so we just switched and have been doing quite well.
Hi Alexander,

Im completely agree that Liferay on Tomcat will be a lot more responsive and resource friendly than JBoss, however some of the applications im building will require fully compliant JEE server.

I want to make use of EJB's in my applications and some JMS functionality.

How difficult is it to develop portlets that invoke EJB's residing on the JBoss server ?

Another topic of concern is clustering, has this been done successfully ?
Hi Nic,

If you need a fully compliant app server, then you need one. Liferay portal will not interfere with that at all. It will run fine with EJBs and JMS and many people successfully deploy on JBoss without a problem. Clustering is also not a problem whatsoever. Though it is a bit dated, you can take a look at the wiki article http://www.liferay.com/community/wiki/-/wiki/Main/Clustering.