- if [ -z "${MAKETUNING}" ]; then
- # We assume that each process consumes about
- # 192MB of memory. Therefore we find out how
- # many processes fit into memory.
- local mem_max=$(( ${HOST_MEM} / 192 ))
-
- local processors="$(system_processors)"
- local cpu_max=$(( ${processors} + 1 ))
-
- local parallelism
- if [ ${mem_max} -lt ${cpu_max} ]; then
- parallelism=${mem_max}
- else
- parallelism=${cpu_max}
- fi
-
- # limit to -j23 because perl will not build
- # more
- if [ ${parallelism} -gt 23 ]; then
- parallelism=23
- fi
-
- MAKETUNING="-j${parallelism}"
+ # We assume that each process consumes about
+ # 128MB of memory. Therefore we find out how
+ # many processes fit into memory.
+ local mem_max=$(( ${SYSTEM_MEMORY} / 128 ))
+ local cpu_max=$(( ${SYSTEM_PROCESSORS} + 1 ))
+
+ local parallelism
+ if [ ${mem_max} -lt ${cpu_max} ]; then
+ parallelism=${mem_max}
+ else
+ parallelism=${cpu_max}