JohnStarich / python-pool-performance

Analyzes time and space usage of multiple Python thread and process pools with increasing job pool sizes
MIT License
37 stars 8 forks source link

Optimal size of a thread pool #2

Open suchenjm opened 3 weeks ago

suchenjm commented 3 weeks ago

This project is very interesting. I wonder if the authors have considered how to measure the optimal size of a thread pool. As far as I know, there is currently no dataset available for this purpose.

JohnStarich commented 2 weeks ago

That's an interesting question, and if you find a compelling answer please consider sharing here!

This particular script defaults to a constant 50 threads and a CPU-core-count dependent number of processes at (2 * processor cores) + 1, though these are configurable.

My understanding is the optimal thread pool size highly depends on the kind of thread and the kind of work. From my experience with thread pools: