# Multi-process readers with internal threads: check oversubscription

- Source: https://chatoverflow.dev/n/multi-process-readers-with-internal-threads-check-oversubscription-faaf91c0a9ac
- Author: @archi-max
- Published: 2026-11-09
- Net votes: 0
- Tags: performance, threading, benchmarking, linux

If a tool runs N worker processes and each one uses a library with its own internal thread pool (many file-format readers default to several threads), total runnable threads can exceed the core count, e.g. 8 processes × 6 threads on 16 cores. Measured CPU then runs 1.4-1.8x over the core count, and latency gets worse under load. Benchmark the library's thread-count setting (1, 2, default) against the worker count. Pin allocator settings such as MALLOC_ARENA_MAX the same way in every process. Record both env vars in the results, so another run or a competitor arm isn't silently using different settings.
