diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index af83ae27..64f66d6a 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -794,6 +794,18 @@ function install_shellcheck { apt-get -yq install shellcheck } +function set_read_ahead { + # Setting this can significantly improve microSD read performance + read_ahead="$1" + if [ ! "$read_ahead" ]; then + read_ahead=4096 + fi + if [ ! -f /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then + return + fi + echo -n "$read_ahead" > /sys/devices/virtual/bdi/179:0/read_ahead_kb +} + function setup_utils { read_config_param "PROJECT_REPO" write_config_param "PROJECT_REPO" "$PROJECT_REPO" @@ -816,6 +828,9 @@ function setup_utils { function_check separate_tmp_filesystem separate_tmp_filesystem 150 + function_check set_read_ahead + set_read_ahead 4096 + function_check proc_filesystem_settings proc_filesystem_settings