You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by 郭建军 <ji...@dev.bessystem.com> on 2017/04/06 12:50:12 UTC

About pollerThreadCount Description

Dear,
pollerThreadCount was descripted in tomcat document:


(int)The number of threads to be used to run for the polling events. Default value is 1 per processor but not more than 2.
When accepting a socket, the operating system holds a global lock. So the benefit of going above 2 threads diminishes rapidly. Having more than one thread is for system that need to accept connections very rapidly. However usually just increasing acceptCount will solve that problem. Increasing this value may also be beneficial when a large amount of send file operations are going on。


how to understand 'When accepting a socket, the operating system holds a global lock' ?



I think poller has nothing to do with  accepting a socket, And accepting operation works in the acceptor thread。


Would you show the relevant code for the lock?  Thank you very much.


Look forward to your reply!