tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "郭建军" <jianjun....@dev.bessystem.com>
Subject About pollerThreadCount Description
Date Thu, 06 Apr 2017 12:50:12 GMT
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!
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message