In this article
A per-file thread limit does not create the global decode pool, and multiple file readers share that pool within a process.
Separate two layers of parallelism
A training pipeline may use several input workers while the image library also starts decode threads. These are different scheduling layers. More concurrency can improve throughput, but it can also contend for CPU time, memory bandwidth or storage. Before adjusting counts, identify whether the slow stage is compressed input, decompression, array transformation or transfer to the GPU. A busy processor alone does not establish that the model receives batches sooner.
Initialize the library pool deliberately
The OpenEXR Python reference documents threading controls introduced in version 3.5. The global thread count configures a process-wide library pool; a per-file num_threads setting limits use of that pool. Setting only a positive per-file value does not create workers when the global pool is disabled. Configure global state at process initialization and verify the installed binding supports the controls before relying on them in a deployed loader.
Share capacity across simultaneous files
The C++ I/O guide explains why simultaneous files need to share library worker capacity. A per-file budget can prevent one large image from consuming all available decode workers while another file waits. Account for separate processes as separate resource consumers rather than assuming the pool spans the entire training job. Measure the aggregate budget under the real number of loader processes and include the CPU needed by later preprocessing operations.
Preserve buffer ownership during I/O
The Python documentation states that releasing the interpreter lock during I/O does not make returned dictionaries or pixel arrays safe for concurrent mutation. The NumPy thread-safety guide likewise warns about shared mutable arrays. Give each concurrent operation its own file object and buffers, or serialize access appropriately. Do not resize the global pool while file I/O is active, and do not normalize an array concurrently with writing it.
Measure useful input throughput
Compare a bounded set of pool and per-file configurations using representative images, recording batch readiness, CPU use and peak RAM. Keep GPU execution outside the decode timing when isolating the bottleneck. The guides to render capacity and renderer compatibility provide related context. Choose concurrency from measured end-to-end benefit and stable ownership, rather than treating a larger thread setting as an automatic improvement in training performance.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.