问题描述
我只想知道如何增加tomcat线程池中的线程数?以及设置最大值的数字是多少,我不知道什么是合适的?
i just want to know How to increase number of threads in tomcat thread pool ?and what number to set the max too, i don't know what's appropriate ?
推荐答案
听起来您应该保持默认设置 ;-)
Sounds like you should stay with the defaults ;-)
说真的:您应该设置的最大并行连接数取决于您预期的 tomcat 使用情况以及服务器上的内核数.处理器上的内核越多 => 可以执行的并行线程越多.
Seriously: The number of maximum parallel connections you should set depends on your expected tomcat usage and also on the number of cores on your server. More cores on your processor => more parallel threads that can be executed.
看这里如何配置...
Tomcat 9:https://tomcat.apache.org/tomcat-9.0-doc/config/executor.html
Tomcat 8:https://tomcat.apache.org/tomcat-8.0-doc/config/executor.html
Tomcat 7:https://tomcat.apache.org/tomcat-7.0-doc/config/executor.html
Tomcat 6:https://tomcat.apache.org/tomcat-6.0-doc/config/executor.html
这篇关于如何增加tomcat线程池中的线程数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!