From ce857d3aac3b94857da74cf44081c7114757a77d Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 13 Jul 2018 21:01:44 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20option=20to=20disable=20CFQ?= =?UTF-8?q?=20(#898)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/laravel/homestead/issues/896 --- scripts/homestead.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/homestead.rb b/scripts/homestead.rb index 032273bb9..f461d956d 100644 --- a/scripts/homestead.rb +++ b/scripts/homestead.rb @@ -357,7 +357,7 @@ def Homestead.configure(config, settings) s.path = scriptDir + "/install-influxdb.sh" end end - + # Configure All Of The Configured Databases if settings.has_key?("databases") @@ -449,6 +449,16 @@ def Homestead.configure(config, settings) Homestead.backupPostgres(database, "#{dirPrefix}/postgres_backup", config) end end + + # Turn off CFQ scheduler idling https://github.com/laravel/homestead/issues/896 + if settings.has_key?("disable_cfq") + config.vm.provision "shell" do |s| + s.inline = "sudo echo 0 >/sys/block/sda/queue/iosched/slice_idle" + end + config.vm.provision "shell" do |s| + s.inline = "sudo echo 0 >/sys/block/sda/queue/iosched/group_idle" + end + end end def Homestead.backupMysql(database, dir, config)