[PATCH 2/2] paccache.service.in: Lower priority of unit
Frederik “Freso” S. Olesen
freso.dk at gmail.com
Fri Jul 9 10:10:52 UTC 2021
The unit will be run in the background and is not essential for systems
to operate, so giving it the lowest priority will help make it less
disruptive on its system.
Signed-off-by: Frederik “Freso” S. Olesen <freso.dk at gmail.com>
---
src/paccache.service.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/paccache.service.in b/src/paccache.service.in
index 0f71f5f..79b1c91 100644
--- a/src/paccache.service.in
+++ b/src/paccache.service.in
@@ -4,6 +4,13 @@ Description=Remove unused cached package files
[Service]
Type=oneshot
ExecStart=@bindir@/paccache -r
+# Lowering priority
+OOMScoreAdjust=1000
+Nice=19
+CPUSchedulingPolicy=idle
+CPUSchedulingPriority=1
+IOSchedulingClass=idle
+IOSchedulingPriority=7
# Sandboxing and other hardening
ProtectProc=invisible
ProcSubset=pid
--
2.32.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/pacman-contrib/attachments/20210709/49d892ff/attachment.sig>
More information about the pacman-contrib
mailing list