aiomultiprocess icon indicating copy to clipboard operation
aiomultiprocess copied to clipboard

fix cpu_count is NOT correct under container environment! #110

Open eastonsuo opened this issue 4 years ago • 1 comments

Description

when under container environment, os.cpu_count() get the host cpu count, which may be too large for the container to use.

Fixes: use cgroup to compute the virtual cpu the container use

eastonsuo avatar Sep 27 '21 09:09 eastonsuo

There's a lot of system-specific paths and configuration here that I'd rather not have to maintain. This really feels like it should belong in a separate package on PyPI that aiomultiprocess can just use to get an appropriate cpu count.

amyreese avatar Oct 02 '21 19:10 amyreese