What makes Clear Linux perform much better compared to other distros?
I know for a fact that it does use special optimisation flags when compiling the packages into binaries, it uses some power tweak tools or something; I am also aware that it patches packages or something ~ I was wondering if somebody could elaborate on what they mean by patching packages please?
Is there anything else Clear Linux does to help optimise the distro?
Another thing I like is its āalmost-statelessā system. I say almost because itās really up to the user to keep it that way, and sometimes itās not as easy as one may think. Anyway, enforcing bundles updates with system updates really helps with bugs (e.g. "which version of PHP do you have? Ok, and what about nginx? Ok, and MariaDB? Good, now tell me your Firefox versionā¦), and the cool thing is that other than having optimized software, it usually has the most up-to-date software out there! So, more performance, less clutter, less coupling between user stuff/system stuff, always up-to-date software⦠Anything else?
So with Gentoo, people tend to use optimised flags to build their packages. So if people chose to use the most up-to-date packages on Gentoo, why is it that it still underperforms over Clear Linux?
Ok so truth be told, I really like Clear Linux and I want to use it, but I find that it takes up way quite a bit of RAM, storage space, and its package manager seems more complicated to use over other package managers.
According to a Gentoo user as to why Clear Linux uses a lot of space:
Is this true?
If so, then is it possible to use Gentoo and to build Clear Linux but only keep the packages that I need?
I think it might be because CL has also optimized system calls, not just packages. I never used Gentoo and Iām not a CL developer, so I cannot say for sure⦠But having an optimized OS, and not just packages, really should help IMO.
Complicated? Nah, If you ever used apt, and Iām pretty sure you did, THAT is complicated. On CL you basically have 4 commands:
swupd update ā because of the stateless architecture, this command searches for both system and package updates and automatically installs all of them! Yay, no more apt update && upgrade (and even dist-upgrade)!
swupd bundle-add ā Install a bundle. You dont have to install a dozillion packages if you want to run a web-server or even build the entire OS: just do swupd bundle-add something-dev and you have all you need to build "something (be it GNOME, the OS itself, or something elseā¦) (Note: I didnāt try to do this, but Iām pretty confident it should work as intended)
swupd bundle-remove ā remove a bundle
swupd-repair ā can actually repair a lot of user-error done on system partitions. Obviously not everything. This is a bit harder to use, but fixing errors is by definition an hard task, isnāt it?
Memory usage on my PC is usually 4GB out of 8GB of RAM. Disk usage is actually quite high, because for some reason CL comes with 500MB of fonts (including ancient Sanskrit, biblic Hebrew and probably Aztec) and other 500MB of themes and icons. Basically, summing all things up, you have almost 2GB of custom/optional stuff⦠But fear not, they said they removed most of this clutter in the latest GNOME 3.36 update (should be coming any moment this week).
I have used apt before and sure it is a bit confusing but I have used pacman far more.
What is a stateless architecture?
Is a bundle where you can build a package, sorry I donāt quite know?
swupd-repair ā can actually repair a lot of user-error done on system partitions. Obviously not everything. This is a bit harder to use, but fixing errors is by definition an hard task, isnāt it?
Wait, I thought swupd is a package manager? Why would it also be able to fix up system partitions?
That is quite a lot, Is there like a skinned down version of Clear Linux where its kept very minimal and only the required packages and stuff runs?
Hopefully, but I would want to use a tilling window manager anyways.
Stateless achitecture is the fancy term CL team uses to say that system updates and package updates are basically the same thing (you can look up in the CL docs for a more detailed explanation: Clear Linux Stateless.
The 4GB of memory usage Iām talking about are when doing normal work (GNOME, Firefox, VS code, Telegram⦠stuff like that), not on idle. I chose to tell you this usage because unless I misunderstood your use-case and youāre talking about a server, nobody uses a PC just to stare at the wallpaper, and idle memory usage really depends on what you actually mean by āidleā.
If you have some familiarity with Object Oriented Programming, a package is the equivalent of a primitive data type (meaning itās in some way āatomicā), while bundles are collections of packages and possibly other bundles.
By fixing system partitions I meant fixing problems like overwriting system files and stuff like that. It does not fix filesystem issues.
I think they distribute a ādesktoplessā version of CL, where you can download any DE you want later, just itās a bit longer to setup and not really ready-to-use for a normal user.
Not exactly. PPAs are repositories (swupd has beta 3rd-party repositories support, but there are none that I know of). Bundles are⦠Letās say āpurpose-packagesā. Conceptually, a package contains something (especially libraries) that is not enough to do what you actually want to do. A bundle is a super-package that contains all the packages to do something (build GNOME, setup a webserver, compile and debug C programsā¦), So you donāt have to install a ton of packages manually, because installing a bundle automatically installs all the packages you need.
I actually did know about that, I even added it, but last week it was offline and Iāve not been able to query it (it wasnāt swupd fault), so I thought he just shut it downā¦
As for RAM usage, Iāve 32 GB of RAM, with no foreground applications running, it uses about 3-4 GB. Iām using Gnome and just a few extensions. The only costly background service I can think of is Dropbox.
Iām quite okay about the RAM usage. But since I havenāt run any āminimalā Linux distribution before, I cannot say how this compares to others.
Itās a good question to dig into. Weāve been working on adding a page to the documentation to elaborate. It should be published any day now Iāll post a link here once it is.
In short, Clear Linux favors runtime performance.Thatās not to say weāre not conscious about other aspects though.
This is true we tend to use more aggressive flags. Also the compilers and low level libraries themselves are also patched.
It depends on the package - could be simple config changes, changing default buffers sizes, changing the order of loading things,etc⦠In general the approach is to upstream any enhancements if possible
What evidence do you have of this? Iāve only seen one result lately comparing a phoronix CL result with their properly configured gentoo (same CPU and similar hardware) where their numbers were much better (albeit it was only a couple of tests which isnāt representative). Any time phoronix uses a gentoo based system, itās not even compiled for the host CPU (so same as a generic distro)
It does duplicate some libraries and binaries, but that wonāt change RAM usage and only 5-10% extra disk space as itās only done for a handful of packages. You can get slightly higher RAM use from compile flags making binaries larger and including features that you donāt need, which happens with all distros, but possibly more due to bundles including more packages than you might want. The use of bundles rather than packages results in greater disk space as you canāt minimize for your use cases well. In gentoo you would be able to compile out completely support for functions you donāt need (for example printing or samba shares), at the cost of compilng your own system, but would use a lot of disk space in compiling the packages and fetching the sources!
The feature Gentoo lacks is build support for PGO, which is used sparingly in CL and not in combination with AVX2/AVX512 builds last time I looked.
I saw one phronix test and Gentoo was way behind CL and somebody from reddit mentioned that Clear Linuxās optimisation mainly comes from patching the packages. But I guess they were not optimised for that particular hardware, as you have mentioned. Do you have the link to the test that you saw?
It probably used Calculate Linux (a derivative) which is distributed compiled like every other generic distro. Packages were certainly not compiled for the system CPU or tweaked for optimization. Also you need to understand the phoronix tests, many donāt test the distribution provided package so comparing the results across distributions (to determine the speed of the distribution) is actually insane!
Turns out it wasnāt the same CPU, it was actually a weaker CPU in the gentoo system that scores 2/3rds of the one tested in CL according to passmark. But it does compromise the comparison nonetheless.
There hasnāt been a proper benchmark done comparing an optimized gentoo vs CL (Iād argue there hasnāt been a proper benchmark comparing any distributions, certainly not by phoronix).
PGO is an optimization technique that based on profiling. It first compile the code, then profile it(run it in test cases), then according to heuristics, comiple again with optimisation.