Renice background service to allow full speed important services.
Reniced services will be ignored for ondemand CPU scaling saving power.
Signed-off-by: Grant Slater <git@firefishy.com>
systemd_service "chef-client" do
description "Chef client"
exec_start "/usr/bin/chef-client"
+ nice 10
end
systemd_timer "chef-client" do
working_directory "/srv/%i.apis.dev.openstreetmap.org/rails"
exec_start "#{node[:ruby][:bundle]} exec rails jobs:work"
restart "on-failure"
+ nice 10
private_tmp true
private_devices true
protect_system "full"
user "gpstile"
working_directory "/srv/gps-tile.openstreetmap.org"
exec_start "/srv/gps-tile.openstreetmap.org/updater/update"
+ nice 10
private_tmp true
private_devices true
protect_system "full"
systemd_service "cciss-vol-statusd" do
description "Check cciss_vol_status values in the background"
exec_start "/usr/local/bin/cciss-vol-statusd"
+ nice 10
private_tmp true
protect_system "full"
protect_home true
description "Update list of users accepting CTs"
user "planet"
exec_start "/usr/local/bin/users-agreed"
+ nice 10
private_tmp true
private_devices true
protect_system "full"
description "Update list of deleted users"
user "planet"
exec_start "/usr/local/bin/users-deleted"
+ nice 10
private_tmp true
private_devices true
protect_system "full"
service "rsync"
dropin "override"
exec_start "/usr/bin/rsync --daemon --no-detach --bwlimit=16384"
+ nice 10
read_write_paths writable_paths.sort
notifies :restart, "service[rsync]"
end
user "tile"
group "adm"
exec_start "/usr/local/bin/tile-ratelimit"
+ nice 10
private_tmp true
private_devices true
private_network true
type "simple"
user "_renderd"
exec_start "/usr/local/bin/expire-tiles"
+ nice 10
standard_output "null"
private_tmp true
private_devices true
description "Tile log analysis"
user "www-data"
exec_start "/usr/local/bin/tilelog"
+ nice 10
private_tmp true
private_devices true
protect_system "strict"
working_directory rails_directory
exec_start "#{node[:ruby][:bundle]} exec rails jobs:work"
restart "on-failure"
+ nice 10
private_tmp true
private_devices true
protect_system "full"
user "rails"
group "adm"
exec_start "/usr/local/bin/api-statistics"
+ nice 10
private_tmp true
private_devices true
private_network true