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

Feature request: Build with more Processor #255

Closed
Neko-vecter opened this issue Apr 1, 2024 · 1 comment
Closed

Feature request: Build with more Processor #255

Neko-vecter opened this issue Apr 1, 2024 · 1 comment
Labels
feature request feature request

Comments

@Neko-vecter
Copy link

Is your feature request related to a problem? Please describe

If using a system that have more than 4 processor. The makefile will only use 4 processor.

When using CI for build images. Usually a server is used to do the build. Unlike a Single Board Computer (like a Raspberry Pi) a server have more cores that available. Using more CPU cores allows for faster system image builds.

Describe the solution you'd like

change build_apps() function in file bin/build.sh

    # check the system memory
    if [[ "$(get_avail_mem)" -le 524288 ]]; then
        USE_PROCS=-j1
    elif [[ "$(get_avail_mem)" -le 1048576 ]]; then
        USE_PROCS=-j2
    else
        # If there is enough memory using the max processor to build 
        # $(nproc) will use the max processor core the system have
        USE_PROCS=-j$(nproc) 
    fi

Describe alternatives you've considered

No response

Additional information

No response

@Neko-vecter Neko-vecter added the feature request feature request label Apr 1, 2024
@mryel00
Copy link
Member

mryel00 commented Apr 2, 2024

As we don't know if this might have unseen consequences, for maybe our OS buildchain running on GitHub runners, or at some other point, we won't add such a thing.
A Pi4 takes about 3m22s to build camera-streamer, so imo it isn't worth the risk to break something just to save ~1-2 minutes.

Also as a sidenote, we will change to prebuilt binaries as already mentioned in your other FR #218, therefore this code will be deprecated and removed with that other FR.

If you only talked about x86 systems and therefore only ustreamer, I can safely say, you won't get any benefit from increasing it. Pi4 takes 16s with 4 cores. My WSL takes 1.2s with 16 cores and 1.4s with 4 cores.

@mryel00 mryel00 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request
Projects
None yet
Development

No branches or pull requests

2 participants