Skip to content

ProcessPoolExecutor only schedule tasks on 1 CPU when systemwise isolcpus is enabledΒ #131439

@KokeCacao

Description

@KokeCacao

Bug report

Bug description:

Settings:

sudo nano /etc/default/grub
# enter the following
GRUB_CMDLINE_LINUX="isolcpus=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23"
# save and exit
sudo update-grub
sudo reboot

In a system with 32 CPU, 32G Mem, running the following code shows only CPU 24 is constantly at max while 25~31 have near zero usage. I can confirm that the task is CPU-bounded.

Code:

with concurrent.futures.ProcessPoolExecutor(max_workers=32) as executor:
        futures = {
            executor.submit(
                _process_schem,
                ...
            ): schem_path for schem_path in schem_paths
        }

Let me know if other information should be provided. I am not sure whether this issue relates to kernel, cpython, or something else. Please educate me when you know more than I do.

Ubuntu 22.04.5 LTS x86_64
6.8.0-52-generic
Intel i9-14900KF (32) @ 5.700GHz

CPython versions tested on:

3.10

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions