Cater for high core count systems

This commit is contained in:
Martin Wimpress 2021-09-06 15:30:41 +01:00
parent 211e5ca90c
commit c368e7ee9e
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
1 changed files with 5 additions and 1 deletions

View File

@ -282,7 +282,11 @@ function vm_boot() {
local CORES_VM="1"
if [ -z "$cpu_cores" ]; then
local CORES_HOST=$(nproc --all)
if [ ${CORES_HOST} -ge 8 ]; then
if [ ${CORES_HOST} -ge 32 ]; then
CORES_VM="16"
elif [ ${CORES_HOST} -ge 16 ]; then
CORES_VM="8"
elif [ ${CORES_HOST} -ge 8 ]; then
CORES_VM="4"
elif [ ${CORES_HOST} -ge 4 ]; then
CORES_VM="2"