Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit parallel compile on hosts with limited memory #26

Open
mdavidsaver opened this issue May 2, 2023 · 1 comment
Open

Limit parallel compile on hosts with limited memory #26

mdavidsaver opened this issue May 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mdavidsaver
Copy link
Member

https://github.com/mdavidsaver/setuptools_dso/blob/0b7223087d0d25b43fc31f095d0987513002a5e3/src/setuptools_dso/dsocmd.py#L354

It would be helpful to detect hosts with many cores, but limited RAM. (eg. a Pi with 4 cores but only 1GB of RAM) Such systems often can't compile multiple objects without paging onto very slow storage, which defeats the purpose of parallel compilation.

I see two parts:

  • A portable way to detect available RAM (and swap?).
  • A heuristic for deciding how to limit concurrency.
@mdavidsaver mdavidsaver added the enhancement New feature or request label May 2, 2023
@mdavidsaver
Copy link
Member Author

f82966c attempts to apply a (probably crude) test looking for 512MB of available RAM per prospective parallel job. This is only done when run on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant