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 Manjusaka
Recipients Manjusaka, christian.heimes, galen, giampaolo.rodola, jab, matrixise, mcnelsonphd, methane, vstinner
Date 2020-03-26.13:34:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585229688.11.0.711755325755.issue36054@roundup.psfhosted.org>
In-reply-to
Content
Hello guys, I some ideas about this issue

First, maybe we should add a new API named cpu_usable_count(). I think it's more meaningful than the os.sched_getaffinity(0)

Second, more and more people use docker to run their app today. So people need an official way to get the environment info, not just cpu, but the memory,  the network traffic limit. Because the docker is based on the CGroup in Linux, maybe we can add a cgroup lib as an official supported lib.

but I'm not sure about this idea, because there are some problem.

1. the CGroup is only supported on Linux. I'm not sure that adding a platform-specific lib is a good idea

2. Many languages are not adding cgroup official yet. Maybe there are some languages are optimized for the cgroup (such as Java in JVM)
History
Date User Action Args
2020-03-26 13:34:48Manjusakasetrecipients: + Manjusaka, vstinner, giampaolo.rodola, christian.heimes, jab, methane, matrixise, mcnelsonphd, galen
2020-03-26 13:34:48Manjusakasetmessageid: <1585229688.11.0.711755325755.issue36054@roundup.psfhosted.org>
2020-03-26 13:34:48Manjusakalinkissue36054 messages
2020-03-26 13:34:47Manjusakacreate