Raven - Blog
May 16, 2022

GNOME: Indexing with Tracker

Posted on May 16, 2022  •  6 minutes  • 1071 words  • Other languages:  Français
This article is made in the software context of Ubuntu 22.04 with GNOME 42.0. There is nothing to install, this is about native features.

What is Tracker used for ?

Tracker is the file indexing tool for the GNOME desktop environment and therefore for Nautilus (GNOME’s file manager).

Tracker (in version 3) is particularly powerful, not greedy and extremely fast (especially on newer hardware).

Tracker does not just search for a file by name and/or location, it will search the content and metadata. Thus, you can find an mp3 file with the name of the artist, a PDF document with an expression in a paragraph or the author of the document… .

demo tracker3

How it works

Tracker uses an index system and this is what allows it to be so instantaneous. It will read its index and search in the metadata and content for matches with your search. This index is updated automatically and in real time as soon as a file is added or modified in an indexed location. The search is therefore always accurate and up to date.

Warning, Tracker is not designed to index millions of small files like those in a large source code. It remains a tool made for a desktop environment and the files related to it. Here is an excerpt from the documentation about it 1 :

When you add or edit files, Tracker Miner FS will update its index. This should be very quick, but if a huge number of files are added then it may cause noticably high CPU and IO usage until the new files have been indexed. This is normal. Tracker is not designed to index directories of source code or video game data. If content like this appears in the locations it is configured to index then you might see unwanted high resource usage.

The case of TAGS in Nautilus

Tracker supports tags, but Nautilus developers have decided (since v3.26) not to support them as before and to use a unique tag: “favorites “. It is therefore through the Tracker tag system that you can bookmark files and folders in Nautilus. If you want to use custom tags, you will have to turn to another file manager or Nautilus hacks.

Tracker via the graphical interface

Through the GUI you will only have access to one setting (the most important one), that of the directories to be included in the Tracker index. To do this, go to the GNOME settings, into the Search category and then at the top you will find Search Location.

reglage indexation 1

reglage indexation 2

The tabs are just predefined locations that you can index or not:

Finally, it is not very useful but you should know that the locations are also accessible by the variable manager dconf-editor :

reglage dconf

Tracker in command line

With your terminal you will have many more options. I put here some useful commands to make your life easier!

If you want to reset the index, it will automatically rebuild itself after a few seconds. You can then follow the activity with tracker3 daemon -w :

Indexation init

In my case, my index is composed of 18 740 files and 1844 folders whose indexing (we are talking about content + metadata) takes about 2 minutes (i7-1185@3.0GHz + 16GB RAM + SSD NVMe) without any slowdown on the rest of the system.

Indeed, written in C, tracker3 is very powerful and well thought, tracker3 processes run with a very low priority : nice+19. The RAM usage did not exceed 15MB (out of 16GB) during the reindexing of the 18,000 files and is around 1 to 2MB on a normal activity (excluding the complete reindexing of the system).

Porcessus tracker3

Performance issue

You should not have any performance problems with Tracker version 3, however if you do, please consider :

To help you check processes, tracker3 has several processes, which makes it resilient and prevents the daemon from crashing if a process crashes.

Main processes of tracker3 :

Security and data

As you can see from my article, tracker3 contains critical and confidential information since it reads and indexes not only the metadata but also the contents of your documents and files. That’s why it is recommended to encrypt the entire content of your PC and not just a directory. Think that it is also possible to index a directory that is available on the network… . Once again, the encryption of your personal or professional PCs is always essential.

If some data is really too critical, think about just taking it out of the indexed directory and reinitalising your index 👍

Disable Tracker

It is always possible to remove tracker3, but this is strongly discouraged by the GNOME documentation because tracker3 is a central dependency in GNOME so you will certainly have side effects.

Instead, you should de-index directories or even disable searching in Files in the GNOME settings in the Search section.

Follow me

Subscribe to my RSS feed !