Main page...           Popular tags: Electronics (12), Linux (11), DIY (8), Hack (8), Other (6), Retrocomputing (6), Debian (5), Curiosities (4)


Memory usage of different desktops in Linux (UPDATE: 32-bit)

2017-08-02 14:02:11,  In: Linux, Debian

While installing Linux on older machines a very popular question is "What desktop environment should I use?". With older machines, usually the biggest bottleneck is not a CPU, but RAM. Too small memory causes swapping, and it slows Linux even more. On the other hand, more free RAM makes system run faster. I decided to install Debian 9 (Jessie) in different configurations to measure memory usage of different desktop environments. All measures have been made on stock installation offered by Debian installer, by installing on virtual machine.

   Linux and memory

There is a large difference between memory reported by "free" and "htop" programs. It is coming from the method of using memory in Linux. The main rule here is that unused memory is wasted memory, so Linux uses free memory for buffers and caches, making system faster. While "free" shows buffers and caches memory as used, htop doesn't, only shows buffers on memory usage bar in blue/green color, while number indicator shows amount of RAM actually used by programs.

   The machine

All experiments have been made on a virtual machine emulated with VirtualBox on 64-bit Core i7-3770 (3.6GHz) CPU and ordinary HDD. The virtual machine had the following specifications: - 2 cores - 2GB of RAM - 20GB of hard disk This is like most typical, older computers, yet a bit higher-end. The methodology was to measure: - Boot time: GRUB->desktop (minus time for giving login/password). - Opening file manager time - Memory usage when file manager and single terminal window are open. All measures have been made using latest Debian 9.1 set up from netinstall CD with default options to set up desktop environment.

   Results

The OS without GUI boted up in 12 seconds, utilizing 37MB of RAM. Results of desktops have been shown in chart below. In most cases, file manager window popped up instantly. The exception was quite significant (2-3 seconds) delay on GNOME and KDE, as well as some sub-second in Cinnamon. RAM usage is in MB, start-up time in seconds.


So, for a very limited PC the best solution would be LXDE, XFCE or MATE, as LXDE is quite mature desktop environment. Although KDE is known as "heavy", about 600MB of RAM used is quite large as for environment which doesn't even allow to align icons on desktop freely. Most desktop environments run file manager almost instantly. It may be caused by instance of manager running silently in background to improve responsiveness or to support some desktop functionalities. These measurements have been taken on 64-bit system which uses a bit more memory.
UPDATE
Here is a result for 32-bit CPU (without GUI it boots in 10s and eats 22MB of RAM):


We can see that there is indeed a general smaller memory usage in 32-bit OS, so if you have less than 2GB of RAM and 64-bit CPU don't go too much into 64-bit Linux. Although 64-bit CPU will give faster start-up time, the I/O being the main factor in system start-up will still choke the system a bit. Differences in start-up times are not so drastically big in 32-bit realm, except of course KDE which is known as heavy. Here, the fastest-booting environments are still MATE and LXDE, but in reverse order (with small, 1-second difference). If MATE would move entirely to GTK3 it may change. Surprisingly, XFCE has the most significant time difference between 32-bit and 64-bit versions, probably because its panel is doing some CPU-oriented job to set itself up while other DEs are reading it from disk. From my own experience, for older CPUs I use LXDE as its boot time decreases less drastically with slower CPU (while it's I/O-dependent).


Older post...       Main page       Newer post...