From 18e53b4a1bfc567ace64dea3213adfd00479671e Mon Sep 17 00:00:00 2001 From: Thomas Kaiser Date: Mon, 10 Apr 2017 07:05:47 +0200 Subject: [PATCH] Minor OMV performance tweaks --- scripts/customize-image.sh.template | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/customize-image.sh.template b/scripts/customize-image.sh.template index 976a01ccc9..34e236b5a8 100644 --- a/scripts/customize-image.sh.template +++ b/scripts/customize-image.sh.template @@ -115,13 +115,17 @@ InstallOpenMediaVault() { 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 \ + # some performance tuning + 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 + echo 10 >/sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor \ + ' /etc/rc.local + echo '* * * * * root for i in `pgrep "smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1' \ + >/etc/cron.d/make_samba_and_netatalk_faster + chmod 600 /etc/cron.d/make_samba_and_netatalk_faster # add SATA port multiplier hint if appropriate [ "${LINUXFAMILY}" = "sunxi" ] && \