From ac18c3abc702613c6774011117c7f72341ab6514 Mon Sep 17 00:00:00 2001 From: Stanislas Lange Date: Fri, 7 Aug 2020 09:36:15 +0200 Subject: [PATCH] Set CPUQuota to 1/4 of available CPU --- templates/restic-backup.service.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/restic-backup.service.j2 b/templates/restic-backup.service.j2 index 48301f3..9d53831 100644 --- a/templates/restic-backup.service.j2 +++ b/templates/restic-backup.service.j2 @@ -4,6 +4,9 @@ Description=Restic backup [Service] Type=oneshot User={{ restic_user }} + +CPUQuota={{ 25 * ansible_processor_vcpus }}% + {% if restic_ssh_enabled %} Environment="RESTIC_REPOSITORY=sftp:{{ restic_ssh_host }}:{{ restic_repository_name }}" {% else %}