Some of my servlets will involve heavy procession and time-consuming. And other servlets are simple. If the heavy servlet calls are very high in number, the simple servlets cannot be used. so, I want to limit the heavy servlets that it can use only up to 50% of the total CPU. Is it possible? if so, please explain how/where to proceed in tomcat.
Capsulate the code away from the rest of the application as war
then
create a secound instance of Tomcat and configure via the operating system the priority
.
Ubuntu (Linux) system priority
or
try to set threadPriority
into the Executor (thread pool) in Tomcat
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.