D
Deleted member 63539
Guest
My CPU has 4 physical cores. Ninja's default make jobs is set to 6 and it caused out of memory problem when the compiler is GCC. By trial and error I found the suitable make jobs for GCC is 3.
So I come up with this formula: make jobs = physical cores - 1
Recently I build mulle-clang for playing with Objective C (I don't like the language much and about to remove it). I found the logic the developer used in his install-mulle-clang script is:
After evaluate it, the make jobs for my system is 3. Do you think that is the ideal make jobs formula for multicores system? And what is your own formula?
So I come up with this formula: make jobs = physical cores - 1
Recently I build mulle-clang for playing with Objective C (I don't like the language much and about to remove it). I found the logic the developer used in his install-mulle-clang script is:
Bash:
if [ "${OPTION_PARALLEL}" = "NO" ]
then
MAKE_FLAGS="-j 1"
else
local cores
local loadavg
cores="`get_core_count`"
loadavg="`expr $cores / 4`"
loadavg="`expr $cores - ${loadavg}`"
if [ "${loadavg}" -gt 0 ]
then
MAKE_FLAGS="-l ${loadavg}"
fi
fi
After evaluate it, the make jobs for my system is 3. Do you think that is the ideal make jobs formula for multicores system? And what is your own formula?