Nov 1, 2018

How to fix high CPU usage of tracker-store and tracker-miner-fs on Ubuntu

Tracker is a synergy of technologies that are designed to provide a highly sophisticated, innovative and integrated desktop.

Tracker provides the following:
  • Indexer for desktop search 
  • Tag database for doing keyword tagging of any object
  • Extensible metadata database for apps like gedit and rhythmbox which need to add custom metadata to files
  • Database for first class objects allows using tracker's database for storage and implementation of First Class Objects and the Gnome 3.0 Model.
Simply change this values using the gsettings witch will disable the constant indexing of Tracker:

gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false

The values could be changed using dconf-editor by navigating through org > freedesktop > Tracker > Miner > Files

$ dconf-editor &

To Manage Tracker processes and data
$ tracker-control --help
Usage:
  tracker-control [OPTION...]  - Manage Tracker processes and data

Help Options:
  -h, --help                       Show help options
  --help-all                       Show all help options
  --help-general                   Show general options
  --help-status                    Show status options
  --help-miners                    Show miner options

Application Options:
  -V, --version                    Print version

Additional measures:

One is to just remove tracker and gnome-documents, as gnome-documents depends on tracker.

$ sudo apt-get remove

The other methods is to de-activate tracker from starting in the first place.

To disable tracker-miner-fs, if you're in a gui you can run tracker-preferences and disable the indexing of all folders.

tracker-preferences &

To delete existing tracker logs you need to do

$ tracker-control -r

This kills all running tracker processes and removes the databases.

Finally, edit /etc/xdg/autostart/tracker-miner-fs.desktop and tracker-store.desktop and change

X-GNOME-Autostart-enabled=true

to

X-GNOME-Autostart-enabled=false