Browse Source
Ninja and GNU make don't play well with each other. Both try to start enough processes to keep the system's CPUs busy, resulting in an O(N^2) system load in the number of processors. Long term, Ninja seems likely to support the GNU make jobserver mechanism for sharing access to parallelism. But for now we can get 90% of the way there with a simple hack: just run ninja in serial mode with -j1. Sanitycheck when run in non-trivial circumstances has PLENTY of parallelism just from the number of test cases. One interesting note is that even with -j1, system loads under ninja are rather higher. That may be because of significant work done in the (serial) makefiles that dilutes the parallelism of the eventual build, or possibly because ninja itself is multithreaded in its setup code. So I tweaked the number of jobs down to keep the load roughly where it is with make. With this change, I see no difference in behavior or system load, and a ~24% improvement in runtime. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>pull/7751/merge
1 changed files with 10 additions and 2 deletions
Loading…
Reference in new issue