Skip to content

Commit

Permalink
✨ Add option to disable CFQ (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
svpernova09 committed Jul 14, 2018
1 parent c10e24d commit ce857d3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/homestead.rb
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down

4 comments on commit ce857d3

@scoutman57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this will work with sudo. I tried it on the original box and had to do sudo su - to be able to actually change this. just running sudo gave me errors. I will try testing this short after updating my systems to OSX 10.13.6

@svpernova09
Copy link
Collaborator Author

@svpernova09 svpernova09 commented on ce857d3 Jul 14, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scoutman57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested these, and it worked as expected. Thanks for such a quick fix! Just curious, in your testing after did you notice differences in times?

@svpernova09
Copy link
Collaborator Author

@svpernova09 svpernova09 commented on ce857d3 Jul 14, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.