Allow configuring Axii with desired job numbers used for building etc.
This is the counterproposal to !176 (closed):
Have an Axii global config option (and workspace for the future) to configure the job number for builds etc. in order to not run into problems with different PCs having a different number of cores.
Desired usage
axii config --global job_number 4 # For example to build with 4 cores by default.
Special values
Prerequisties
You can get the 15-minute (or 5 min or 1 min) system load with this command:
export LOAD=$(cat /proc/loadavg | awk '{ print $3 }')
We will use $LOAD
in the following examples.
Examples
# All cores the system has, no matter what:
axii config --global job_number all
# All cores the system has, no matter what, but one:
axii config --global job_number all_but_one
# Half the cores the system has, no matter what:
axii config --global job_number half
# Cooperative, ceiling $LOAD and subtracting it from all cores the system has (min 1):
axii config --global job_number all_coop
# Cooperative, ceiling $LOAD and subtracting it from all cores but one the system has (min 1):
axii config --global job_number all_but_one_coop
# Cooperative, ceiling $LOAD and subtracting it from half the cores the system has (min 1):
axii config --global job_number half_coop
Edited by Christian Dreher