feat: CPU pinning
This commit is contained in:
parent
7ff0752be0
commit
a15d23663b
1 changed files with 6 additions and 0 deletions
|
@ -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."
|
||||||
|
|
Loading…
Reference in a new issue