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

"How Many Friends Do You Have?"
"Do bots count?" "Friends in Facebook?" "Does a girlfriend chatbot count as a friend?"
Solicitors Regulation Authority (SRA) Responds to Crises Only After It's Way Too Late
The SRA does not do its job. The new chief's job is face-saving PR in the media.
The Techrights Team Makes the Platform Faster
The infrastructure is already fast
France Does Not Need Digital Weapons Disguised as Social and as Media
French people lost interest in Social Control 'Media' (or Networks)
 
Links 18/02/2026: DMCA Weakened, Anna’s Archive Still Thriving
Links for the day
Links 18/02/2026: Gig 'Economy' Condemned, Microsoft Insulting/Stressing People With False Slop Predictions
Links for the day
Twitter Falling to 1% in Africa's Largest Nation (Algeria)
About 15 years ago the regime in Egypt got toppled (and others had been too) partly because of social control media such as Twitter
Mozilla Firefox Died in Afghanistan
Mozilla has been a complete disaster
Gemini Links 18/02/2026: Astronomy and Texinfo
Links for the day
Are IBM CEO and IBM CFO Ready for Financial Audit That Topples the Shares by 50% in One Day?
The same "chefs" that cooked up Kyndryl Holdings Inc are still in charge of the IBM kitchen
"Senior AI Reporter" at Slop Technica/Ars Sloppica Has Written Nothing in Nearly a Week, Did Conde Nast Suspend Him for Fake Articles With Fake Quotes?
Slop Technica/Ars Sloppica is having a serious credibility issue right now
Linux Foundation Puts Slop Images, Not Just Slop Text, in Linux.com
More of the same then
The Register MS Paid-for 'Articles' (Ads) Seem to be LLM Slop Again
If it's true that The Register MS is resorting to these marketing tactics, will they later delete the evidence (as they did months ago)?
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, February 17, 2026
IRC logs for Tuesday, February 17, 2026
Microsoft Had Mass Layoffs Every Month Last Year, This Year It's Delaying a Lot to "Prove" Rumours That Crashed Its Stock... 'Wrong'
Building a bigger snowball for later
Red Hat Is Not a Company Anymore, Amid Bluewashing and Mass Layoffs It's Merely IBM "Division" or "Brand" or "Product"
systemd at this point is sort of like IBM/Microsoft thing
IBM suffers "worst weekly drop in six years", Microsoft's MSN calls it "buying opportunity"
Ask Cramer what to do
Still Some Slopfarms in View, Sometimes Targetting "Linux"
That's a total of at least 4 in Google News today, coming from 3 sources
Gemini Links 17/02/2026: 3D-Printed Stainless Steel Smartwatch and Gopher Bay Offline
Links for the day
Links 17/02/2026: Machine Rage and Microsoft Kills XBox Social Clubs
Links for the day
EPO "Productivity" Will Fall Off a Cliff If Examiners Stick to the European Patent Convention (EPC) and Follow the Real Rules
The EPO's "Cocaine Communication Manager" would hate to see the next "productivity" metrics
The Problem is Not Technology, the Problem is Really Bad Things Sold or Imposed as "Tech" (Like a Religion Built Around Technology)
Don't hate technology, hate the corporations that abuse it to promote coercion, exploitation etc.
Resisting IBM and EPO Corruption
Rise up against EPO dictatorship next week
Where Slop Meets Ghostwriting: It's a False Analogy
It's a false analogy
Links 17/02/2026: Why OpenClaw is Very Sleazy and Ars Technica Exposed as Hub of LLM Slop (Credibility Destroyed Overnight)
Links for the day
Benj Edwards (Ars Technica) Used Fake Articles to Promote Ponzi Scheme for Conde Nast and Its Client (Marketing)
What Ars Technica and Conde Nast do here helps defraud the general public
Slop Technica: Ars Technica Seems Like Repeat Offender, a Part-Time Slopfarm
The culprits are repeat offenders, but the publisher will never admit this in public
Only One in 50 Saudis Would Use Microsoft for Search, Almost Same as Would Use Russia's Yandex
If statCounter is to be trusted
Microsoft's "AI" Concerns Are All Indian (or Low-Paid Workers Who Work Extra Hours Unpaid)
portraying charlatans and frauds like they're some kind of visionaries and luminaries
Microsoft Turned Bing Into Censorship Machine of China, But Bing Is Pegged at a Mere 2% in Asia, Yandex is Bigger
Expect many Bing layoffs some time soon (like in past years)
Just Like The Register MS, Conde Nast's Ars Technica Has Just Publicly Admitted That It Published Fake Articles (Slop) Made by LLMs About Serious Subjects
Conde Nast might shut Ars Technica down to escape the bad publicity/association
Solicitors Regulation Authority (SRA) Way Too Slow to Respond to Financial Fraud at Law Firms, in Effect Helping Those Law Firms Defraud Many More People (Fleecing Clients)
Who will hold the SRA accountable for this?
Techrights Became a Hub for News That IBM/Red Hat Doesn't Want You to See (and Pays Mainstream Media to Distract From)
the more viciously the notorious organisation attacks the reporter, the greater the interest in what the reporter has to say
EPO's Central Staff Committee on Fourth Technical Meeting, Two Days Before First of (At Least) 4 Winter Strikes at the Second-Largest European Institution
“future orientations on the salary adjustment procedure”
IBM's Collapse Continues, Half of EU Countries to Have Mass Layoffs, "IBM Clearly Disinvests From Europe" Says IBM European Works Council
Recent publication
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, February 16, 2026
IRC logs for Monday, February 16, 2026
Gemini Links 17/02/2026: Alpenglow Industries' Closure and Gemini Server Issues
Links for the day
The Southern California Linux Expo (“SCALE”) or SCALE 23x Becomes Microsoft
It's not supporting the event, it is buying it.
Where Microsoft's Bing Cannot Even Reach 1% "Market Share"
Looking at "I" countries
Microsoft to Focus on Name-Dropping Buzzwords to Distract From Declining Business, IBM RAs (Layoffs) With Staff Stack-Ranked
Calling everything cloud or reclassifying as "AI"
Another EPO Strike One Week From Now, Local Staff Committee Munich to Discuss It This Week
Campinos MIA while Office staff goes on strike at least 4 times
Links 16/02/2026: Barack Obama Responds to Racist Cheeto and Benjamin Mako Hill Studies Online Communities
Links for the day
Gemini Links 16/02/2026: Task Completed by Avoidance and "Playing Again With Akkoma"
Links for the day
Happy Birthday (or Anniversary) to SoylentNews
"Happy Birthday SoylentNews"
Techrights' Architecture
Stability is the main goal
IBM Reduces the Thresholds for Acceptance (and the Salaries)
Are chatbots good enough as IBM staff?
When It Comes to Rust, Keep All the Eyes on the Ball (Technical and Legal Perils, Sustainability Questions)
It's not about security or politics
Linux Foundation Continues Falling Off a Cliff in Geminispace
Gemini Protocol will turn 7 this summer
Links 16/02/2026: cURL’s Daniel Stenberg Asserts That Slop is DDoSing Free Software, But Still Uses a Plagiarism and GPL-Violating Blender (Microsoft GitHub)
Links for the day
The Techrights Community Never Needed Money, Only Goodwill
We accomplish things by a track record of suppressed facts
"AboutCode" is a Microsoft Proxy and Microsoft's Acquisition of the OSI Advances Via OSI Moles
presenting direct evidence anybody can verify
Social Control Media is Just a Digital Weapon
Social control media is not social and not media
They Will Call Smart People "Luddites"
Is society "seeing the light"?
Microsoft Amutable Already Reveals That Its Focus Is Not Linux, It'll Promote "Remote Attestation"
This is basically an attack on Software Freedom, even if they toss around the brand "Linux"
More People in Chad Move to GNU/Linux
Last year we began to see GNU/Linux rising there - a trend which continues this year
Dr. Andy Farnell on How Universities and Culture of Education Got Crushed by "Technofascist Nightmare"
Farnell says he "already soft-quit in [his] mind"
Debt of Broadcom Grew by More Than 50%, Broadcom is Deeper in Debt Than Google
Expect many more cuts
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, February 15, 2026
IRC logs for Sunday, February 15, 2026