feat: CPU pinning

This commit is contained in:
Kroese 2024-06-02 19:18:44 +02:00 committed by GitHub
parent 7ff0752be0
commit a15d23663b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,10 +4,16 @@ set -Eeuo pipefail
# Docker environment variables # Docker environment variables
: "${KVM:="Y"}" : "${KVM:="Y"}"
: "${CPU_PIN:=""}"
: "${CPU_FLAGS:=""}" : "${CPU_FLAGS:=""}"
: "${CPU_MODEL:=""}" : "${CPU_MODEL:=""}"
: "${DEF_MODEL:="neoverse-n1"}" : "${DEF_MODEL:="neoverse-n1"}"
if [[ "${SYS,,}" == *"-rk35xx" ]]; then
# Pin to performance cores on Orange Pi 5
CPU_PIN="4,5,6,7"
fi
if [[ "${ARCH,,}" != "arm64" ]]; then if [[ "${ARCH,,}" != "arm64" ]]; then
KVM="N" KVM="N"
warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance." warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance."