Skip to content

Conversation

@baodrate
Copy link
Owner

This does four things:

  • Set the "IOSchedulingClass" and "CPUSchedulingPolicy" to "idle" (we are a background task and should never block the system in any way)
  • Add "--quiet" to the exec line (at best, backups are fire and forget)
  • Mention our own man page in the "Documentation=" directive (good style)
  • Move the [Install] section to the bottom (convention)

Credit: @bdaase
From: baodrate/snap-sync/pull/100

bdaase and others added 2 commits January 30, 2021 21:33
This does four things:
- Set the "IOSchedulingClass" and "CPUSchedulingPolicy" to "idle" (we are a background task and should never block the system in any way)
- Add "--quiet" to the exec line (at best, backups are fire and forget)
- Mention our own man page in the "Documentation=" directive (good style)
- Move the [Install] section to the bottom (convention)
as suggested by wesbarnett

this avoids the service from possibly being CPU-starved
(see https://unix.stackexchange.com/questions/340283/using-and-understanding-systemd-scheduling-related-options-in-a-desktop-context)

IOSchedulingClass, however, was kept.

These options match `btrfs-scrub@.service` on Arch Linux
@baodrate
Copy link
Owner Author

Replaced CPUSchedulingPolicy with Nice per original PR review

@baodrate baodrate merged commit 630e0ea into main Feb 14, 2022
@baodrate baodrate deleted the docs/systemd-service branch February 14, 2022 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants