Javier Jardón pushed to branch bst-1.2 at BuildStream / buildstream
Commits:
-
6c5a3f0a
by Javier Jardón at 2018-08-09T16:32:39Z
-
5adf32f1
by Javier Jardón at 2018-08-09T16:32:40Z
-
cd59993d
by Javier Jardón at 2018-08-09T17:19:44Z
1 changed file:
Changes:
... | ... | @@ -19,7 +19,6 @@ |
19 | 19 |
# Tiago Gomes <tiago gomes codethink co uk>
|
20 | 20 |
|
21 | 21 |
import os
|
22 |
-import multiprocessing # for cpu_count()
|
|
23 | 22 |
from collections import Mapping, OrderedDict
|
24 | 23 |
from pluginbase import PluginBase
|
25 | 24 |
from . import utils
|
... | ... | @@ -572,7 +571,10 @@ class Project(): |
572 | 571 |
|
573 | 572 |
# Extend variables with automatic variables and option exports
|
574 | 573 |
# Initialize it as a string as all variables are processed as strings.
|
575 |
- output.base_variables['max-jobs'] = str(multiprocessing.cpu_count())
|
|
574 |
+ # Based on some testing (mainly on AWS), maximum effective
|
|
575 |
+ # max-jobs value seems to be around 8-10 if we have enough cores
|
|
576 |
+ # users should set values based on workload and build infrastructure
|
|
577 |
+ output.base_variables['max-jobs'] = str(min(len(os.sched_getaffinity(0)), 8))
|
|
576 | 578 |
|
577 | 579 |
# Export options into variables, if that was requested
|
578 | 580 |
output.options.export_variables(output.base_variables)
|