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

后端 未结 4 2015
抹茶落季
抹茶落季 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-01 23:57

    Many (all?) machines today are multicore, so that means that the load average is not the number make should be checking, as that number needs to be adjusted for the number of cores.

    Does this mean that the --max-load (aka -l) flag to GNU make is now useless?

    No. Imagine jobs with demanding disk i/o. If you started as many jobs as you had CPUs, you still wouldn't utilize the CPU very well.

    Personally, I simply use -j because so far it worked well enough for me.

提交回复
热议问题