-
Notifications
You must be signed in to change notification settings - Fork 87
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
detect CPU cores count and utilize while building project #88
base: develop
Are you sure you want to change the base?
Conversation
Might not be a great idea on pi systems with lower memory (especially with memory split applied), where they lack the memory to properly support the multicore compilation |
I agree, but still it could be beneficial for ones who have more RAM. $free -g | grep "Mem:" | awk '{print $2}' returns RAM size in GB. What do you think? |
Detection of RAM is a good idea, but I'd adjust the parameters. Personally on my Pi (1GB), I compile with one thread, otherwise there's a chance it freezes up due to memory constraints. Others can chime in here, but I'd adjust the parameters to 1 thread if <1GB |
I would try compiling it with different threading options and measure the high water mark for memory consumption and adjust the script accordingly. Now that my change to not require an extreme memory split has been merged, we can probably change the default for everyone. |
What about making it an interactive option in the install script that defaults to no after 5 seconds with a note not to use it on INSERT SPECS THAT DON'T WORK HERE? Or maybe have it as part of a separate install script? |
This would be useful when cross-compiling for the Pi on a different host (I cross-compile on WSL2 on Windows). |
Description:
Improve build speed. Detect core count and set accordingly cmake and make command line params.
Checklist: