tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darius D." <>
Subject Re: APR connector pollTime defaults are strange in tomcat6/7
Date Mon, 01 Aug 2011 22:44:05 GMT

My goal with this thread was to rise awareness with APR connector poll time
defaults, as some users will not really bother investigating why their
servers have such high context switches / timer interrupts. There is no
"problem" here as Tomcat is working fine with defaults. 

There should be no harm by setting it to 1000000 microseconds, as NIO
connectors are using 1000ms as default selectorTimeout ( same epoll inside )
and working just fine.

Christopher Schultz-2 wrote:
> Hash: SHA1
> Darius,
> On 7/18/2011 2:23 PM, Darius D. wrote:
>> Does Tomcat APR really needs pollTime set so low by default? I
>> thought timeout is meant for some sort of book keeping, where is all
>> connections in FD set are "idle", no events come for timeout period -
>> you force timeout and do bookkeeping - on a busy system you will get
>> events anyway cause of socket traffic. Also connection timeout is 60s
>> by default, so ending connection @ 2ms precision is not enhancing
>> latency in any way.
> Seems like a reasonable question.
>> P.S. There exists perfect workaround in latest Tomcat7, using 
>> protocol="org.apache.coyote.http11.Http11NioProtocol" and 
>> protocol="org.apache.coyote.ajp.AjpNioProtocol" for AJP will do away
>> with all unneeded context switches.
> Yes, switching from APR connector to another one certainly does
> alleviate any issues you are experiencing by using the APR connector.
> This isn't really a workaround. :)
> On the other hand, a better "workaround" would be to set these values
> appropriately for your environment. What's stopping you from setting the
> pollTime to, as you suggest, 100000 microseconds? That isn't really a
> workaround, either: it's proper configuration.
> It's probably worth discussing what the defaults should be, but there's
> a perfectly reasonable course of action for you at this point: change
> the configuration.
> - -chris
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla -
> 5b0An0a1E4LPyrIVcREaBqt+deRvVsOa
> =bJY5
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Tomcat - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message