0

I use: Python 3.6.9;

concurrent.futures import ThreadPoolExecutor;

CentOS 7+; 8 Cores; I/O intensive tasks;

At First; i set ThreadPoolExecutor(max_workers=2 * cpu_count + 2)

Later I found that The running time will be faster when the cpu_count is increased;

    cpu_count   |   finish_seconds 
      8*2+2     |     25s
      100       |     9s

but i know the cpu_count is not the more the better

Do I need to try every time? How can I quickly select a size for a good performance

Wynter
  • 83
  • 3

0 Answers0