Great article, thanks for sharing the details .. only thing I'd add is that you should put a bit of emphasis on the fact that this is not a one-size fits-all setting - users should very much apply it when appropriate to their latency budgets...
The distinction is in the distribution - is the Linux bootable for an end user or is it for a rack-mount industrial application - since anyway the kernel configuration has to be involved to have zswap effectively applied at kernel runtime.
They are downsides in cases where an application has to escalate a critical fault as quickly as possible - indeed where every nanosecond counts - and a process waiting for page restoration is going to be delayed even an intolerable amount.
It should be a user switch and probably will become one in most Linux desktop distributations, I would wager. However, I would not enable it - I run Ubuntu Studio for every last little bit of latency it gives me in a realtime audio-capture application, and on those systems were it to become default-on by way of distro update, I'd be kinda miffed.
Because it is a user choice, and there are applications where it is inappropriate. For desktop Linux it should probably be on, as long as its clear to the user - but yeah, for many other Linux use cases its inappropriate.
Maybe it should be generally on for desktop-focused distros and generally off for server-focused ones. The distros that focus on doing both well might want to recommend it in the installer when told it's primarily a desktop installation and explain the tradeoffs.
For a server, it really depends on what kind of service you're providing whether it would be helpful. We might want to let server admins, SREs, production engineers, or platform engineers to make an active decision about it.
In most cases you'll really want zswap rather than zram anyway.
There are plenty of scenarios in which servers are run with only nominal swap sizes or none at all and systems don't run out of RAM.
Let me size my hypervisor cluster to demand and let the system decide where to place the guests. If the hypervisors are crashing due to full RAM, that's down to planning or budget issues and not a reason to put additional unpredictable latency underneath the guests.
Let me size my SDI to UDP TS video streaming servers to the number and size of streams they'll service. There's not much in their memory pages that's going to ever be idle enough to compress, so why boot the kernel configured to do that? It's just risking extra packet IAT for buying not much benefit.
But in general, yes, zswap would be a good thing compared to swapping to a drive, unless you are mostly swapping things that are really truly idle a long time. Default swappiness on a lot of distros is around 60 by the way, and on servers it's often set closer to 10 or 15.
>I’m surprised some desktop Linux distributions still require manual configuration to enable it.
Its a user choice and should be a user-facing knob because there are times it is inappropriate for use, such as in safety-critical circumstances, certain realtime realities, and so on. It should probably be on by default for desktop Linux, but off by default for every other application a distribution may be targeting ...
I've had this feeling multiple times over my 40 year career. First, it was the operation centers - the only place you could actually get access to a computer, which was fridge-sized, loud, noisy and expensive. Along comes the PC and my terminals are wiped away and I now have new technology to learn in order to gain access, remotely, to the computers I used to sit next to and warm myself. So, I did that.
Then, it was the PC again, new "incredible" 4GL database software arrives, replacing the million-dollar database server with a small box that sat on the side of my desk. Now every tiny office in every bodunk part of every irrelevant town can have massive relational database reports generated, running their profits up, satisfying customers that no longer need Big Metal. That profit is fun!
Then, it was compilers. The incredible onslaught of devtools meant there were tons of new things to learn again. So, I did that. "No more command line C compiler for me!", I exclaimed, and launched Turbo Pascal and Turbo C and Delphi and .. yeah. Maybe a bit too much Visual Basic, but whatever, it was RAD.
Then, Linux arrived, just when we all thought Unix was going to die and we need not keep learning new Unix things, except we do. Linux made the SBOM costs go way, way down, so .. some new things to learn, some old things to re-learn. So, I did that. (Oh, what a relief to go back to command line C compilers and things) Suddenly, we don't need Big Metal, we can do the same exact things on Little Metal.
Then, the Internet revolution arrived, and nobody wanted fancy local native things any more - everything had to be done in this new technology, even if it wasn't quite ready yet, the world was moving in that direction and we had to learn it. So, I did that. And boy, did I ship a lot of things and many profits were made.
What came next .. oh yeah, mobile! iPhone this and Android that, and all the knowledge about how to write great user interfaces was thrown out the window to be replaced with Hot New Stuff™ that the kids were using, grandad! Catch up already, sheesh! Maybe we need a bit of Big Metal for it, but yeah, the web was a great way to provide the user with an excuse to not learn how to install software and maintain their PC hygienically. So, I did that.
And now, the AI revolution is well and truly happening. So, so many new things to learn. So, I'm doing that.
I think the difference is, I've been in this game all along mostly because I love learning things, and computers have always been a mysterious box from which one can learn a great, great deal many things. I used to say "there is nothing mysterious about computers, only unknown - if its working and in front of you, its because someone, somewhere out there, knows it - so that means I can too", and that was a good maxim because it means I know assembly and multiple languages and can navigate all the layers of OSI with ease, and can invent things that others will have to catch up and learn, so .. they do that.
If you were in this for the paycheck, you're hurting. But if you're in it because you love making technology for your fellow human begins, then .. just do that. Embrace the things you don't know. Find your inner hacker spirit, and let it run world.
Get a DGX Spark, learn to use it. Learn to train models. Learn to SHIP those models to customers who will profit from using them. The data that all these other companies are using is out there for you to use, too! Don't forget that!
>Do you feel good supporting these companies by giving them money every month?
No, I do not. I didn't feel good about renting slots on a timeshare system, either, which is why I embraced the PC when it arrived. All the C compiling I could want, none of the bills!
It is the same as it ever was: Go local, or gtfo. Get that DGX Spark and get on with it. Next year is going to be fun! (Unless you're only in it for profit, in which case you're not gonna have a good time unless you can actually have fun, doing that which you need to do, to profit...)
We have always had problems with Big Metal trying to keep everyone sequestered and subjugated. Always. Every single one of the new revolutions I've described have been a battle against Big Metal, controlling everything.
This is exactly how I feel, I started a bit later, but I still remember the 2.4 Linux kernels, the empowerment that Linux gave me, and I feel like that again now. LLMs brings so much of the things I wanted to do -but gave up on because one can do only so many things- (dashes all mine) back in scope. I'm enjoying it!
And I will get that GPU (perhaps not a DGX spark but who knows) someday. It's important to me as well.
I hope you have a great time learning LLMs and using them to do great things. People forget, AI is just as scary as VMS once was. As Unix was. As Linux was (but truly isn't).
AI is just software. Learn how to use it to improve the lives of other humans, and you'll do fine.
The first zoo penguin, a king penguin from the Falkland Islands, arrived in England and was put on display in 1865. Lovecraft very much could've seen a live specimen.
The OP I responded to didn't seem to get it. Anyway, as someone who grew up near Penguin Island, I saw the opportunity to apply some keen facts and I took it.
reply