On 23/08/2011 21:50, Christopher Schultz wrote:
> Mark,
> 
> On 8/23/2011 4:43 PM, Mark Thomas wrote:
>> On 23/08/2011 21:37, Christopher Schultz wrote:
>>> But, since I'm using AJP, there is a one-to-one relationship 
>>> between request processors at the httpd level and in Tomcat, so 
>>> being able to handle "more" requests doesn't sound like it's 
>>> buying me anything. I'm not sure how HTTP keepalives fit into
>>> all this, but I suspect that mod_jk takes care of this and Tomcat
>>> has little to no control over any of it.
> 
>> Not quite correct. With BIO it is one thread/processor per
>> connection. With NIO/APR it is one thread per currently processing
>> request (i.e connections in keep-alive (HTTP or AJP) do not require
>> a thread or processor).
> 
> Aah, that's a not-so-subtle detail that I seem to have missed: I can
> (might be able to) handle more connections from httpd with fewer
> threads on the Tomcat side.

Exactly.

>>> So, what does either AJP or NIO buy me in an AJP environment?
> 
>> In short, NIO & APR will scale better.
> 
> Gotcha.
> 
> Any opinions on APR versus NIO? APR can do more damage if it dies by
> taking-down the JVM but the NIO connector is less mature and might be
> (slightly) buggier.

Not really. The code between all the connectors is getting more similar
as I reduce the duplication. That should mean fewer bugs/inconsistencies
and simpler fixes when a bug is discovered.

Given the monthly release cycle of 7.0.x (assuming it continues) then
any bug that can be reproduced is going to get fixed pretty quickly.

>>> We have no notable performance problems that do not involve 
>>> obvious application slowness, so BIO has been working fine for
>>> us. I'm inclined to stick with it unless there are some
>>> compelling reasons to switch.
>>>
>>> Any thoughts?
> 
>> If it ain't broke...
> 
> I'm kinda thinking that way. It's not like I'm having to serve so much
> traffic that I'm thrashing my threads or anything. On the other hand,
> it might not be a bad idea to avoid such problems in the future by
> planning for them, now. Our usage is only increasing over time.

Better to test NIO or APR while you can go back to BIO and get any
issues fixed now. Easier than waiting until you need NIO or APR to find
out there is a bug that breaks things for your site.

Mark

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

Reply via email to