This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jtaylor
Recipients jtaylor
Date 2015-02-26.14:30:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
multiprocessing.cpu_count and os.cpu_count which are often used to determine how many processes one can run in parallel do not respect the cpuset which may limit the process to only a subset of online cpus leading to heavy oversubscription in e.g. containerized environments:

$ taskset -c 0 python3.4 -c 'import multiprocessing; print(multiprocessing.cpu_count())'
$ taskset -c 0 python3.4 -c 'import os; print(os.cpu_count())'

While the correct result here should be 1.

This requires programs to have to use less portable methods like forking to gnu nproc or having to read the /proc filesystem.

Having a keyword argument to switch between online and available cpus would be fine too.
Date User Action Args
2015-02-26 14:30:54jtaylorsetrecipients: + jtaylor
2015-02-26 14:30:54jtaylorsetmessageid: <>
2015-02-26 14:30:54jtaylorlinkissue23530 messages
2015-02-26 14:30:53jtaylorcreate