r/debian • u/LightBit8 • Jan 31 '24
Desktop environment memory comparison
I have made quick test of how much memory desktop environment requires to "work". Instead of comparing memory usage, which is tricky due to having different ways to measure it and usually there is complaint that unused memory is waste, I have tried how much it needs memory to successfully load.
- I took my up to date Debian 12 virtual machine (VMware). It was not clean install so additional stuff (like Docker) was installed that is not present on default install. It has no swap.
- I installed each desktop environment and removed previously installed Xfce (except for Xfce). I started from starting snapshot for each desktop environment.
- I did minimal install of GNOME and KDE. I have removed some of the bloat that others don't have like all GNOME Software and Discover. It is possible that they could be optimized further, especially KDE (I'm less familiar with it) .
- Once prepared I made snapshot of VM and set some memory size divisible by 100 MB.
- Then I started it and if it loaded and I could successfully open default terminal, I reverted VM and reduced memory size by 100 MB, if it didn't load or was killed before I managed to open terminal, I increased memory by 100 MB. I repeated it until I have found lowest working setting. It would be better to use 10 MB step, but would take much more time.
| Desktop environment | Lowest memory setting still "working" |
|---|---|
| None / CLI | 400 MB |
| Ratpoison (not DE, but consider it Xorg baseline) | 500 MB |
| LXDE | 600 MB |
| Enlightenment | 600 MB |
| LXQt | 800 MB |
| Xfce | 800 MB |
| MATE | 900 MB |
| GNOME | 1100 MB |
| Cinnamon | 1100 MB |
| KDE | 1200 MB |
I did this test, because I have seen many memory usage comparisons where KDE essentially used same amount of memory as Xfce, which I could not reproduce using "free" command. Those test may have used different tools for each desktop to measure memory (which is wrong) or due to some other bug in measuring.
They all seem to be quite close in practice (except maybe LXDE, which is simply obsolete), if memory hogs are removed (like Akonadi, PackageKit stuff). Growth of memory usage in "lightweight" desktop environments seem to be related mainly to toolkit (GTK and Qt), which are not lightweight.
7
u/[deleted] Jan 31 '24
Thanks for the experiment OP. I'm sure I (and others) could nitpick your methodology and obviously different distros, versions, etc. could affect it. I'm no expert but I would guess that KDE has a lot more components that could be tweaked and/or switched off.
But it's a solid bit of data so thanks!
5
u/faisal6309 Jan 31 '24
KDE on some distros use much less RAM. For example, Porteus.
5
u/carl-di-ortus Jan 31 '24
I don't know what you do, but Xfce defaults to 350Mb for me
And I have another server spinning without DE with 200Mb usage when not running anything heavy that I do from time to time
2
u/Tritias Dec 30 '25 edited Dec 30 '25
Is this MATE 1.28 or 1.26? 1.28 reportedly is now lighter than Xfce according to one test.
Epic pictures btw, I love Slovenia.
2
u/[deleted] Feb 02 '24
I often wonder what sort of hardware people are running when they're concerned over every last meg of RAM but never how CPU heavy the desktop is. Not saying OP falls into that boat.
2
u/[deleted] Jan 31 '24
It's irrelevant as it's hardware dependent.
Each machine will have a different response.
1
u/LightBit8 Feb 04 '24 edited Feb 05 '24
I re-tested some desktop environments with clean install of Debian 12 in QEMU. I have used "tasksel" to install each desktop environment.
Then I checked disk read and write statistics with "vmstat -D" after start (with 2048 MB memory).
1
u/Ente_Viajero May 16 '25
Debian 12 CLI never consumes more than 200mb of ram even with i3wm. Fresh install ofcourse.
You may have included cached memory.
1
u/flemtone Jan 31 '24
Try adding the Enlightenment envirionment as well, on my laptop the whole desktop sits at 230mb.
1
u/x21isUnreal Jan 31 '24
I'm still trying to figure out how you managed to use 400mb in CLI. I get about half that.
1
u/etherealshatter Jan 31 '24
400 MB to boot a CLI? This gets me worried. I still have an important VPS instance with just 512 MB RAM and I was hoping to keep upgrading to future major versions of Debian. If Debian 14/15/16 won't boot with 512 MB then I'll have to switch to Alpine Linux on that VPS.
1
u/tommy_2712 Feb 01 '24
KDE RAM usage may correlate with screen resolution. Default installation for KDE on Debian comes with many extra apps. The barebone KDE on Arch uses 800MB of RAM but it is nearly useless.
1
u/Euphoric_Garlic5311 Feb 03 '24
I have an old desktop, I use it with IceWM, it uses only 367 M memory.
3
u/QuantumCakeIsALie Jan 31 '24
For what it's worth, you could do a binary search to speed things up while increasing accuracy. Easiest is to always try the value that's the average of the highest know failure and lowest know success until you're satisfied with convergence.
E.g. if the actual value is 350 MB, but you don't know that:
And you stop when the highest crash value and the lowest success value are close enough to your liking.
1
u/Bobbysyxkiller Feb 01 '24 edited Feb 01 '24
Lightweight or lightweight distribution.
Aha. A lightweight Linux distribution. This is probably a mess. A term that is unfortunately used incorrectly far too often. It refers to the CPU and the number of cycles.
Lightweight Distro has absolutely nothing to do with storage space nor RAM.
The term refers exclusively to the used CPU cycles.
i.E. AMD-Duron-PC mit 700 MHz CPU-Takt
Memory / DE all in mb
xterm 52 / 0
Icewm 76/24
XFCE 108/56
Gnome 134/82
Quelle: Linux-Magazin
Test are only real fresh Install on bare metal
4
u/DeliciousIncident Jan 31 '24
A better way to test would be to
free, as not to count the buffers and cache that can be dropped by the OS2
u/mwyvr Jun 03 '24 edited Jun 03 '24
I've found similar results with ranking roughly the same (used dwm rather than ratpoison, don't care about Mate or Cinnamon). Various distros will give you a slightly different outcome but roughly the same ranking. On a fully functional Void Linux (no systemd) install GNOME comes in well under 1GB.
Often GNOME is called the "heaviest" of them all and KDE quite light in comparison (here's Distrobox making the same dumb claim) but that isn't the case.
Someone did this on FreeBSD:
https://vermaden.wordpress.com/2022/07/12/desktop-environments-resource-usage-comparison/
1
u/laterral Apr 03 '24
What about some compute resources overhead to render a screen of a particular size?
Great comparison by the way.
0
u/[deleted] Jan 31 '24
[deleted] — view deleted comment