Find the size of the ideal thread pool

suppose you have a quad-core machine with no hyperthreading, running multiple parallel tasks, with 75% of each task"s time spent on IO,25% computing. Ask what the ideal thread pool size is


for reference only

Thread pool size generally needs to be configured according to the type of task:

if it is a CPU-intensive task, you need to squeeze the CPU, reference value as much as possible. You can set the reference value to NCPU+1

.

if it is an IO-intensive task, the reference value can be set to 2*NCPU

of course, this is only a reference value, and the specific settings need to be adjusted according to the actual situation. For example, you can set the thread pool size to the reference value first, and then make appropriate adjustments by observing the task operation, system load and resource utilization

.

you can refer to the following information:
how to reasonably estimate the thread pool size?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e6ef-e962.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e6ef-e962.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?