Skip to content
Snippets Groups Projects
Commit c4206c21 authored by Javier Jardón's avatar Javier Jardón
Browse files

buildstream/_project.py: Restrict max-jobs

even if the machine have mores cores available

Patch taken from YBD: https://gitlab.com/baserock/ybd/blob/master/ybd/app.py#L227
parent 35ab0335
No related branches found
No related tags found
No related merge requests found
Pipeline #27521366 failed
......@@ -572,7 +572,10 @@ class Project():
# Extend variables with automatic variables and option exports
# Initialize it as a string as all variables are processed as strings.
output.base_variables['max-jobs'] = str(multiprocessing.cpu_count())
# Based on some testing (mainly on AWS), maximum effective
# max-jobs value seems to be around 8-10 if we have enough cores
# users should set values based on workload and build infrastructure
output.base_variables['max-jobs'] = str(min(multiprocessing.cpu_count(), 8))
# Export options into variables, if that was requested
output.options.export_variables(output.base_variables)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment