On Thu, Jan 29, 2009 at 9:34 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> All,
>
> I often hear folks on the list mentioning that since the APR library is
> the same as that which runs under Apache httpd, the performance of the
> two ought to be the same for static content. I'm not so sure, so I'm
> asking about it.

according to this free chapter of Tomcat: The Definitive Guide, Second
Edition book
http://oreilly.com/catalog/9780596101060/chapter/index.html

tomcat's JIO (old plain java connector) outperforms apache httpd in
nearly all tests, so don't bother playing with APR:)

> Since Tomcat's request processing is all in Java (right?), the request
> must first be processed by Java, including creating all those objects
> that are included in the request. I realize that some of those objects
> are created on demand (for instance, Tomcat doesn't parse all the GET
> and POST parameters from the request until the handling servlet actually
> requests one of them), but all that stuff still happens. Before the
> request is handed-off to APR.
>
> Is the same true of Apache httpd; that is, since Apache must do a bunch
> of pre-processing of the request before the bytes are actually streamed,
> does the performance of the two actually end up being the same?
>
> I can't help but suspect that Apache httpd will outperform Tomcat even
> when it's running APR for static content, merely due to the overhead of
> the JVM, heap management, etc. (which I realize are fairly minimal).

Well, actually when it comes to IO performance Java outperforms C, so
I wouldn't place my money on old bets like C is faster because its C.
It isn't.

>
> Can anyone give a non-flame comment or point to an actual performance
> comparison with decent data?

yeah, check the link (and buy the book :-))

regards
Leon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to