Bonum Certa Men Certa

Messing With ZRAM Again Because IBM Software is Barely Possible to Document and Changes if You Do

Reprinted with permission from Ryan Farmer.

It turns out that when I was setting up Debian, I set up my “zram-generator” systemd configuration file wrong.



systemd is Hell because they never commit themselves to the idea that once you learn how to do anything with it, it will stay working, most of its components are full of bugs and security vulnerabilities, and many things replace something that some other part of the operating system was already doing a lot better.



I cringe every time I give it some new responsibility over my system, waiting for how it will go wrong. I would be using systemd-oomd to handle potential out-of-memory situations, but I’ve read so much about how it handles memory pressure bizarrely and worse than the kernel’s oom-killer, even with the Fedora defaults, that I figure I’ll just leave it alone unless it becomes “mandatory” at some point.



I hear (on Reddit) that systemd-oomd does crazy shit, like, “There are 32 GB of RAM in this system. 12 GB are in use. 20 GB are free. Let’s go on a murder spree and shut down some Chrome tabs and LibreOffice with unsaved work!”



ZRam is a compressed block device that you can use for a compressed swap file in memory. The idea isn’t a bad one, but IBM has made figuring out how to set it up unnecessarily painful because of course it is handled by systemd. You’d think setting up ZRam would be too simple for systemd to bring too much of its usual incompetence to, but nooooo.



Today I actually looked at zramctl and it told me the compression type was lzo-rle, not zstd as I wanted (and was the default on openSUSE and I’m sure that’s what it said when I set it up on Debian and started the service).



Whatever.



Looking around the Web, I found that I needed the line compression-algorithm = zstd in my /etc/systemd/zram-generator.conf file.



So I added it and rebooted, and checked sudo zramctl again and I had zstd compression. Yay!



But when I was looking at the manpage for “zram-generator”, it said that the method by which to specify the fraction of the size of RAM to use was obsolete.



zram-fraction = 1.00 does work, but it’s “obsolete”.



So now it tells me that the “current” way to do the same thing is zram-size=ram/x, where ram is the amount of ram and x is the amount to divide by.



So ram/2 would make the device half of RAM, ram/1 would make it all of your RAM, which is what I wanted.



So now my file looks like this:



# This config file enables a /dev/zram0 swap device with the following
# properties:
# * size: 50% of available RAM or 4GiB, whichever is less
# * compression-algorithm: kernel default
#
# This device’s properties can be modified by adding options under the
# `[zram0]` section, or disabled by removing the section header.
# Additional zram devices can be created by appending new `[zramX]`
# sections and setting the appropriate options for each device.
#
# See /usr/share/doc/systemd-zram-generator/zram-generator.conf.example
# and/or zram-generator.conf(5) for a list of available options.
[zram0]
zram-size=ram/1
compression-algorithm = zstd



I’m not exactly sure why IBM Red Hat keeps screwing around changing the way you do this. They make you memorize something only to make pointless changes to the way it’s done, but then the stupid thing doesn’t want to break existing setups, so they just say the old one is “obsolete”.



$ sudo zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 zstd 15.4G 4K 64B 4K 8 [SWAP]



At least this thing is finally set up right, I think.



They never let you get too sure that you did it right or it wouldn’t be “modern”.



As to the debate about zstd vs lzo-rle, they’re both decent choices.



I can see the logic of defaulting to either one, depending on who you think your users are.



If you have a multi-core x86 PC with lots of CPU performance to burn, zstd makes more sense because of higher compression ratios.



If you have some little ARM system that you bought down at the Micro-Center and don’t want to overload it, but still do want to use ZRam, lzo-rle is a respectable choice.



If anything, ZRam with zstd has gotten faster since the kernel developers have last updated the default and I suspect it deserves another look.

Recent Techrights' Posts

Upcoming Techrights Series About the Failure of the Solicitors Regulation Authority (SRA) to Stop Hired Guns Who Work for Americans That Abuse Women
The SRA has demonstrated nothing but considerable incompetence at many levels
The "Alicante Mafia" - Part XIV - The EPO Vice-President Steve Rowan and the Hidden Alicante Connection is a Big Deal
We'll soon take a closer look at Ernst
Links 27/01/2026: Japan-China Feud Escalates Again, "Iran's Internet Blackout Persists"
Links for the day
 
Upcoming Techrights Series About the Public Appearances of Richard M. Stallman (RMS) in the United States
we plan to drop all pretences about "Open Source" and instead focus on Software Freedom
Upcoming Techrights Series About the Experiences of EPO Insiders
We'll start the new series some time next week
Links 28/01/2026: Microsoft Ordered to Stop Spying on School Children, Apple's Brand Tarnished by Its Complicity With Human Rights Abusers
Links for the day
Gemini Links 28/01/2026: Particle and AirMIDI
Links for the day
Amandine Jambert (EDPB/CNIL/FSFE), motive for lying, trust in blockchain and encryption
Reprinted with permission from Daniel Pocock
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, January 27, 2026
IRC logs for Tuesday, January 27, 2026
Expect More XBox Layoffs Shortly
As expected
Online 'Gathering' Held Today to Organise Industrial Actions in EPO, Strikes Will be Starting Shortly
"Online Extraordinary General Meeting on Action Plan"
It's Not About What You Know, It's About Who You Know (and Stay Quiet About the Cocaine)
This is not an organisation that exists to ensure laws are followed
FOSDEM 2026: democracy panel: FSFE uses women as stooges, gerrymander
Reprinted with permission from Daniel Pocock
Must Use Proprietary JavaScript to Submit Feedback to the European Commission About Moving From GAFAM to Free Software
Nevertheless, go tell them why Software Freedom would benefit Europe's defence and economy
Distortion of the Facts About Mass Layoffs at IBM
more layoffs are ahead
Gemini Links 27/01/2026: "Waiting Isn't a Waste", Posting from Lynx, and Bookmarks
Links for the day
Links 27/01/2026: "Oracle Debt and TikTok Transition Troubles Vex the Ellison Media Empire", Richard Stallman Quoted on Copyrights
Links for the day
Steven Field (Red Hat) Speaks of "Recent Layoff" (RA/Wave) in Red Hat
IBM really doesn't like it when people talk about "RAs"
The "Alicante Mafia" - Part XIII - Is EPO Vice-President Steve Rowan in Cahoots With the "Alicante Mafia"?
that deserves much media attention, political intervention, and condemnation
A Week Ago We Contacted the EPO's Stephen (Steve) Rowan About Cocainegate
Tomorrow we'll write some more about Rowan
“Wikilaundering” Explained
"London PR firm rewrites Wikipedia for governments and billionaires"
IBM Reports 'Results' Tomorrow, Expect More "RAs" (Mass Layoffs)
they use words like "efficiency", "optimisation", "AI", "pivot", "modernisation" and so on
Earlier This Month Microsoft Lunduke Said in Public It Was Good That Renee Good Was Murdered, Now He Mocks or Demonises People for Saying the US is Unsafe
Don't be easily conned by demagogues
Google News and "Linux" Slop
Why won't Google be interested in tackling this issue? Instead Google has been trying to participate in this issue.
IBM Kills Red Hat in the Darkness
What IBM does to Red Hat is malicious
IBM Red Hat's Goal Is Not Real Security (It Probably Never Was)
Spies and trolls are very malicious people and sometimes they're the same thing
With Absurd Lies About Slop, Which Lacks Intelligence or Financial Potential, GAFAM and IBM Will Twist Mass Layoffs as 'Efficiency Drive' or 'AI Pivot'
More layoffs are on the way
Animal Advocacy Works
All it takes is effort and determination
EPO Strike This Week
What has happened to Europe?
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, January 26, 2026
IRC logs for Monday, January 26, 2026
For the EPO to Survive, António Campinos and the "Alicante Mafia" Must Fall on Their Sword
There are EPO insiders who are convinced Campinos too is (or was) a cocaine addict
Some Slopfarms and Some Real News Sites Cover Richard Stallman’s (RMS) Talk
If his message about Software Freedom spreads, then we're all better off
Gemini Links 26/01/2026: Pocket Power Pack, Batteries, and Breaks
Links for the day
"Microsoft Vista 11 Emergency Update" as Windows Fails to Boot (Again)
Microsoft is desperately trying to find some new business model as the debt soars
4 Hours Ago The Register MS Published Paid-for Spam About "AI" (Slop, Buzzwords)
"AI" mentioned 13 times in the page
IBM 'Results' Due Wednesday Evening, Expect Clues About Mass Layoffs
Don't expect IBM to say anything about "layoffs" or "RAs"
The Fall of the EPO (or the "Alicante Mafia" at EPO) Will be Due to This Reckless Lawyer Who Does Cocaine in Public While Speaking for the EPO
The longer European politicians (and media) turn a blind eye to this corruption, the worse it'll get
Why RMS is Scary to GAFAM 'Engineers' and the GAFAM Apologists (or Addicts)
especially because of his ideas and his way of life
Firefox 'Market Share' Down to All-Time Low in 2026, Adding to It User-Hostile 'Features' Only Worsens Things
What is the goal of Mozilla at this point?
Links 26/01/2026: Windows Back Doors, American Winter Storm, and Report Says Iran's "Protest Death Toll May Exceed 30,000"
Links for the day
Life Got Simpler and Therefore Also Healthier and Happier
Some people envy not wealth but happiness (which they're unable to attain, even with hoarding and accumulation)
Richard Stallman's Experiences With 'Cancel Brigades' Ought to Educate Linus Torvalds
Now they talk about "if Linus dies" scenarios
Links 26/01/2026: Financial Stress in German Farms and Germany Wants to Take Its Gold Reserves Out of the US
Links for the day
Gemini Links 26/01/2026: "Lack of Meaningful Things" and Getting Back to Programming
Links for the day
Strong Correlation Between the Slop Ponzi Scheme (or Bubble) and Major Disasters
BitCoin ruins the planet; so does slop
We Will Never Allow the "Alicante Mafia" to Hide "Cocainegate"
transparency typically scares malicious actors
Fewer Involuntary Interruptions This Year
This year we're doing much better
Prisons Are for Dangerous People Who Pose a Threat to the Public, Not People Who Inform the Public
At the end of the week EPO workers go on strike
Microsoft Loses Grip on Indian Ocean
Many countries, including in older allies of the US (such as Canada and the US), look for ways to get out of Microsoft dependence urgently
XBox Consoles Nearly Dead by Now, the 'XBox' (ex-Box) Brand Now Stands for Something Full of Slop, Spam, Filler, and Chaff
We're seeing the last day (maybe year) of "XBox"
The Great "AI" CON Explained by Dr. Andy Farnell
LLMs are basically advertisers of sorts
Links 26/01/2026: "Journalists Detained", in Germany "Unjustly Jailed Man Gets €1.3 Million Compensation"
Links for the day
Red Hat Quietly Going Extinct After Bluewashing in 2026
At this point it would be rather foolish to assume that IBM will let Red Hat just "do its own thing" or maintain its corporate culture, identity, projects etc.
The "Alicante Mafia" - Part XII - Kris De Neef and Roberta Romano-Götsch, Who Stepped in for the Cokehead, Have No Comment on His Cocaine Usage (and the EPO's Cover-up)
Sh-t floats to the top.
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, January 25, 2026
IRC logs for Sunday, January 25, 2026
Gemini Links 26/01/2026: Cold Perception, Software Patches in NixOS, and Sunk Cost Fallacy
Links for the day