开发者

why have multiple tomcat workers?

开发者 https://www.devze.com 2023-02-12 23:25 出处:网络
a jk_connector worker is 开发者_StackOverflow中文版basically a tomcat instance waiting to process requests from a web server.

a jk_connector worker is 开发者_StackOverflow中文版basically a tomcat instance waiting to process requests from a web server.

The apache docs tell you that you should have multiple workers if you have multiple apps, but doesnt really explain why.

What are the pros/cons of having a worker per web app vs 1 worker for multiple apps?


Processor affinity for one. If the workset is bound to one executional unit its built in cache be utilized more effectively. The more applications to share the space the more contention.

Most systems today are based on multiple cpu cores where threads can execute independently on each core. This means that a busy server can better utilize system resources if there are more threads (e.g., 1 thread/cpu), both for multicore (SMP) and multithreading (SMT) systems. A common way for servers is to provide a process/thread pool of workers which can be used and reused to serve multiple simultaneous requests.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号