CodePudding user response:
(the largest number of jobs - queue capacity)/each thread processing power=maximum number of threads per secondCodePudding user response:
Cpu-intensive task, the maximum number of threads & lt;=the number of available core CPU,IO intensive tasks, the maximum number of threads and CPU core number is not a strong connection, according to the size of the quota and the performance of the server to set a value, if IO quota is an average of 100, the largest number of threads can be set to 120, if the average is a large amount of IO task, then, suggest to adjust the software architecture, using distributed to handle, the bottleneck is not what the thread pool,
CodePudding user response:
Java multi-thread programming have the introduction of practical guide to chapter 9CodePudding user response:
"Concurrent Java programming of actual combat" classic books, learning multithreading is highly recommended