]> git.openstreetmap.org Git - chef.git/commitdiff
Renice background services
authorGrant Slater <git@firefishy.com>
Fri, 26 Aug 2022 11:19:48 +0000 (12:19 +0100)
committerGrant <github@firefishy.com>
Fri, 26 Aug 2022 13:42:33 +0000 (15:42 +0200)
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>
cookbooks/chef/recipes/default.rb
cookbooks/dev/recipes/default.rb
cookbooks/gps-tile/recipes/default.rb
cookbooks/hardware/recipes/default.rb
cookbooks/planet/recipes/replication.rb
cookbooks/rsyncd/recipes/default.rb
cookbooks/tile/recipes/default.rb
cookbooks/tilelog/recipes/default.rb
cookbooks/web/recipes/rails.rb

index bd22671a73ced1934610183924c600f1cde64175..47323bd874d74a6315b9bbbcf4a454d0a2642c51 100644 (file)
@@ -117,6 +117,7 @@ end
 systemd_service "chef-client" do
   description "Chef client"
   exec_start "/usr/bin/chef-client"
+  nice 10
 end
 
 systemd_timer "chef-client" do
index f4fe890ccbec866202387da78f0358da5c431f5a..70742e3c64aac6a6b6bbd6da9ffd9f5a35884cd7 100644 (file)
@@ -234,6 +234,7 @@ if node[:postgresql][:clusters][:"14/main"]
     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"
index c3fb07796be31118ddff8e5278277074cb77583f..f4db96412858f51cc9530bd1be535ae0a03c5180 100644 (file)
@@ -93,6 +93,7 @@ systemd_service "gps-update" do
   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"
index 23e0d2105fe0722eb21339e5f25db22409ebac5c..a7b894680d1de38006f440a4b8b1772d7367d941 100644 (file)
@@ -325,6 +325,7 @@ if status_packages.include?("cciss-vol-status")
   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
index a31f98288c3217f71152552f95be266f777a64c7..9da2e6889289b475f3ffa6ca42e2864e6f4c08a8 100644 (file)
@@ -161,6 +161,7 @@ systemd_service "users-agreed" do
   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"
@@ -178,6 +179,7 @@ systemd_service "users-deleted" do
   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"
index 0946a0c19f1f9fcf9a38a34e2b0b62db4582802f..11b45b5eac6f6ca1accccbfd9a1713809ff784a9 100644 (file)
@@ -49,6 +49,7 @@ systemd_service "rsync-override" do
   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
index 70085058d71288c82acdc0dbb2384fe9f41dc406..2cb98e11121af869402c225726f015ec8e88bb64 100644 (file)
@@ -537,6 +537,7 @@ systemd_service "tile-ratelimit" do
   user "tile"
   group "adm"
   exec_start "/usr/local/bin/tile-ratelimit"
+  nice 10
   private_tmp true
   private_devices true
   private_network true
@@ -585,6 +586,7 @@ systemd_service "expire-tiles" do
   type "simple"
   user "_renderd"
   exec_start "/usr/local/bin/expire-tiles"
+  nice 10
   standard_output "null"
   private_tmp true
   private_devices true
index 9d1935ff4882d803a9f3527e19dbad7b70f7f320..fd27931bf5bb26eb3c594f53f60f36378b4971de 100644 (file)
@@ -54,6 +54,7 @@ systemd_service "tilelog" do
   description "Tile log analysis"
   user "www-data"
   exec_start "/usr/local/bin/tilelog"
+  nice 10
   private_tmp true
   private_devices true
   protect_system "strict"
index c60655f9e74a797856a4d09211781f891b099250..4cc91d2b44da24b1ce28b013990f7c2ecf5e9d54 100644 (file)
@@ -157,6 +157,7 @@ systemd_service "rails-jobs@" do
   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"
@@ -193,6 +194,7 @@ systemd_service "api-statistics" do
   user "rails"
   group "adm"
   exec_start "/usr/local/bin/api-statistics"
+  nice 10
   private_tmp true
   private_devices true
   private_network true