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

Why Microsoft Accenture Has So Many Layoffs in Recent Years
The debt of Accenture doubled a year ago
 
Links 01/02/2026: Nvidia's Jensen Talks Down Microsoft 'Open' 'Hey Hi' and Britain's Starmer Makes Friends With China, Japan
Links for the day
Links 01/02/2026: Public TV Gutted by Cheeto, Billionaires Fund a Cheeto Propaganda Movie in 'Documentary' Clothing
Links for the day
The New Site ("New Techrights", SSG Since 2023) Exceeds the Old Site in Requests
The "New Techrights" gets about twice as many requests as the "old" (WordPress) "Techrights", the site of 2006-2023
20 Years Ago
Some time soon all this slop frenzy will become like yesterday's "blockchain" or "metaverse"
Gemini Links 01/02/2026: Zdzisław Beksiński and Disconnected Git Workflow
Links for the day
Talks About Nadella's Microsoft Exit After Chatter About Tim Crook Leaving Apple (Years Ahead of Retirement Age)
Mass layoffs and record debt do not represent a company's health.
We Still Cover the Same Problems We Spoke of 20 Years Ago
We're not easily seduced by "novelty" (new things), we try to judge them critically
Patents Standing in the Way
They also cause environmental harm
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, January 31, 2026
IRC logs for Saturday, January 31, 2026
IBM, a Microsoft Company
Microsoft and IBM as a pair go a long way back
A Lot Less GAFAM in Scandinavia
Are they reacting to geopolitics and risks from the US?
IBM Kills Companies It Bought (Neudesic Seems Like Latest Casualty)
Why isn't even a single publisher investigating those things?
Fake "Linux" Articles
Just because some platform has "Linux" in the domain name and/or site name does not imply that it is a news/Linux site
Gemini Links 31/01/2026: "Proof Without Content" and "Technology Connections"
Links for the day
Links 31/01/2026: Microsoft "OpenAI Representatives Are Going to Critics’ Houses With Threats and Demands", Its Proprietary Chaffbot Faces More Lawsuits
Links for the day
Links 31/01/2026: "Introducing Encrypt It Already" and "Huge Cache of Epstein"
Links for the day
A Can of WORMS - Part I - Trying to Throw RMS Under the Bus at MIT and Everywhere Else
This series won't give air to online 'trolls'
Mobbing at the European Patent Office (EPO) - Part I - An Introduction
When the series ends, some time around the second or third EPO strike of this year, we'll contact the relevant authorities and plead for intervention
The Solicitors Regulation Authority (SRA) Delusion - Part I - Who Regulates This Regulator? (Only Itself!)
We won't self-censor or prematurely terminate this series
Norway Almost Trusts Russia More Than the Bill Gates (Sleeping With Young Russian Girls) Company, Microsoft
Microsoft represents crime
Riddle Us This... (Jim Zemlin and Bill Gates)
Do these people even understand the literal meaning of "safe space"?
Is "Nobel Prize for Peace" a Sick Person's 'Code Word' for Gangbanging Now? Ask Bill Gates.
Watch all the Gates apologists getting all silenced/silent
BBC Gaslights Women Sexually Exploited (Many Under Legal Age) for Its Rich Sponsor, Bill Epsteingate (Gates)
Is this a national broadcaster or a propaganda tool "For Rent"?
Microsoft 'Open' 'AI' Reportedly About to Become Bankrupt, Seeking Emergency Cash Infusion (Loans)
the money promised to Microsoft 'Open' 'AI' failed to arrive
Gemini Links 31/01/2026: Deep Ice and Slide Rules
Links for the day
Writing About Abuse
Never ever allow misogynists to get their way if you strive to live in a decent society
MIT DEDP MicroMasters online learner's blog post about cover-up linked to resignation of Swiss financial regulator
Reprinted with permission from Daniel Pocock
Salary Erosion Procedure (SAP) as the Primary Reason for EPO Strikes
They focus on financials, as the corruption aspects are un-sayable or unspeakable, except in private
IBM Bluewashing: Feels Like IBM is Scuttling Neudesic (and Some of Red Hat)
We recently saw some Red Hat staff joining a Microsoft proxy
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, January 30, 2026
IRC logs for Friday, January 30, 2026
Microsoft Stock Collapsing Due to the Slop Bubble and Microsoft is Hiding Budget 'Black Holes'
Microsoft does not perform like it tells "the media" and "the market"
Gemini Links 30/01/2026: Love and Cultivation, Gemtext Anchors
Links for the day
Will Jim Zemlin Also Sell His Daughter or Only the "Linux" Brand (and Linux Foundation) to Bill Epsteingate?
Torvalds "ate a bug"
The Epstein Files Don't Say the Ages of Those "Russian Girls" Bill Epsteingate Exploited
This E-mail was sent around the time an arrest was made for pedophilia
Only One in 33 EPO Staff Voting on the Strike Opposed It
Kudos to all those who participated in the strike
Still Hoping for "Slop Zero" in 2026
We've also noticed that linuxiac.com shows a glimmer of hope this week
Links 30/01/2026: Waymo Crashing Into 'Small People' (Children), Microsoft at Risk Due to Slop Debt
Links for the day
Amutable’s Management and Founders Are 100% Microsoft!
It'll be focused on promoting Microsoft's agenda in everything it does
IBM Tries to Get Rid of Workers Without Paying Them (and It Appears to be Working)
be sure to speak to people who actually work there
He Has No Money, But He Has Power, He Has a Voice
That's why they envy and attack him
Free Software in Swiss Media This Week
RMS is still going places with his Migros bag (Swiss retail giant)
TV Programs Disseminate False Numbers of Microsoft Layoffs (About 31,000 Laid Off Last Year, Not Including PIPs, Contractors and so on)
large-scale layoffs are inevitable, no matter how long Microsoft delays or procrastinates
Links 30/01/2026: Microsoft's "OpenAI Is Headed For Bankruptcy" and Bitcoin Crashes
Links for the day
Why Would Anybody be Afraid of Talking to Richard Stallman?
We need to get rid of the baseless stigma
Amutable is a Microsoft Proxy Like Xamarin, With Some IBM/Red Hat Staff Added for Good Measure
Amutable chasing money and trying to impose TPM etc. on everybody
The Letter Sent to the Ringleader of the Alicante Mafia This Week
Call for industrial actions to stop the salary erosion of EPO staff
EPO on Strike
organisation operating outside the Rule of Law
Oracle's Debt Exploded by 22 Billion Dollars in 6 Months, the Ponzi Scheme With Scam Altman Was Classic 'Pump and Dump'
The founder of Oracle now uses his wealth for right-wing ideological reasons, nothing else
Facebook ('Meta') is Dead Meat, This GAFAM Company's Debt Exploded by Almost 33 Billion Dollars in Just 3 Months (11 Billion Per Month)
we can expect many sales/contracts to get canceled
Australia's top nurse takes on Musk, Zuckerberg & rogue health influencers, birthkeepers
Reprinted with permission from Daniel Pocock
Affirming What We Already Know: Solicitors Regulation Authority (SRA) is Profoundly Incompetent
"SRA ordered to pay solicitor £50k in costs after failed prosecution"
The "Alicante Mafia" - Part XVI - The Associates of Mr. Cocainegate Don't Want to Talk About Cocainegate (Right of Reply)
Nobody wanted to talk about cocaine at the EPO
The "Open Source" (Corporate Openwashing) Fake Community Rejects Democracy, Open Source Initiative is in Effect Dead
This is basically the end of the OSI
Cracks and Holes in Microsoft's Slop Bubble (Also, Windows is Declining)
"More Bad News For Xbox As Microsoft Blames Gaming For An Annual Decline In Its PC Business"
Microsoft's Debt Exploded by More Than 20 Billion Dollars This Past Year, Says Microsoft
Expect more mass layoffs
Strike at the EPO Today
Next month we'll start a new EPO series
State of the Slop and The Register MS Runs Ads as 'Articles'
Yesterday we could not find much slop about "Linux"
Gemini Links 30/01/2026: Announcing Crossyword and SYN Attack
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, January 29, 2026
IRC logs for Thursday, January 29, 2026