Math.min is the intention here. On a 64 core box, it should still only have 2
pollers, not 64
The comment should read ('from' instead of 'of')
> > Very hard for applications to see a performance benefit *from* more than 2
> pollers
> -----Original Message-----
> From: Christopher Schultz [mailto:[email protected]]
> Sent: Wednesday, May 02, 2012 7:14 PM
> To: Tomcat Developers List
> Subject: Re: svn commit: r1333218 - in /tomcat/trunk:
> java/org/apache/tomcat/util/net/NioEndpoint.java
> webapps/docs/changelog.xml webapps/docs/config/http.xml
>
> Filip,
>
> On 5/2/12 5:33 PM, [email protected] wrote:
> > Very hard for applications to see a performance benefit of more than 2
> pollers
>
> [...]
>
> > - protected int pollerThreadCount =
> Runtime.getRuntime().availableProcessors();
> > + protected int pollerThreadCount =
> Math.min(2,Runtime.getRuntime().availableProcessors());
>
> I think you mean Math.max(). What you have is a minimum of 2 and a
> maximum of the number of cores, which is exactly the opposite of what
> your commit comment says is appropriate.
>
> -chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]