You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Remy Maucherat <re...@apache.org> on 2005/05/17 15:33:56 UTC

APR support

Hi,

After optimizing JNI invocations with NIO, I got the benchmark results I 
wanted from APR. The performance of the HTTP APR connector is now the 
same as the regular HTTP connector (at least on Windows). Since 
stability seems good as well (barring programming errors on my part; 
this is obviously not a big surprise as a certain other project did all 
the testing already), I now feel comfortable taking sides and advocating 
APR as the "next gen" IO API for use in Tomcat.

As I said, stability seems quite good overall, so I think the HTTP 
support should become an official part of the next release.

Mladen is currently adding SSL support, while I am working on APRizing 
AJP (which would provide benefits for only certain specific use cases - 
sendfile isn't going to be available, for example).

Note: The main other contending API is NIO, but APR now seems to me a 
far better choice, as it features a simpler objectless API, as well as 
flexible blocking mode handling (NIO forces to be all the time in non 
blocking mode, which has important performance costs for a server like 
Tomcat). It seems to have all the benefits without any drawbacks besides 
installation.

Rémy

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: APR support

Posted by Mladen Turk <mt...@apache.org>.
Remy Maucherat wrote:
> Hi,
> 
> After optimizing JNI invocations with NIO, I got the benchmark results I 
> wanted from APR. The performance of the HTTP APR connector is now the 
> same as the regular HTTP connector (at least on Windows)

Here are the results for Linux:

Server SLES9/amd64 with sp1.
Client RHEL4/amd64.
Connecet with Gigabit ethernet via crossconnect cable.

Tested only static content.
One interesting thing is that CPU usage for Tomcat is
around 50% for 1m file, while when using APR with sendfile
enabled it is around 23%. On window it's even lower.

Not sure weather all the attachment will pass.
If they don't I'll put them somewhere.

One interesting thing is that for small files (1k) the httpd
is two times slower then regular Tomcat.

Regards,
Mladen.