You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, python creates a pool of os.cpu_count() items. Unfortunately, cpu_count() doesn’t honor cgroup limitations – this is a known cpython issue (python/cpython#80235) and it doesn’t look like it will be fixed in the near future.
This provides significant server load if you launch analyzer inside a container on some powerful machine.
Ok. Though after some experiments _cpu_count() implementation in pylint turned out to be not ideal and can work incorrectly on a real hardware - see pylint-dev/pylint#7338. So currently I use its truncated variant without a hack for AWS. Will monitor how it works and create a PR if everything is fine.
When launched without debug, analyze-build creates a pool of size None:
https://github.com/llvm/llvm-project/blob/main/clang/tools/scan-build-py/lib/libscanbuild/analyze.py#L238
In this case, python creates a pool of
os.cpu_count()
items. Unfortunately,cpu_count()
doesn’t honor cgroup limitations – this is a known cpython issue (python/cpython#80235) and it doesn’t look like it will be fixed in the near future.This provides significant server load if you launch analyzer inside a container on some powerful machine.
At the same time, pylint has developed its own implementation of cpu counter which is aware of cgroups:
_query_cpu()
, https://github.com/PyCQA/pylint/blob/main/pylint/lint/run.py#L34It would be nice to take
_query_cpu()
from pylint (or provide a similar solution) and call it instead of using None in https://github.com/llvm/llvm-project/blob/main/clang/tools/scan-build-py/lib/libscanbuild/analyze.py#L238The text was updated successfully, but these errors were encountered: