Bug 418323

Summary: Baloo indexer is swallowing cpu usage and slow down other apps
Product: [Frameworks and Libraries] frameworks-baloo Reporter: medin <med.medin.2014>
Component: Baloo File DaemonAssignee: Stefan Brüns <stefan.bruens>
Status: RESOLVED FIXED    
Severity: major CC: bugseforuns, linux, mattioli.fernando, nate, p2, pavol158, tagwerk19
Priority: NOR    
Version: 5.67.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Baloo high cpu usage

Description medin 2020-02-29 13:08:52 UTC
I have baloo activated to index my files in different locations on my hdd, but after any noticeable changes in the hierarchy of files/folders then after rebooting baloo indexer starts to index and consumes half of cpu use which slow down other apps like firefox and dolphin and writer. Normally an indexer should run in the background without any high priority to finish indexing all modified folders which means cpu usage for baloo should be limited to avoid slowing down the current important apps that are running at the same time.

Operating System: Kubuntu 19.10
KDE Plasma Version: 5.18.2
KDE Frameworks Version: 5.67.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-42-generic
OS Type: 64-bit
Processors: 2 × Pentium® Dual-Core CPU T4400 @ 2.20GHz
Memory: 5.6 GiB of RAM
Comment 1 medin 2020-02-29 13:10:13 UTC
Created attachment 126494 [details]
Baloo high cpu usage
Comment 2 Nate Graham 2020-06-19 18:12:56 UTC
*** Bug 423188 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2020-08-10 14:12:27 UTC
*** Bug 425160 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2020-10-26 16:36:58 UTC
*** Bug 406486 has been marked as a duplicate of this bug. ***
Comment 5 tagwerk19 2021-07-23 19:24:56 UTC
(In reply to medin from comment #0)
> ... after any noticeable changes in the hierarchy of files/folders
> KDE Frameworks Version: 5.67.0 ...
Yes.

After renaming a folder tree, baloo was busy and dolphin noticeably slow. I found it sometimes necessary to log out and back in again. I think this behaviour is now "well fixed".

Have a look at Bug 431664. This was written at the time of 5.78.0, referring to a fix done in 5.68.0.

You'd need to "balooctl purge" the index and let baloo reindex from scratch.

You don't say how many files you're indexing. With a lot of files and a dual core machine you'd notice the impact while the index was being rebuilt.
Comment 6 tagwerk19 2024-07-01 14:00:55 UTC
(In reply to tagwerk19 from comment #5)
> ... You don't say how many files you're indexing. With a lot of files and a dual
> core machine you'd notice the impact while the index was being rebuilt ...
There's been a patch here that applies limits on Baloo's RAM and CPU usage
    https://invent.kde.org/frameworks/baloo/-/merge_requests/121
Baloo was being run at the lowest priority, this change reinforces that.