Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Update algorithm for determining number of parallel jobs - develop #9111

Merged
merged 1 commit into from
May 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/helpers/general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ function set_system_vars() {
export DISK_INSTALL=$1
export DISK_TOTAL=$(($2 / 1024 / 1024))
export DISK_AVAIL=$(($4 / 1024 / 1024))
export JOBS=${JOBS:-$(( MEM_GIG > CPU_CORES ? CPU_CORES : MEM_GIG ))}
# For a basic hueristic here, let's require at least 2GB of available RAM per parallel job.
# CPU_CORES is the number of logical cores available.
export JOBS=${JOBS:-$(( MEM_GIG / 2 >= CPU_CORES ? CPU_CORES : MEM_GIG / 2 ))}
}

function install-package() {
Expand Down