Baloo/Debugging

From KDE Community Wiki

Baloo is responsible for searching through files. Given that every system is quite different, and many different files can have different results, there can be some issues with Baloo. This page aims at helping you debug what exactly is going on and how to report the issue appropriately.

If you're in doubt, and not sure what is going on, please just file a bug and provide whatever information you feel may be appropriate. The developers will ask for more information and provide steps for you to follow.

Baloo is consuming too much CPU / RAM / Disk IO ?

The Baloo Project is responsible for many different parts of KDE. The developers need to know exactly which component is problematic. It would be best if you checked what the offending process is called.

baloo_file

This process is responsible for scheduling the indexing of files and save the name of the file. If this process is consuming too much CPU or Disk IO, it's probably cause of the initial indexing. Based on your hard drive speed, baloo_file is able to do somewhere between 100 to 1000 files per second. Depending on how many files you have, it could take a couple of minutes. It would be best to just wait for a couple of minutes.

If you feel that you have been waiting for quite some time, and the baloo_file process is still consuming too much CPU or disk IO, please file a bug.

baloo_file_extractor

This process is responsible for looking into the contents of the file, and indexing it. It can cause a reasonable amount of disk and cpu io depending on the type of files you have. This extractor process is generally commanded to index files in batches of 40.

You will commonly see it running as follows - baloo_file_extractor 2343 2344 2345. These numbers indicate the files that it is currently processing. If you feel that the extractor is consuming too much cpu / ram / disk usage, it is probably because one of these files.

Each file is represented by a unique number. This number can be resolved into the corresponding URL by running the balooshow command on them. Eg - balooshow 2243.

When reporting a bug regarding the extractor, it is important that offending file be tracked down. This can be done as follows.

  1. Run ps aux | grep baloo_file_extractor and note down the numbers at the end of the process.
  2. Kill Baloo via killall baloo_file && killall baloo_file_extractor
  3. Launch baloo_file_extractor on any one of those numbers.
  4. Check if baloo_file_extractor is still causing problems
    1. If it is not, goto (3), and try again with another file number
    2. If it is causing problems, then file a NEW bug on bugzilla and upload the offending file.

baloo_file_cleaner

The cleaner process is responsible for cleaning out invalid files from the index. This process is only called when the system configuration for Baloo is modified. If you feel that this process is consuming too much CPU or disk IO, please report a bug immediately.

On disabling Baloo, the baloo_file_cleaner would take some time in cleaning the database in 4.13.0. This has been fixed with 4.13.1, it now just directly deletes the database files.

akonadi_baloo_indexer

The Akonadi part of Baloo is completely separate from the file parts. If you feel that this process is consuming too much CPU usage, it may just be the initial indexing. Based on our tests, it can easily index 100000 emails in under 10 minutes. If after 10 minutes, the system is still choking up, please report a bug.