Perrin Harkins wrote:
> 
> Sean Chittenden wrote:
> >
> >         Mind if I ask a nit-pick of a performance question?  Currently
> > speed and performance are of upmost importance (I'm currently involved in
> > a mod_perl vs JServ development race).
> 
> If you're on Linux, I can tell you right now that mod_perl is
> significantly faster than the fastest servlet runner
> (http://www.caucho.com/) with the fastest JVM (IBM 1.1.8 final
> release).  If you're on Solaris, all bets are off.  I suspect you should
> be able to clobber JServ in the performance department on any platform
> though.

I evaluated mod_perl and JServ solutions for my company, and my initial
results showed that mod_perl is 50% faster than JServ on a single
processor machine and 70% faster on a dual (Solaris 7, JDK 1.2.1_04). 
There are a couple of things to consider about JServ, though.  One,
mod_jserv opens up a whole new socket to the JServ process for each page
request.  Ouch! (they claim this will be fixed some day).  Two, JServ is
just plain immature technology.  But my theory on why mod_perl runs so
much faster is that Solaris (and other Unixes for that matter) probably
get a higher level of concurrency with a multiprocess model (multiple
httpds each with Perl) rather than a multithreading model (JServ running
in a VM).  True multithreading under Unix is still a fairly new thing
compared to process scheduling.

When I passed off my work to the QE department who took ownership of the
load testing, they saw the same things I did, but claimed to be able to
use the OS and Java to get similar performance to mod_perl.  Part of me
wonders if they "de-tuned" the kernel to make Perl run worse somehow. 
The management ended up choosing Java/JSP for the top-of-service web
servers, which bothers me because our content providers and production
staff simply don't know or use Java, but they use Perl all the time for
other tasks.  I'm sure the ramifications of their choice will manifest
itself in a drastic reduction in time-to-market for web apps and
content.  :-)

In any event, if you're not in a large company and you don't have the
resources to spend on tuning your OS and Java runtime for optimal
performance, mod_perl is your best bet.  It's fast, clean, and
flexible.  And you get free support right here with this list.  :-)

Doug

Reply via email to