feat: Limit CPU_CORES to amount of physical cores (#1015)

This commit is contained in:
Kroese 2025-09-21 13:41:20 +02:00 committed by GitHub
parent f841eb1ef1
commit 1ca55cad8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,11 @@ fi
[ -n "${CPU_CORES//[0-9 ]}" ] && error "Invalid amount of CPU_CORES: $CPU_CORES" && exit 15
if [ "$CPU_CORES" -gt "$CORES" ]; then
warn "The amount for CPU_CORES (${CPU_CORES}) exceeds the amount of physical cores, so will be limited to ${CORES}."
CPU_CORES="$CORES"
fi
# Check system
if [ ! -d "/dev/shm" ]; then