Set CPUQuota to 1/4 of available CPU

This commit is contained in:
Stanislas Lange 2020-08-07 09:36:15 +02:00
parent ca430781b4
commit ac18c3abc7
No known key found for this signature in database
GPG key ID: 710D9597C7EAD8CF

View file

@ -4,6 +4,9 @@ Description=Restic backup
[Service] [Service]
Type=oneshot Type=oneshot
User={{ restic_user }} User={{ restic_user }}
CPUQuota={{ 25 * ansible_processor_vcpus }}%
{% if restic_ssh_enabled %} {% if restic_ssh_enabled %}
Environment="RESTIC_REPOSITORY=sftp:{{ restic_ssh_host }}:{{ restic_repository_name }}" Environment="RESTIC_REPOSITORY=sftp:{{ restic_ssh_host }}:{{ restic_repository_name }}"
{% else %} {% else %}