Linux Mint LMDE 3 is loaded on my laptop, with terminal window open [photo: Henrik Hemrin]

How RAM memory hungry are Linux distros?

Introduction

My cheap laptop with Windows 10 preinstalled could not handle Windows 10 updates any more; Short life time for my cheap laptop. I swapped out Windows 10 and in came Linux Mint 19 Cinnamon, and I got my Cheap laptop reborn.

Main characteristics of this laptop: Lenovo IdeaPad 100s-14IBR. 1.60 GHz dual core CPU, 32 GB eMCC (SSD) and 2 GB RAM.

Only 2 GB RAM. That is how I became interested in how RAM hungry different Linux distributions are. For a machine with better characteristics, like 8 GB RAM or above, this is not really an issue to consider. In those cases, the focus will be the memory need for the applications themself. But with 2 GB RAM, it is very relevant to consider what the operating system needs by itself, so there is some space left for applications.

This cheap laptop is the first time for me to use Linux. I have been curious in Linux for many years, going back in time to when I was using Unix on a Sun machine at work for several years, when Linux recently was invented.

My irritation towards the store and the manufacturer for selling a laptop that so soon was not usable was turned to an opportunity to try out Linux and by that extend the life time considerable (ongoing)!

Linux is actually the central ”kernel”. The complete operating system when you use it e.g. on a laptop or desktop is more correct to refer as ”GNU/Linux”. Although in daily talk it is often simply referred to as ”Linux”. Linux is an alternative Operating system to Windows, macOS and ChromeOS. GNU/Linux have more than hundred different Operating systems available based on the Linux kernel, so GNU/Linux is actually not one alternative, there are multiple alternatives. To be fair, ChromeOS, is actually also based on Linux.

The magazine Linux Journal, January 2019, the article The State of Desktop Linux 2019 has a chart for RAM usage of six different desktop environments, measured on Debian. It gives a good overview. However, I want to do a test myself and do it slightly different, and to see how it is on my own laptop. So, here comes my findings.

Testing

Test objects

My ”Linux home” is Linux Mint. This explains why so many Linux Mint flavors and releases are included in this report. Linux Mint is available in four flavors. Three of the flavors are based on Ubuntu, but with different desktops: Cinnamon, MATE and Xfce.

The fourth Linux Mint LMDE (Linux Mint Debian Edition) is based on Debian (and Ubuntu is based on Debian). LMDE only comes with Cinnamon desktop.

The other Linux variants in this report are: Debian 10 Plasma (KDE), elementary 5.0 , Peppermint 10, Puppy Ubuntu Bionic Pup 64 8.0, Slax 9.5.0 and Ubuntu Studio 20.04 Xfce.

Debian is available with several desktops. I have choosen Plasma from KDE, to my knowledge considered as a relatively hungry desktop.

Ubuntu Studio uses Xfce which is considered as a dektop needing relatively few resources. Worth to mention is that release 20.04 is the last Ubuntu Studio using Xfce. Ubuntu Studio is going forward with Plasma from KDE. This change make sense considering several applications included in Ubuntu Studio comes from KDE which means better integration can be assumed. Secondly, the applications in Ubuntu Studio are in many cases resource hungry, so to use Ubuntu Studio you will in any case need a good performance computer and even is Xfce save resources it can be considered as negligible.

Test method and parameters

I have used the Bash command “top” in the terminal for this test. The operating system has been in “idle” state and measured a while after it has started up. The load test is done differently but with same command.

The result of “top” command includes several parameters. When I started this test, I assumed “free” would be the most appropriate parameter. But with more knowledge I have come to understand it is not that simple.

“Free” means how much of the RAM memory that is not used now. Free does not count “buff/cashe” as free. It is correct that “buff/cashe” is not free, but it is almost free.

“Buff/cashe” is complicated to understand. I do not understand it fully. “Buff/cashe” is the sum of buffered and cashe. Buffer and cashe are not really being used, but are kept in RAM in background so they quickly can be accessed and go back to it or the system can go back to it. It speeds up the process to keep it in the RAM. Buffer is kernel memory and cashe is pretty all the other junk.

This means that if an application needs more RAM than “free” gives, it can almost immediately take “buff/cashe”. At the same time, it is of course good to have RAM enough to keep data in “buff/cashe”.

Anyway, this leads to the parameter “used”. “Used” = “total” - “free” - “buffer” - “cashe“. So “used” is probably better to look at when reviewing how much memory the system needs.

However, there is one more interesting parameter, and that is “available” (avail). The manual for “top” describes “available” as “an estimation of physical memory available for starting new applications, without swapping”. So, in a way, I think this is probably the parameter I think of as most interesting. Because you want to do more than run the operating system, and this estimates how much memory is available for the real applications.

Swap is also of interest. Swap is not part of the RAM memory, it is on your hard drive. If you have a fast SSD drive, the delay can be relatively short, but you always want to avoid to use RAM.

This concludes that I will present two charts for each test: “used” and “available”.

The load test gives, I hope, a nice view of how all those parameters interact and a glimpse on what can be done with applications on this cheap laptop.

To write this chapter, I have taken advantage of in particular those four resources:

- MintCast pod episode 355.5 discussed my query; listen when 36:00 – 25:00 remains of the episode.

- Ask Ubuntu forum thread.

- Unix stack exchange forum thread.

- Bash shell manual

Measurement inaccuracy

Use the test result in this report as indicative result rather than accurate test result.

Written speculative from my side, as I do not have the expert knowledge. I believe the result is machine dependent, for example which graphics card is used. It also depends on exact revision of all installed packages at the time of measurement, which kernel, live-USB vs installed version, how long the operating system has been in idle after start and what is ongoing exactly now.

As one example, I saved three measurements values of free RAM for one test: 73 736, 305 056 and 383 028. In the first measurement, Time shift application was running, which indeed took a share of the memory. To give a really correct comparison, I should review exactly what is running and using resources. It could be doable with e.g. deeper analyze of the top command in the Terminal window – but in this article I want to stay at an easy level of analyzing.

Tests

This report consists of four tests:

1. Live USB/DVD (on IdeaPad)

All distros were started via USB, except Slax, which I started from a DVD. I was connected to WiFi, and I had also a portable USB hard drive connected. But else I had no application ongoing started by myself. Hopefully the figures are in a relatively comparable idle status. However, the more I think of it, I should have been more careful in when I measure, what applications I have started or closed, and take an average value over a certain period of time. Still, I think the result give an indication.

Test is performed on Lenovo IdeaPad 100s-14IBR. 1.60 GHz dual core CPU, 32 GB eMCC (SSD) and 2 GB RAM.

2. Installed distributions (on IdeaPad)

This test compares four Linux Mint installed on the laptop. They are installed one at a time, e.g. it reflects the evolution of this laptop: Starting with Mint 19.1 Cinnamon, followed by Mint 19.2 Cinnamon, then I installed same Mint release but changed desktop to Mint 19.2 Xfce and finally Mint 20.1 Xfce. All those have been tested with the VPN Client turned on during the test. It is long time between each test occasion.

Test is performed on Lenovo IdeaPad 100s-14IBR. 1.60 GHz dual core CPU, 32 GB eMCC (SSD) and 2 GB RAM.

3. Installed distributions (on ThinkPad)

The first test with the Live-USB/DVD was done back in 2019. As I happen to have another laptop with multiple Linux distributions installed in parallel on one SSD, I thought it can be of interest to add those as well to the report, although the RAM usage of the distributions themselves are not an issue on this particular laptop.

This is performed on Lenovo ThinkPad T430s. 2.60 GHz Dual core CPU, 250 GB SSD and 8 GB RAM.

4. Load test (on IdeaPad)

With reference to the chapter “Test method and parameters”, I believe this graph over the different memory parameters and how they change when the laptop is more and more occupied with application in addition to the operating system itself, is of interest and also helps to understand the parameters. It also gives a hint of how much of applications that can be used on this cheap laptop.

Test is performed on Lenovo IdeaPad 100s-14IBR. 1.60 GHz dual core CPU, 32 GB eMCC (SSD) and 2 GB RAM.

Test results

1. Live USB/DVD (on IdeaPad)

 Chart used RAM memory Live USB/DVD (on IdeaPad)

Chart available RAM memory Live USB/DVD (on IdeaPad)

 

Linux distro Total Free Used Buff/Cashe Available
Slax 9.5.0 1 897 204 1 308 724 137 924 450 556 1 546 172
Puppy Bionicpup64 8.0 1 888 800 861 264 124 552 902 984 1 076 612
Mint 19.1 Xfce 1 886 324 773 172 343 760 769 392 1 283 412
Peppermint 10 1 886 096 652 116 300 288 933 692 1 355 320
Mint LMDE 3 Cinnamon 1 897 192 644 504 535 432 717 256 1 127 964
Mint 19.2 Cinnamon 1 886 292 585 604 493 456 807 232 1 145 388
Mint 19.1 Cinnamon 1 886 323 581 328 497 328 807 668 1 133 868
Mint 19.1 MATE 1 886 324 568 984 355 544 961 796 1 248 484
Elementary 5 1 886 316 243 040 507 616 1 135 660 948 444

2. Installed distributions (on IdeaPad)

 Chart used RAM memory Installed distributions (on IdeaPad)

Chart available RAM memory Installed distributions (on IdeaPad)

Linux distro Total Free Used Buff/Cashe Available
Mint 19.2 Xfce 1 886 420 664 908 607 384 614 128 1 095 620
Mint 20.1 Xfce 1 835 700 472 800 650 000 712 900 967 000
Mint 19.1 Cinnamon 1 886 292 391 676 786 216 708 400 879 692
Mint 19.2 Cinnamon 1 886 288 383 028 773 068 730 192 889 236

3. Installed distributions (on ThinkPad)

 Chart used RAM memory Installed distributions (on ThinkPad)

Chart available RAM memory Installed distributions (on ThinkPad)

Linux distro Total Free Used Buff/Cashe Available
Ubuntu studio 20.04 Xfce 7 643 100 6 329 200 497 400 816 500 6 830 700
Mint 19.3 Cinnamon 7 826 632 6 181 324 567 332 1 077 976 6 900 988
Elementary 5.1.7 7 826 636 6 001 528 539 508 1 285 600 6 845 824
Debian 10 Plasma (KDE) 7 660 000 5 998 800 804 100 857 100 6 510 000
Mint 20.1 Cinnamon VPN On 7 643 200 5 977 400 767 300 898 500 6 528 000
Mint 20.1 Cinnamon VPN Off 7 643 100 5 794 400 637 200 1 211 500 6 643 000

4. Load test (on IdeaPad)

 Chart load test (on IdeaPad)

M Free Used Buff/Cashe Swap free Swap used Available
1 472 800 650 000  712 900 976 000 0 967 000
2 151 100 644 000 1 040 700 975 500 500 953 500
3 147 600 885 400 802 800 966 500 9 500 726 600
4 132 500 876 900 826 300 966 500 9 500 737 300
5 119 200 1 126 600 589 900 962 700 13 200 437 700
6 84 300 1 218 600 532 900 955 200 20 800 353 400
7 74 200 1 421 200 340 300 846 200 129 800 164 200

 

Total memory: 1 835 700. Swap total: 976 000.

Measurement Time Description
1 16:46 Up and running
2 16:56 Idle
3 16:57 Firefox: blank page started
4 17:08 Ff: blank page running. After measurement, starting SVT Play
5 17:10 Ff: SVT Play (live stream TV) running
6 17:31 Ff: SVT Play (live stream TV) running. After measurement, starting 4 more tabs: hemrin.com, mintcast.com, linuxmint.com and dn.se (newspaper)
 7 17:59 Ff: All 5 tabs running

 

 

Henrik Hemrin

10 July 2019

Updated 4-5 August 2019 with Linux Mint 19.2

Updated 27 September 2019 with Linux Mint 19.2 Xfce installed.

Major update 26 March 2021

This article before the major update 26 March 2021 is available here (pdf).

Comments powered by CComment

- on the web since 1998!

Human beings are very much the same, all over the world. Individuals are different. Advocate of human rights and real democracy for everyone.

© Copyright Henrik Hemrin

RSS feeds: Kunskap - Knowledge Ι Wisdom - Vishet Ι Walking to Linux Ι Mastodon

Contact and follow: Mail Ι Mastodon Ι Pixelfed Ι LinkedIn

Integritet - Privacy
Sitemap