/home full, baloo index 30GB, how to avoid this huge file?

Hi, on my laptop running leap 15.6 and KDE appeared a warning that /home was out of memory, investigating I found that /home/pla/.local/share/baloo/index.txt was 30GB :open_mouth:
I googled and deleted it with:

balooctl disable
balooctl purge

but I need to reboot to free the space on /home
is there a way to delete that index and have free space without rebooting?
and, above all, is there a way to avoid this huge index file?

  1. This file may have been kept open by some process. Find and kill this process.
  2. Depending on the filesystem in use reclaiming this amount of space may not be instantaneous. Dit you check if free space was increasing (even if slowly)?

Does just logout - login of the user that has this not work?

Indeed, logout, then remove ~/.local/share/baloo and login again. Baloo will reindex, give that some time.

So, the big question is, “do you absolutely need Baloo indexing?”.

We immediately disable it after a new installation. Why? It offers zero advantage for us.

Baloo is horrendously known for its overzealous CPU usage, plus excessive filesystem space usage (as you’re now aware of).

In the not too distant past, there were countless posts out here about “what’s using all my CPU” or what’s stealing all my disk space. Guess what, it’s due to inefficient coding of Baloo, resulting in horrible performance. That’s why we ditched it.

And it’s not just in this forum. Google, “baloo problems” , which will result in countless hits from many other forums, Reddit, KDE, and nauseum.

For fun, I googled “Baloo problems” to see what my browser’s AI engine would reply (looks like AI agrees with me :slight_smile: )

"Baloo, KDE’s file indexing and search framework, has been known to cause issues like resource consumption, slow performance, and even system freezes, but can be addressed by disabling it, excluding specific directories, or purging the index.

Common Issues:
Resource Consumption:
Baloo can consume a significant amount of CPU, RAM, and disk I/O, especially during indexing, potentially slowing down your system.
… etc
.
Potential Solutions:
Disable Baloo:
If you don’t rely on file indexing, you can disable Baloo entirely using balooctl disable.
… etc

1 Like

That is a “solution” in the sense that it answers the question from the topic. Done this in the past. The culprit at the time was that I was creating/pulling loads of files and folders that were not excluded in ~/.config/baloofilerc.
That said, the answer to many questions could be “Don’t use it”. With my current baloo settings the index folder is 759 MB, it has this

knurpht@Lenovo-P16:~/.config> more baloofilerc 
[General]
dbVersion=2
exclude filters=*.fastq,*.gcode,*.sql.gz,*.pyc,.yarn,*.a,node_packages,*.qrc,*.orig,*.po,ui_*.h,*.faa,*.tmp,*.jsc,*.class,*.so,CMak
eCache.txt,CVS,Makefile.am,*.vbox*,cmake_install.cmake,*.qcow2,.svn,confstat,*.fna,*.img,qrc_*.cpp,.git,.xsession-errors*,lost+foun
d,*.swap,libtool,.histfile.*,*.vhdx,CMakeFiles,nbproject,config.status,*.aux,lzo,moc_*.cpp,*.fq,.uic,.moc,CMakeTmp,*.gbff,autom4te,
confdefs.h,.hg,_darcs,*.gb,*~,*.elc,.obj,*.db,*.pc,*.rej,*.vhd,*.loT,*.o,CTestTestfile.cmake,*.ini,*.vdi,*.map,*.omf,.pch,*.qmlc,*.
fasta,*.la,*.sql,*.nvram,.yarn-cache,.npm,*.csproj,node_modules,CMakeTmpQmake,*.m4,*.rcore,core-dumps,vbox.log,*.vm*,*.part,*.vmdk,
*.gmo,*.moc,*.init,__pycache__,.bzr,*.pyo,po,*.lo,litmain.sh,conftest
exclude filters version=5
exclude folders[$e]=$HOME/.local/,$HOME/.mozilla/firefox/e413p953.default/,/var/lib/mysql/
first run=false
folders[$e]=$HOME/
only basic indexing=false
knurpht@Lenovo-P16:~/.config> 
2 Likes

I checked the space looking in dolphin free space bar and neither slowly it was changing in a 5minutes time

I don’t know if I absolutely need baloo indexing, I need sometimes to search files and its content, so I think I can try without baloon to see if it is ok for me

manythanks, I also will try to use your config /baloofilerc an to see if it is ok for me too

Reports on baloo eating cpu time are greatly exaggerated. Checked user-1000 at Infamous Host Erlangen:

karl@erlangen:~> systemd-cgtop --depth 3 --cpu=time user.slice/user-1000.slice/|head -12
user.slice/user-1000.slice/                                                                                                         1046 1h 22min 30.907493s        -        -        -
user.slice/user-1000.slice/user@1000.service                                                                                        1037 1h 22min 29.488049s        -        -        -
user.slice/user-1000.slice/user@1000.service/app.slice                                                                               834 1h 14min 25.254226s        -        -        -
user.slice/user-1000.slice/user@1000.service/app.slice/app-firefox@2aceb4f497ae4727b2c4a3e44d9d33bb.service                          494    32min 14.058871s        -        -        -
user.slice/user-1000.slice/user@1000.service/session.slice                                                                           151     7min 43.239677s        -        -        -
user.slice/user-1000.slice/user@1000.service/session.slice/plasma-kwin_x11.service                                                    18     4min 45.182882s        -        -        -
user.slice/user-1000.slice/user@1000.service/app.slice/app-\x2fusr\x2fbin\x2fkalendarac@cbdf654b80b2481c90a40ac31297cc4e.service     233     3min 13.980411s        -        -        -
user.slice/user-1000.slice/user@1000.service/session.slice/plasma-plasmashell.service                                                 45     2min 38.367275s        -        -        -
user.slice/user-1000.slice/user@1000.service/app.slice/app-org.kde.kmail2@d41cd458cf9347ab811543f01ffa7a84.service                    82          48.525354s        -        -        -
user.slice/user-1000.slice/user@1000.service/app.slice/app-org.kde.konsole-8489.scope                                                 14          38.247810s        -        -        -
user.slice/user-1000.slice/user@1000.service/background.slice                                                                         50          20.517389s        -        -        -
user.slice/user-1000.slice/user@1000.service/background.slice/kde-baloo.service                                                        3           9.799834s        -        -        -
karl@erlangen:~>

The 9 seconds of kde-baloo.service compare favorably to the user’s total time of 1h 22min 30s. Re-indexing of user’s home (722,535 file names) added another 5 seconds.

Yea, I understand the needs of others. And although it seems my post was a diligent opinion to guide folks away from Baloo, some will require it. It’s a shame it continues to present issues.

2 Likes