Bug 475707 - `baloo_file` process taking up significant memory
Summary: `baloo_file` process taking up significant memory
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.103.0
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-16 17:03 UTC by drizzt321
Modified: 2024-07-28 03:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description drizzt321 2023-10-16 17:03:47 UTC
SUMMARY
My current `baloo_file` process is taking up a report 6.1GB of memory, and `balooctl status` is showing the size of the index is 8.8GB. The size of the process seems excessively large to me.

This is from a fresh install a month ago of Debian 12.1, updated last week to 12.2. I also had an issue with `baloo_file_extrator` taking up >20GB of memory, and spiking my SSD (Samsung 990 Pro) excessively, and causing issues because of that. After adding some directory excludes, disabling scanning contents of files (setting `contentIndexing` to `no`), doing a purge and restarting indexing from scratch, and then taking a while and still having large amounts of memory usage and SSD usage, it eventually completed it's initial indexing and has seemed to settle down.

But now I notice `baloo_file` process is taking up a relatively large amount of memory, which is obviously concerning. Despite having 96GB of memory, I run some large VMs for work, and sometimes every bit of memory is needed.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 12.2 (kernel 6.1.0-13-amd64)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Ryzen 5800X3D
Radeon 7900XT
Comment 1 tagwerk19 2023-10-26 07:40:21 UTC
(In reply to drizzt321 from comment #0)
> ... I notice `baloo_file` process is taking up a relatively large amount of memory...
See if you are having problems with changing minor device numbers - possible if you are running BTRFS. In that case, Baloo can see files "reappear" after a reboot with a different ID and reindex them.

You can check with "baloosearch -i one-of-your-files" and see if you get multiple results. The "-i" shows the internal DocID that baloo uses. If you get multiple results, then that might explain the larger index...

In general baloo pulls pages form its index into memory "as needed" and "for reading", when indexing a new file the changes to the index are bundled into a transaction and the database pages marked "dirty" ready to be written when the transaction is committed. If you are not writing, the pages can be dropped when anything else wants the memory.

There's been a relatively change to the memory limits (as set in the systemd unit file for kde-baloo) to cap the memory usage to 512M:
    https://invent.kde.org/frameworks/baloo/-/merge_requests/124
maybe this is hasn't reached Debian
Comment 2 tagwerk19 2024-06-28 07:13:25 UTC
(In reply to drizzt321 from comment #0)
> ... But now I notice `baloo_file` process is taking up a relatively large amount
> of memory, which is obviously concerning ...
Are you still seeing this?

If so check to see what "systemctl --user status kde-baloo" says...
Comment 3 Bug Janitor Service 2024-07-13 03:46:46 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2024-07-28 03:46:07 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!