KDE and Gnome are the two of the best desktop environments available for the Linux distros. You may have read many good things about KDE and Gnome. KDE is known for its low RAM usage and Gnome is known for its powerful user interface. Once you install a Linux distro and run the system monitor software or any other application that shows the CPU/RAM status, list of processes, etc, you’ll learn that Gnome uses 1+ GB RAM by default. The system memory used by KDE can vary between 600 MB to 1+ GB.
How to reduce GNOME or KDE memory usage?
The RAM usage of KDE, Gnome or any other Linux desktop environment depends on the processes that are using the memory. Unless you use Arch Linux or a similar distro that requires users to install only those packages they require, the Linux distros and their spins may come installed with many services/applications. The applications/services may run in the background wasting the precious system memory. Should you switch to XFCE, LXQT, or LXDE? No, to reduce Linux memory usage, you don’t have to switch to a so-called lightweight Linux desktop environment. If you do so, you’re doing injustice to the underlying hardware. What is the solution? Following are the two ways to reduce the memory usage of KDE, Gnome, or any other Linux desktop environment:
Services are processes that run in the background. To reduce Linux memory usage, you must identify or find the services you don’t require and disable them. For example, I have disabled the following services on Fedora 34:
packagekit: The packagekit service can consume 20 to 200 megabytes of system memory. This service runs in the background and makes KDE show notifications when a newer version of a KDE package, Linux kernel, etc you’ve installed is available. When you can update the OS or packages with commands such as DNF check-update, pacman -Syu, apt-get update, etc, why use GUI to update the software or OS?
kwallet: Kwallet is yet another RAM wasting service of KDE. If you don’t disable KWallet, KDE will display a popup prompting you to enter a password when you open a browser such as Chrome, log in to your Linux account, etc. You can disable the wallet subsystem from the KDE settings application.
samba: The Samba service is yet another process that wastes RAM. You should remove it or disable it if you don’t use the Samba service.
Gnome software is similar to the Windows App Store. It lets you find and install software available for your Linux distro. If you run Gnome software on your PC and close the application, it will run in the background wasting RAM. You should remove the Gnome software if you want to free up some RAM.
Gnome also ships with the Evolution Data Server that runs eats RAM. Although some distros will display a warning message that the Gnome Shell requires the Evolution Data Server package, you can remove it if you don’t use Gnome’s calendar or address book feature.
How to disable a Linux service?
To disable the process, run these two commands –
systemctl disable the_service_name.service and
systemctl stop the_service_name.service commands. Replace the_service_name with the service you want to disable and reduce the Linux memory. What will the two commands do? Well, the 1st command will prevent the OS from running the disabled service automatically when the system starts. The 2nd command will stop the service immediately and the OS will free the memory it was using.
Remove packages you won’t use
If you don’t use the software, remove it. KDE and GNOME ship with several utility applications and services you may never use. For example, KDE comes with the Kmail email client. Gnome ships with the Evolution mail client. Gnome ships with the Calendar, Maps, Calculator, etc apps. Some of the apps are responsible for the background running process. For example, Gnome’s Eevolution Data Service can waste a huge amount of system memory. It is created by the Evolution email client. To free up storage memory used by wanted applications, you must find and remove software you don’t use.
So these were the two methods you can follow to reduce memory usage in Linux. Do let’s know the amount of storage and RAM you were able to free by disabling services and removing applications.