Updatedb eats all memory, bogging down the system

Every once in a while, updatedb.timer activates updatedb.service. It renders the system unusable. It is first noticable when the system slows down (sluggish mouse pointer). Ultimately, I have to reboot with Ctrl+Alt+Del if I don’t terminate updatedb fast enough.

In btop I noticed the system starts swapping. systemctl status updatedb.service tells me the unit had 9.6 G peak memory usage. In this instance I was able to terminate it in time. This system has 15 GiB memory in total, and consumes about 3.5 GiB at a minimum (Plasma 6, Chromium with a few tabs).

It seems updatedb is very memory hungry. I wonder if I even need it, because I don’t use locate. Has it any other usage, for example in KDE Plasma?

I tried systemctl disable updatedb.timer, but it only shows the message:

The unit files have no installation config (WantedBy=, RequiredBy=, UpheldBy=,
Also=, or Alias= settings in the [Install] section, and DefaultInstance= for
template units). This means they are not meant to be enabled or disabled using systemctl.

I believe the issue to be the one referenced here
https://wiki.archlinux.org/title/Snapper#updatedb
Made the change myself and it appears to be going pretty smoothly thus far.

2 Likes

Thanks, I will see how it goes!