Limit baloo usage

Baloo have very huge cpu and ram usage, and have impact to PC performance. Also it is abnormal when file indexer have so huge requirements. It’s can be good if limit them usage to sth normal

Usage should drop when it’s no longer indexing, no?

1 Like

you can pause the indexing operation in the file search setting page.

it normally only runs when there is new content on the folders you have added to the configuration, but if it’s running and interfering with other work, you can just pause it and let it complete when you are not using the PC as much.

also note it will run longer if you have it set to also index the file contents.

command line options

I’ve seen people have issues with Baloo before, so your comment isn’t wrong - but it isn’t normal.

I’m sure I remember also that when it is abnormal, it is usually an issue with the way it was set up… and I personally had a problem with Baloo about 6 years ago after I messed with my settings for file search and included hidden stuff.

  • turns out it was trying to index some .cache folders, and I had Plex installed which meant that when I looked, it had indexed some 3 million files.

I think the main issues with Baloo come from something to do with $USER settings.

You can go to your settings - leave it Enabled…

Try setting ‘Data to index’ to ‘File Names only’ and UNCHECK ‘Hidden files and folders’.

Then in Locatoins - delete them all, just leave your /home/user117 folder.

I actually added 5 folders across 3 HDDs mounted and never notice baloo action.

After checking those settings, you can stop baloo using balooctl6 command.

Baloo File Indexer is running
Indexer state: Indexing modified files
Total files indexed: 17,209
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 541.98 MiB
❯ balooctl6 indexSize
File Size: 541.98 MiB
Used:      235.71 MiB

           PostingDB:      71.49 MiB    30.329 %
          PositionDB:     132.93 MiB    56.397 %
            DocTerms:      24.05 MiB    10.205 %
    DocFilenameTerms:       1.71 MiB     0.728 %
       DocXattrTerms:            0 B     0.000 %
              IdTree:     392.00 KiB     0.162 %
          IdFileName:       1.83 MiB     0.777 %
             DocTime:     788.00 KiB     0.326 %
             DocData:       1.93 MiB     0.820 %
   ContentIndexingDB:            0 B     0.000 %
         FailedIdsDB:            0 B     0.000 %
             MTimeDB:     616.00 KiB     0.255 %

Try also in your terminal;

balooctl6 help
1 Like

It’s worth noting that:

  • if you continuously get excessive CPU/RAM usage, it’s a bug, please report it
  • we have a page for Baloo Debugging
  • in the last couple of years we’ve had several optimizations on top of baloo, like adjusting its niceness or forcing its cgroup to have a max resource usage

The expected behavior is:

  • for normal indexing, you get at max of a couple minutes of high CPU usage (in case of dozens of thousands of files, more or less)
    • if you have less than a few thousands of files, it will probably be almost instant
    • if you experience a lot of CPU usage during normal indexing, that’s normal, but if you experience normal indexing taking too long for the amount of files you have, please report it
    • this is all you need for music metadata to be found for Elisa or for the tags functionality to work in Dolphin, you don’t need content indexing
  • for file content indexing, you get a longer period of indexing that should have negligible CPU usage
    • if baloo finds some file it cannot properly index, it might chug, in which case please report it
    • if you experience too much CPU usage during file content indexing, please report it
    • this will be significantly bottlenecked if you use an HDD, it’s a legitimate reason to disable it

See the general comparison in the Baloo Debugging page:

For a general comparison, on a machine with an SSD and 1559 files to be indexed, immediately after a purge, 4 seconds are required to index all files (going from 0 to 1559 instantly) and 35 seconds are required to index the content of all files. These values might be different for you depending on your machine’s specs, the number of total files, and their format.

1 Like

IMO if someone has an “impact to PC performance”, suggesting they file a bug implies they have to put up with it in the meantime.

IMO with baloo misbehaving the first thing to do is to disable, purge, and enable. That may clear up the problem, for a while, at least.

1 Like

I agree with your initial statement - however, after I checked my settings and removed the heavy hitters (for me, it was hidden and cache folders - I forked up by thinking it could index the entire home directory) - purged and re-indexed (which took maybe ten minutes) I have never noticed baloo - and that was maybe five or six years ago I think.

Meanwhile, if I start typing in krunner, I can locate files indexed on 3 hard drives (media folders) as well as my home directory’s user files.

Baloo rarely misbehaves - so really it would be a very fine thing if a real bug could be identified and looked at.

As it stands, I don’t think it’s likely - but there’s a problem that most folks who have these problems never report further.

@Herzenschein is right on the mark, and this entire discussion was sparked by a single noob user who gave no further information and has no interest in solving the issue at all.

So in the end, just forget this whole thread and move on - we don’t have an issue, all is well.

Mark it solved!