[Service]
# Lower the Comet agent's scheduling priority at launch. On a VM whose virtual
# disk sits on slow backend storage, the agent's backup IO starves foreground
# work (httpd, MySQL, the control panel) and the host feels hung for the whole
# run. Nice is inherited by every process the agent forks -- pkgacct,
# restorepkg, mysqldump -- so one setting covers the whole backup tree.
Nice=10

# best-effort at the lowest priority (7), deliberately NOT
# IOSchedulingClass=idle: idle-class IO is only dispatched when the device is
# otherwise completely quiet, so a busy host under sustained foreground IO can
# starve a backup indefinitely and jobs never finish. best-effort/7 yields to
# normal-priority IO but always makes forward progress.
#
# Caveat worth knowing: the classic ionice classes are only honoured by the bfq
# IO scheduler. On the none/mq-deadline schedulers that EL9 and Ubuntu default
# to, systemd accepts these and the kernel silently ignores them -- Nice above
# is what carries the fix there.
IOSchedulingClass=best-effort
IOSchedulingPriority=7
