Tracker process taking lot of CPU

Solution 1:

Tracker, which is enabled by default in Ubuntu since 19.10, is a file metadata indexer. It indexes your files to allow for fast searching for content in files from Files or Gnome Documents, find pictures in Gnome Photos, allow to rename files based on metadata, and so on. The different processes you see are processes that crawl your file system, read the file contents and index that contents in database indexes for fast search through Tracker-aware interfaces, such as Files and Gnome Shell activities overview.

Until Ubuntu 19.04, Ubuntu developers removed Tracker from Gnome Shell when they started to use it in Ubuntu 17.04. Performance issues were the reason. The first time, the full index is created, which takes significant time. Subsequently, the index is updated on the fly, which as such does not incur severe performance penalties. Nevertheless, even on a fully indexed system, there is intensive processor use for many minutes shortly after log in. On a system with a modern multicore processor, this does not significantly affect interactive processes, but on older systems, it could lead to significant perceivable decrease in system response for up to ten minutes.

Tracker increasingly is more integrated with Gnome Shell and currently is a hard dependency of file manager nautilus (aka "Files"). As a result, Tracker is enabled by default in Ubuntu versions after the long term release 18.04 (i.e. 19.04, 19.10 and later).

Disable Tracker

To avoid the period of high processor use after login, you may want to disable Tracker. This will disable full text search and renaming of mediafiles based on tags. It will disable the "Starred files" feature (Ubuntu 20.04). However, file name search in Files will continue to work. In the overview, it appears as if only recent files are found after disabling Tracker.

Edit 2020-05-09: method that uses systemd to disables tracker completely for the current user (preferred)

Run the following command to disable tracker for the current user:

systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
tracker reset --hard
sudo reboot

To undo, reenable the services:

systemctl --user unmask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
sudo reboot

Edit 2020-05-09: Following is the method as I originally posted, and which is based on disabling autostart on login of the tracker components. I leave it for reference, but disabling the system services (see above) is the most elegant, most complete and recommended way to fully stop Tracker for your current user without breaking your system.

With following commands, you 1) stop the tracker daemon (for this session), 2) move to your local autostart directory and 3) copy startup files for the various Tracker processes to your local autostart folder. In 4) you disable the autostart of these processes, and in 5) you free the disk space taken by the cache that Tracker may already have made (could be 2 - 4 GB).

tracker daemon -t
cd ~/.config/autostart
cp -v /etc/xdg/autostart/tracker-* ./
for FILE in tracker-* ; do echo Hidden=true >> $FILE; done
rm -rf ~/.cache/tracker ~/.local/share/tracker

When you restart, the tracker daemon will run, but no indexing will be performed, so your processor only will work when you work.

Solution 2:

here's simpler approach to removing this entirely.

Anything that inhibits user input by causing system load exceeding 5 right after boot sounds like a problem to me. This is my solution:

apt purge tracker tracker-extract tracker-miner-fs

This was a problem on a fresh install of Ubuntu 20.04.2.