From fdfe89f61c15e89ba75af12e30f44c4792100d0b Mon Sep 17 00:00:00 2001 From: Thomas Kaiser Date: Mon, 3 Apr 2017 23:40:36 +0200 Subject: [PATCH] Little performance fix for InstallOpenMediaVault example --- scripts/customize-image.sh.template | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/customize-image.sh.template b/scripts/customize-image.sh.template index 60b03f1ba..082a554e3 100644 --- a/scripts/customize-image.sh.template +++ b/scripts/customize-image.sh.template @@ -103,6 +103,15 @@ InstallOpenMediaVault() { \tmv /etc/default/cpufrequtils.bak /etc/default/cpufrequtils' /etc/init.d/firstrun sed -i '/systemctl\ disable\ firstrun/a \ \tsync && sleep 30 && reboot' /etc/init.d/firstrun + + # check for necessary performance tuning + grep -q ondemand /etc/default/cpufrequtils && sed -i '/^exit\ 0/i \ + echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor \ + sleep 0.1 \ + echo 1 >/sys/devices/system/cpu/cpufreq/ondemand/io_is_busy \ + echo 25 >/sys/devices/system/cpu/cpufreq/ondemand/up_threshold \ + echo 10 >/sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor' /etc/rc.local } # InstallOpenMediaVault Main "$@" +