tracker-miner-fs
is taking 90% of CPU. I am using Ubuntu 20.04.
Ubuntu – tracker-miner-fs is taking 90% of CPU
20.04memory leaktracker
Related Solutions
Tracker's settings are now on dconf database, Managed through dconf-editor
(GUI) or gsettings
(CLI) under the org.freedesktop.Tracker.*
tree:
For Ubuntu 16.04, you could set indexing to run in the background with tracker-preferences
. If that command wasn't already installed, you could install it with sudo apt install tracker-gui
After its initial complete index run, tracker
— at least on a machine with SSD storage that isn't receiving huge dumps of new files — shouldn't take a significant time to run. If you find that tracker has locked up, I have suggested a solution here.
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.
Best Answer
Have some patience. It eventually will go over.
Tracker is an indexing system. It searches all files for words, which are included in a database so you can quickly find files containing specific words.
The first time, tracker needs to index all files. On subsequent times, only changed and new files are also included in the index. It is typical for Tracker to require some minutes of high processor activity to check the file system for changed files and update the index.
‣ If, despite your patience, tracker keeps using high cpu, then there may be an issue with the database. In that case, clearing the database and having tracker reconstruct it may help:
Beware, all files need reindexing, so there will be some processor useage for a while.
‣ It may be that you have a folder with frequently changing content, e.g. a Downloads folder. You can selectively disabling tracking a folder by placing a hidden file
.trackerignore
in the folder, or disable searching the folder in the Settings - Search dialog (button "Search locations:" in Ubuntu 20.04, gear wheel in older versions).‣ If Tracker overall annoys you, you can disable it completely. File name based search in nautilus will still work (and be quite a bit faster).