mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-10-12 05:34:53 +08:00
feat: Limit CPU_CORES to amount of physical cores (#1015)
This commit is contained in:
parent
f841eb1ef1
commit
1ca55cad8f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user