System memory vs. GPU memory

I read more than one time about memory consumption of the different Linux desktop environments. I used to use XFCE4 (not installed anymore) but switched to a more advanced desktop and tried more than one of them. While system memory is not a problem, the graphics card memory may be a bottleneck. This is more important when using tools like darktable that uses the gpu to render images instead of the main CPU.

It is clear, that these numbers may differ from system to system. There are many factors influencing the amount of memory used by the desktop environments. But it gives you a little hint, how it looks like today with the most of the setting set to their default value.

Here are some linex from inxi -F of my system. What you do not see here is that my GTX 960 has only 2GB of memory. What is enough for my older games may not be sufficient when it comes to render my 30 megapixel RAW file with many darktable modules. Now having such applications let me think about the desktop and how much gpu memory it uses. The following parts will give you some impressions.

System:    Host: risa Kernel: 4.15.14-1-ARCH x86_64 bits: 64 Desktop: Cinnamon 3.6.7
           Distro: Arch Linux
Machine:   Type: Desktop Mobo: ASUSTeK model: P8Z68-V LE v: Rev X.0x serial: N/A
           BIOS: American Megatrends v: 4102 date: 09/09/2013
CPU:       Topology: Quad Core model: Intel Core i7-2600K type: MT MCP L2 cache: 8192 KB
           Speed: 3612 MHz min/max: 1600/3800 MHz Core speeds (MHz): 1: 3628 2: 3662 3: 3649 4: 3674
           5: 3628 6: 3677 7: 3595 8: 3647 
Graphics:  Card-1: NVIDIA GM206 [GeForce GTX 960] driver: nvidia v: 390.48
           Display Server: x11 (X.Org 1.19.6) driver: nvidia
           resolution: 1920x1080~60Hz, 2560x1440~60Hz
           OpenGL: renderer: GeForce GTX 960/PCIe/SSE2 v: 4.6.0 NVIDIA 390.48

The desktops

KDE Plasma

This is the most feature rich desktop I know and has also a big footprint within the graphics card’s memory. It uses 500+ MB of this memory that sums up to nearly 1GB with X11 and kwin process. I did not expierience any flaws or issues beside the high memory usage that forces darktable to work on the CPU instead of the GPU.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48                 Driver Version: 390.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960     On   | 00000000:01:00.0  On |                  N/A |
|  0%   60C    P2    31W / 130W |   1059MiB /  2001MiB |      6%      Default |
+-------------------------------+----------------------+----------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       768      G   /usr/lib/xorg-server/Xorg                    324MiB |
|    0      1066      G   /usr/bin/kwin_x11                            102MiB |
|    0      1074      G   /usr/bin/krunner                               9MiB |
|    0      1076      G   /usr/bin/plasmashell                         511MiB |
|    0      1139      G   /usr/bin/seafile-applet                        2MiB |
|    0      5084      C   darktable                                     42MiB |
+-----------------------------------------------------------------------------+

Gnome

Gnome is the other well known desktop environment. It has a complete different UI approach as KDE.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48                 Driver Version: 390.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960     On   | 00000000:01:00.0  On |                  N/A |
|  0%   55C    P2    28W / 130W |    976MiB /  2001MiB |      6%      Default |
+-------------------------------+----------------------+----------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      3940      G   /usr/lib/xorg-server/Xorg                    396MiB |
|    0      4026      G   /usr/bin/gnome-shell                         254MiB |
|    0      4800      G   seafile-applet                                 2MiB |
|    0      5308      G   ...-token=2948D1A99772B627720112A79AC220B3   162MiB |
|    0      6131      G   gnome-control-center                          49MiB |
|    0      6285      C   /usr/bin/darktable                            42MiB |
+-----------------------------------------------------------------------------+

Cinnamon

Cinnamon is also feature rich but does not use as much memory as KDE Plasma. Cinnamon has some flaws with updating applets (e.g. cpu temp, gpu temp, etc.) within a panel. This causes some memory leaks and the process grows to more than 3GB if not restarted from time to time.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48                 Driver Version: 390.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960     On   | 00000000:01:00.0  On |                  N/A |
|  0%   58C    P0    37W / 130W |    738MiB /  2001MiB |     12%      Default |
+-------------------------------+----------------------+----------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      3316      G   /usr/lib/xorg-server/Xorg                    426MiB |
|    0      3549      G   cinnamon                                     101MiB |
|    0      4699      G   /usr/bin/vlc                                  43MiB |
|    0      4824      G   ...-token=A528FBC71B20AB954AF95C26209783EE    97MiB |
+-----------------------------------------------------------------------------+

Budgie desktop

The Budgie desktop is part of the Solus Project . I have it installed this as another alternative and because it looks like a modern replacement of xfce with low resource usage. It is still under development and has far less features than the other ones but it is small, fast and looks nice. So here is the memory usage of Budgie.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48                 Driver Version: 390.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960     On   | 00000000:01:00.0  On |                  N/A |
|  0%   56C    P0    36W / 130W |    513MiB /  2001MiB |      5%      Default |
+-------------------------------+----------------------+----------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       760      G   /usr/lib/xorg-server/Xorg                    352MiB |
|    0      1121      G   budgie-wm                                     24MiB |
|    0      2069      G   ...-token=C2DC4B4365C0FDBBFF5B3CF5F9D95428    80MiB |
|    0      2721      G   seafile-applet                                 2MiB |
+-----------------------------------------------------------------------------+

Conclusion

Personally I like KDE Plasma a lot (five years ago, I wouldn’t have said that… :-D ). It has a nice looking UI and everything looks smooth and integrated. So I would like to use Plasma as my preferred desktop. For normal office usage, this would work quite well. The problem gets visible if I develop 30 Megapixel RAW files with darktable. The graphics memory used by darktable reaches sometimes about 1 GB of memory. So I have to use something with a lower footprint or change the graphics card. Currently I prefer a lower memory footprint :-D

So for the moment I stay with Cinnamon as it provides the most features and has a relatively low memory footprint.