Switch default governor to schedutil on >32 threads machines when it's set to ondemand

Ondemand doesn't scale well with that many cores
This commit is contained in:
Tk-Glitch
2022-08-12 18:39:00 +02:00
parent 614a58fa7c
commit 16919b3ce0

View File

@@ -1092,6 +1092,12 @@ _tkg_srcprep() {
fi
done
# Use schedutil instead of ondemand on >32 threads machines
if [[ $(nproc) -gt 32 ]] && [ "$_default_cpu_gov" = "ondemand" ]; then
warning "The current default governor selected (ondemand) doesn't perform well on >32 threads. Schedutil will be used instead."
_default_cpu_gov="schedutil"
fi
# default cpu gov
if [ "$_default_cpu_gov" = "performance" ]; then
_disable "CPU_FREQ_DEFAULT_GOV_SCHEDUTIL"