]> git.sesse.net Git - plocate/commitdiff
Run updatedb with low scheduling priority
authorOndrej Mosnáček <omosnacek@gmail.com>
Sat, 27 Jul 2024 07:14:59 +0000 (09:14 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 27 Jul 2024 07:15:41 +0000 (09:15 +0200)
On my workstation, plocate-updatedb often starts right after waking up
from suspend in the morning, consuming a lot of CPU time and slowing
down other running processes. Mitigate this by specifying a low
scheduling priority in the unit file.

For reference, man-db's unit file does the same:
https://gitlab.com/man-db/man-db/-/blob/0df248b30beb6ec9aa8f57a72a39c3a85cd2b633/init/systemd/man-db.service.in#L13

Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
plocate-updatedb.service.in

index a07505126153524fc664972a3c4f56ec6c254331..4d9c432a239884355e2e46b853213a5ba87cfac9 100644 (file)
@@ -7,6 +7,7 @@ Type=oneshot
 ExecStart=@sbindir@/@updatedb_progname@
 LimitNOFILE=131072
 IOSchedulingClass=idle
+Nice=19
 
 PrivateTmp=true
 PrivateDevices=true