浏览代码

nice and ionice to restic backup

lesion 2 年之前
父节点
当前提交
b42edb434f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      roles/stable/restic/templates/restic-backup.service.j2

+ 4 - 0
roles/stable/restic/templates/restic-backup.service.j2

@@ -7,6 +7,10 @@ User={{ restic_user }}
 
 CPUQuota={{ 25 * ansible_processor_vcpus }}%
 
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
+
 {% if restic_ssh_enabled %}
 Environment="RESTIC_REPOSITORY=sftp:{{ restic_ssh_host }}:{{ restic_repository_name }}"
 {% else %}