Limit number of parallel processes
Bug #1184529 reported by
Robert Ancell
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bake |
Triaged
|
Medium
|
Unassigned |
Bug Description
Limit number of parallel processes, currently Bake uses as many as possible. This might lead to memory issues depending on what types of commands are run. It would be nice to set the default to infinite or some large number so by default parallel builds are as fast as possible.
Changed in bake: | |
importance: | Low → Medium |
To post a comment you must log in.
I doubt there's much speedup to be gained from spawning more parallel processes than there are cores in the system. For example, I often build WebKit with -j4 on a 4-core system. During the build, the CPU meters show all 4 processors pegged at or very close to 100%. This shows that the entire build is CPU-bound.
And I think that in spawning an unlimited number on a large project there's a risk of poor performance due to thrashing from consuming too much memory, or even a risk of out of memory errors. So I think the default should be the number of cores present, i.e. the number printed by the 'nproc' command. If you want to be aggressive, I suppose you could take that number and add one or even multiply by, say, 1.5, though in my own compilation experiments I've never seen that additional parallelism lead to a measurable improvement.