Mythbusting light and fast Linux distributions


#1

There are hundreds of Linux distributions to choose from. One specific sub-category is a group of distros that advertise themselves as being lightweight or fast alternatives. They claim to offer better performance or to be better suited for older hardware. These statements are B.S. for the most part.

First thing to understand is that Linux is Linux. Fully featured, even the light ones, share the very same back-end architecture. You have the same Linux kernel with the same drivers, Xorg display server (soon Wayland) and so forth. Same software driving your hardware, getting the same performance out of it.

On top of the common Linux foundation you have the actual desktop and here we have some variance. Certain minimalist systems consume about 100-150 megabytes after booth, but they usually have a limited set of features. Distributions based on lighter, yet reasonably featured, desktops generally have a footprint around 300 megabytes. Here we are talking about Xfce, LXQt and so forth. Our example screenshot is from Manjaro LXQt and a footprint of 280 megs after boot.

Then to the big boys. The most visually and feature rich desktops Gnome, KDE and Ubuntu Unity all eat around 400-600 megabytes, depending on the configuration of the distribution. So the net difference to these lightweight alternatives is about 200-300 megs. This has very little difference on common hardware of recent years, where you most likely have 4 GB’s of RAM or more. Even low end systems with only 2 GB RAM will leave you with quite a lot of headroom after first boot.

The savings of few hundred megabytes will have very little impact on your device’s performance, with the only exception being that if you run completely out of RAM and the OS needs to perform swapping on the mass memory (HD or SSD).

The majority of your payload will not come from the operating system, or desktop but from the applications. Web browsers and sites are heavy these days and Chrome or Firefox will easily consume more RAM than your operating system and desktop altogether.

In the shot below we have Chrome running with 3 tabs, LibreOffice Writer with an empty document and GIMP without any image file opened. Combined they are already taking about 400 megs and the number will grow a lot once you get going with your work, whatever it is. So if you want to save some RAM, you need to choose lighter weight applications, but they are rarely full-featured.

The Phoronix performs periodical benchmarks for all parts of Linux and here is their recent report on Ubuntu 16.10:

For the most part, the performance between LXDE, GNOME, Openbox, and KDE Plasma tended to be about the same on Ubuntu 16.10 when using the stock Intel Skylake graphics support. The desktops that tended to be the slowest were actually Xfce and MATE for Linux graphics/gaming, at least in the out-of-the-box configuration as packaged in Ubuntu Yakkety.

For example, the KDE 5 is a very well made piece of software with excellent architecture and it performs very well even on older hardware, such as my Thinkpad X301 from late 2008 - hardware from almost ten years old! KDE developer Martin Gräßlin has written an excellent blog post regarding desktop compositing (the effects and such):

Without compositing we move the time-memory tradeoff towards using more CPU (create those windows) to prevent even more CPU usage. With compositing we don’t have to do anything of it. So disabling compositing is obviously not the silver bullet for being “lightweight”. It just means moving the time-memory tradeoff slider towards CPU.

So window compositors, like kwin or Compiz, offload some of the effort from the CPU to the GPU. It takes a bit of RAM, but reduces CPU cycles needed. So eliminating composition actually consumes more CPU cycles, loading it with work that the GPU should take care of, if you have one.

The lightweight and minimalistic distributions will give you simplicity and they save you a bit of RAM. If you prefer a simplistic desktop with less features then by all means, make use of them. Also, if you are seriously constrained with RAM, 2 gigs or less, then the savings will be worth while, as you are more likely to experience swapping.

They will not however make your system magically faster. For that you need to visit the local PC retailer.


Convert your old laptop into a snappy Chromebook using CloudReady
#2

####Hello Redditors and others!

It looks like my post got some attention on various social media channels, including the /r/linux. Some valid points were raised and some people just refuse to understand what they are reading.

One of the best comments came from user kicksherintheballs, who reminded that Linux utilizes unused memory as disk I/O cache. That is very true and should have been mentioned in the original piece as a pro for minimalistic distros. So saving RAM from the desktop and apps will benefit you in read and write speeds and more so on low memory hardware. Also, in theory, the less your system is using RAM, the less it is exhausting your system and I/O bus.

Then there was lot of garbage written by geeks who did not get the point of the article at all. No, this piece is not targeted towards Raspberry Pi, IoT-devices or any other low spec device that is not designed for casual everyday desktop computing. Also compiler flags, schedulers and so forth are way off the point here. We are talking about main stream Linux distributions - they are pre-packaged for you. Of course you can manually fine tune all you want and potentially find some gains. You can also chip tune your car and make it go faster. So what?

As said, there are lots of blog posts and articles around the web promoting the lighter weight alternatives for older or low-spec PC’s. The whole point of my post was to raise awareness that a spartan desktop might not actually perform any better in real life. You also need to go on a diet with the apps as they are often the bigger part of the payload. Many criticized that using Chrome blows the whole point of aiming for lightness, but it happens to be the most compatible browser for Linux and constantly wins the benchmarks. Casual user will want Chrome/Chromium, Firefox, or one of their many forks. And by going spartan you are almost certainly giving up on features as well.

I have skin in the game when writing this. As mentioned, I am using a late 2008 Thinkpad X301 as my daily driver. It has Intel Centrino vPro CPU, GM45 GPU, 4 GB of RAM and a low key performance. The motivation for the article came as I was looking for a light weight distro to speed things up, but there were no performance gains to be found. Surprisingly it turns out that Manjaro’s KDE edition runs very well on this machine and possibly better than Xfce version. I get very smooth smooth experience around the desktop and enjoy KDE Plasma 5 goodies, like perfectly tear free video, Expose and window snapping and Chrome runs very smoothly. It streams YouTube HD videos without a hitch.

If you like spartan desktops and feel that there are benefits, then by all means use them. It’s a free world after all and Linux is all about choice. But if you feel that you are giving out too much on the features and get nothing in return, it is worth looking at the alternatives. Benchmarking is always a good idea as one gets easily deceived by placebo.


#3

Thanks a bunch. Great article. Appreciated the finer points. Using Linux now for about 20 years, exclusively for 15. Have tried so many different OSes. Similar experience as a novice/newby. Have no arguments. Just saying hi. Good article. Using Ubuntu Mate 16.04 on 6 yr old top end ASUS ($1000) laptop with 8 GB RAM. And 15+ Chrome tabs open ALL THE TIME. Will keep all you have said in mind as I prepare to get a new laptop some day. Very helpful.


#4

Thank you for the positive feedback - much appreciated.

I used to run Ubuntu MATE 16.04 on two computers for several months. MATE is a great desktop project. However, I have recently moved to Manjaro KDE Edition. I’ve been tinkering with Manjaro for quite some time now and learned to appreciate the project and Arch Linux as the base. I used to hate the KDE for many years, due to their infamous 4.x releases, but this 5.8 has really surprised me.

It runs super smooth on my aging laptop. System is responsive and desktop effects fluid. So if you have interest and spare time, it is well worth a look, at least from the Live media. In the compositor settings, set vBlank syncing to “Only when cheap”, so that it does applies only to full screen video etc. and see how it flies. I don’t like many of KDE’s design decisions, but it can been configured to have a top panel etc. to make it more familiar with MATE/KDE/Xubuntu users.


#5

A very interesting article!
I was wondering: I’m using openbox, thus avoiding compositing in any form and I’m ok with that. Would I offload some of the effort from the CPU to the GPU adding compton, or would I just mess things up? Thanks for your kind answer anyway


#6

I have zero experience wth OpenBox, so I don’t really know anything about it. But in theory using a hardware accelerated compositor should do the trick. Based on 5 minutes of googling around, it seems that Compton is a popular option with OpenBox. Why not give it a try and report back?


#7

I’ve been trying this “solution” for some months, so here’s my report.
The main issue here is… we’re not talking about anything of much weight! I can easily live without the shadow of the windows, anyway compton only weighs 5 Mb of RSS ram so it’s worth the cost, I didn’t see any speed increase or decrease on the matter, even if my cpu is a rather old athlon 64x2 5200+. The Video card is also rather old but good, a radeon hd 4650
The only difference I noticed was when I tried to use hardware graphic acceleration on compton: it became 80 Mb on RSS ram and I even had some graphic issues that led me to undo the change.

Bye, hope I was helpful!