How to Fix High RAM and CPU Usage by Baloo in KDE Plasma
· 3 min czytania · Tutorials
If you are using KDE Plasma (such as on Manjaro Linux) and noticed your system suddenly slowing down, a process named baloo_file or baloo_file_extractor might be the culprit. It is not uncommon to see these processes consume over 10GB–20GB of RAM and a significant portion of CPU resources.
This guide will explain what Baloo is, why it causes issues, and how to safely disable or reset it.
What is Baloo?
Baloo is the built-in file indexing and search framework for the KDE Plasma desktop environment. Its primary job is to scan your files in the background so that you can search for documents, images, and texts instantly using KRunner, Application Launcher, or the Dolphin file manager.
Why does it consume so much memory?
While useful, Baloo can get stuck in an infinite loop or experience a memory leak when it encounters:
- Corrupted or malformed files.
- Extremely large archives (e.g.,
.zip,.tar.gz,.iso). - Deep, rapidly changing build directories (e.g.,
node_modules,.git, virtual environments).
When this happens, the indexer fails to progress and endlessly attempts to read the problematic files, consuming all available system resources.
Method 1: Disabling Baloo Completely (Recommended)
If you rarely search for files by their text content and want to reclaim your system’s performance permanently, the best solution is to completely turn off Baloo.
Step 1: Disable the Service
Open your terminal and run the following command (for modern KDE Plasma 6 systems using KF6 libraries):
# Disable the file indexer service
balooctl6 disable
Note: If your system uses an older version of KDE, omit the 6 and run balooctl disable instead.
# Force kill any stuck indexer processes
killall -9 baloo_file baloo_file_extractor
Method 2: Resetting a Corrupted Database
If you still want to use KDE’s search functionality but need to fix the current high memory usage, you can wipe out the corrupted database and start fresh. Step 1: Stop and Purge
Attempt to stop the service and clear the old index automatically:
# Stop the service and remove the database
balooctl6 disable
balooctl6 purge
Step 2: Manual Cleanup (If purge fails)
If balooctl6 purge hangs indefinitely (showing a series of dots …. failed to stop!), you must delete the database manually:
# Force kill the active processes first
killall -9 baloo_file baloo_file_extractor
# Manually delete the corrupted index database files
rm -rf ~/.local/share/baloo/*
Step 3: Re-enable Baloo
Once the old files are deleted, restart the indexer:
# Re-enable the service to build a clean index
balooctl6 enable
Method 3: Configuring Exclusions (Alternative)
To keep Baloo enabled without sacrificing performance, you can restrict what it indexes through the Graphical User Interface (GUI):
- Open System Settings.
- Navigate to Search -> File Search.
- Under the Folder Specific Configurations, add directories you want to exclude (e.g., your development workspace, download folders, or backup drives).
- Uncheck Index file content if you only want to search by filenames. This reduces resource consumption significantly.