[Notes] [Git][BuildStream/buildstream][jjardon/max-jobs] buildstream/_project.py: Restrict max-jobs



Title: GitLab

Javier Jardón pushed to branch jjardon/max-jobs at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_project.py
    ... ... @@ -571,7 +571,10 @@ class Project():
    571 571
     
    
    572 572
             # Extend variables with automatic variables and option exports
    
    573 573
             # Initialize it as a string as all variables are processed as strings.
    
    574
    -        output.base_variables['max-jobs'] = str(len(os.sched_getaffinity(0)))
    
    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))
    
    575 578
     
    
    576 579
             # Export options into variables, if that was requested
    
    577 580
             output.options.export_variables(output.base_variables)
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]