2022-01-07
- run htop
- "baloorunner" is the file searcher (correspond to the checkbox "Enable File Search" from GUI - type indexer from krunner to find it inside the System Settings GUI)
- must be enabled in order to be able to search (files) from the Krunner bar
- "baloo_file" is the File Indexer
- must uncheck the box "Also index file content" from GUI
- best would be to keep the indexer disabled and only run it manually, once in a while
- if not, each indexed file is also monitored for changes by the kernel
- this monitoring also reserves memory for each file (i.e. 13 GB! usage of RAM for 2_300_000 files indexed/watched)
- another issue is that there is a predefined "kern.maxvnodes"
- the parameter can be read with "sysctl kern.maxvnodes"
- !!! once the number of files watched exceed this limit,
!!! the OS increases it automatically, but only once per second or so.
!!! As a result, the whole OS/kernel will become unusable slow, even the non GUI terminal!!!
- to display the current number of used vnodes, "sysctl vfs.numvnodes"
- to increase the max vnodes number (until the next restart?), "sudo sysctl kern.maxvnodes=3000000"
- ??? untested (not sure if that's the right place): permanent increase from /etc/sysctl.conf ???
- read also file:///home/aaaa/_FreeBSD/baloo/2022-01-07 - 11.11. Tuning Kernel Limits - people.freebsd.org.html
- made mine 3 millions because after a finished file indexing of wd8TB (without indexing file content) the vfs.numnodes was more than 2.3 millions and it that was using more than 13 GB of RAM
- once the indexing is finished, the indexer can be stooped only to re-index manually when necessary, then reboot to regain those 13GB of occupied memory
- for more info read
file:///home/aaaa/_FreeBSD/baloo/2022-01-07 - 230726 – sysutils_kf5-baloo_ freezes the system - bugs.freebsd.org.html
file:///home/aaaa/_FreeBSD/baloo/2022-01-07 - Chapter 12. Configuration and Tuning _ FreeBSD Documentation Portal - docs.freebsd.org.html
- more bloatware to remove suggested: Akonadi, nepomuk, strigi, baloo ... bloatware
- file:///home/aaaa/_FreeBSD/baloo/2022-01-07 - Problems with baloo _ The FreeBSD Forums - forums.freebsd.org.html
- suggested baloo alternative: recoll
- https://www.freshports.org/deskutils/recoll/
- https://forums.freebsd.org/threads/baloo_file_extractor-crashes-every-time-how-can-i-disable-it.83103/
- file:///home/aaaa/_FreeBSD/baloo/2022-01-07 - baloo_file_extractor crashes every time _ how can I disable it _ _ The FreeBSD Forums - forums.freebsd.org.html
- just FYI, baloo FreeBSD port page
- https://www.freshports.org/sysutils/kf5-baloo/
- file:///home/aaaa/_FreeBSD/baloo/2022-01-07 - FreshPorts -- sysutils_kf5-baloo_ KF5 Framework for searching and managing user metadata - www.freshports.org.html
aaaa@bsd:~/.local/share/baloo % ls -l
total 90113
-rw-r--r-- 1 aaaa aaaa 206729216 Jan 7 19:07 index
-rw-r--r-- 1 aaaa aaaa 8192 Jan 7 19:03 index-lock
aaaa@bsd:~/.local/share/baloo % balooctl status
Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 470,991 <--- ?????
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 197.15 MiB
aaaa@bsd:~/.local/share/baloo %
GUI properties for wd8TB
Size: 5.7 TiB (6,250,088,856,816)
2,184,724 files, 237,952 sub-folders
- "balooctl disable" will stop "baloo_file" (the file indexer), but KDE will restart it after a reboot (see also file:///home/aaaa/wd8TB/2019/Z/_hobby/_Linux/baloo/autostart disabled crunching disks.txt )
- How to stop indexing to start by itself after a reboot (after a reboot, the indexer will not remember its current state, it will start as dictated by the /usr/local/etc/xdg/autostart/baloo_file.desktop):
sudo nano /usr/local/etc/xdg/autostart/baloo_file.desktop
# find the lines
# X-KDE-autostart-condition=baloofilerc:Basic Settings:Indexing-Enabled:true
# X-GNOME-Autostart-enabled=true
# change them to false, save and reboot
X-KDE-autostart-condition=baloofilerc:Basic Settings:Indexing-Enabled:false
X-GNOME-Autostart-enabled=true
- to manually run the indexer
sysctl vfs.numvnodes
sudo sysctl kern.maxvnodes=3000000
sysctl kern.maxvnodes
sysctl vfs.numvnodes
ls -lh /home/aaaa/.local/share/baloo/
ls -l /home/aaaa/.local/share/baloo/
balooctl status
balooctl check
# wait to finish
balooctl status
balooctl disable
sudo reboot
aaaa@bsd:~ % sysctl vfs.numvnodes
vfs.numvnodes: 2362490
aaaa@bsd:~ % ls -l /home/aaaa/.local/share/baloo/
total 384313
-rw-r--r-- 1 aaaa aaaa 887222272 Jan 7 23:44 index
-rw-r--r-- 1 aaaa aaaa 8192 Jan 7 23:26 index-lock
aaaa@bsd:~ % ls -lh /home/aaaa/.local/share/baloo/
total 384313
-rw-r--r-- 1 aaaa aaaa 846M Jan 7 23:44 index
-rw-r--r-- 1 aaaa aaaa 8.0K Jan 7 23:26 index-lock
aaaa@bsd:~ % balooctl status
Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 2,196,263
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 846.12 MiB
aaaa@bsd:~ % balooctl disable
Disabling and stopping the File Indexer
aaaa@bsd:~ % balooctl status
Baloo is currently disabled. To enable, please run balooctl enable
aaaa@bsd:~ % sysctl vfs.numvnodes
vfs.numvnodes: 2362488
aaaa@bsd:~ % ls -l /home/aaaa/.local/share/baloo/
total 384313
-rw-r--r-- 1 aaaa aaaa 887222272 Jan 7 23:44 index
-rw-r--r-- 1 aaaa aaaa 8192 Jan 7 23:47 index-lock
aaaa@bsd:~ % ls -lh /home/aaaa/.local/share/baloo/
total 384313
-rw-r--r-- 1 aaaa aaaa 846M Jan 7 23:44 index
-rw-r--r-- 1 aaaa aaaa 8.0K Jan 7 23:47 index-lock
aaaa@bsd:~ %