How to use GNU make --max-load on a multicore Linux machine?

后端 未结 4 2010
抹茶落季
抹茶落季 2021-01-01 23:05

From the documentation for GNU make: http://www.gnu.org/software/make/manual/make.html#Parallel

When the system is heavily loaded, you will probably w

4条回答
  •  温柔的废话
    2021-01-02 00:00

    Does this mean that the --max-load (aka -l) flag to GNU make is now useless? What are people doing who are running parallel makefiles on multicore machines?

    One of examples is running jobs in test-suite where each test has to compile and link a program. Linking sometimes load system too much, as result - fatal error: ld terminated with signal 9 [Killed]. In my case, it was not memory overhead but CPU usage, so usually suggested swap file didn't help.

    With option -l 1 execution is still parallel but linking is almost sequential:

提交回复
热议问题