Can There Be Too Much Parallelism?
summary
Yes, too much parallelism causes real slowdowns and stalls: nesting an eight‑thread worker inside another eight‑thread loop commonly oversubscription (8+8 stalls). Practical tools discussed include OpenMP, OpenBLAS/MKL, Python multiprocessing (fork pitfalls), PyTorch num_workers, and threadpoolctl which provides a threadpoolctl context manager to force inner loops to one thread (scikit‑learn uses this). Config options are OMP_NUM_THREADS or GO_NUM_THREADS; a proposed fix is shared runtimes like conda‑forge single threadpool or shipping OpenMP wheels on PyPI.
AI-written summary · about
