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

Converting FOSDEM Talk on Software Patents in Europe Into Formats That Work for "FOS" and Don't Have Software Patent Traps
transcoded version of the video
Biggest "AI Companies" (Meta, Alphabet, Microsoft) Borrowed (Additional Debt) About $100,000,000,000 in a Year
Who will be held accountable for all this?
In 2009 Microsoft Was Valued at ~150 Billion Dollars, Now They Tell Us Microsoft Lost ~1,000 Billion Dollars in Value. Does That Make Sense?
Or Microsoft lost 700 billion dollars in "value" in less than two weeks
Microsoft Stock Crashed When Alleged Vista 11 Numbers Disclosed
And last summer Microsoft indicated that it had lost 400 million Windows users
It's Not About Speed, It's About the Message (or Its Depth)
Better to write news than to just link to news if there's commentary that the news may merit
 
The World Gets Smaller, as Does Its Real Economy ('Human Resources') and So-called 'Natural Resources' (What Humans Call the Planet)
Don't talk about "AI"
Links 07/02/2026: More White House Racism, "Europe Accuses TikTok of Addictive Design"
Links for the day
Silent Mass Layoffs: It's Not the Revolution, It's the Loophole and the Hack ("Low Performers" or "Underperformers")
Layoffs by another approach
Mark Shuttleworth (MS) Pays Salaries to Microsoft (MS) Employees
Canonical selling Microsoft
Links 07/02/2026: Windows TCO Rising, Lousy Patents Invalided
Links for the day
Microsoft Leadership: Stop Taxing Us, Tax Only Poor People
Does Microsoft create jobs?
In Case You've Missed It (ICYMI), Google's Debt More Than Doubled in a Year
Wait till it "monetises" billions of GMail users with slop
PIPs and Silent Layoffs at IBM (and Red Hat) Still Going on, It's "Forever Layoffs" (to Skirt the WARN Act)
American workers out
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, February 06, 2026
IRC logs for Friday, February 06, 2026
Stressful Times for Team Campinos ("Alicante Mafia") at Europe's Second-Largest Institution
Keep pushing
Growing Discrimination in the European Patent Office (EPO)
it's a race to the bottom, basically
Google News Drowning in (or Actively Promoting) Slopfarms Again
LLM slop is a nuisance
Gemini Links 07/02/2026: "Choosing a License for Literary Work" and "Social Media Is Not Social Networking (Anymore)"
Links for the day
Gemini Links 06/02/2026: Git and Email Patches; MNT Pocket Reform
Links for the day
Geminispace Net Growth in 2026 About a Capsule a Day
A pace like this means net gain of ~300 per year, i.e. about the same as last year
Benjamin Henrion Warned About the Illegal and Unconstitutional Unified Patent Court (UPC) in FOSDEM 2026
Listen to Benjamin Henrion
Economies Crashing Not Because of Slop Improving 'Efficiency' (That's a False Excuse) and 'Expensive' (Read: Qualified) Workers Discarded in Race to the Bottom
Actual cocaine addicts are pushing out moral people
IBM's CEO Speaks of Layoffs, Resorts to Mythical (False) Excuses
This has nothing to do with slop
Links 06/02/2026: Voter Intimidation and Press Shutdowns in US, Web Traffic Warped by LLM Sludge
Links for the day
Does Linux Torvalds Regret Having Dinners With Bill 'Russian Girls' Gates?
See, the rules that govern the Linux Foundation and its big sponsors aren't the same rules that apply to all of us
IBM: Cheapening Code, Cheapening Staff, Cheapening Everything
IBM's management runs IBM like it's a local branch of McDonald's. IBM is a junk company with morbid innards.
GNU/Linux Measured at 6% in One of the World's Largest Nations
Democratic Republic Of The Congo
Linux Foundation Operative Says We and Our Software All "Owe an Enormous Debt of Gratitude" to a Software Patents Reinforcer
The only true solution is to entirely get rid of all software patents
Mobbing at the European Patent Office (EPO) - Part IV - EPO Can Get Away With Murders, Suicide Clusters, and Systematic and Prolonged Bullying by 'Team Campinos' ("Alicante Mafia" as Insiders Call It)
Nobody in the Council or the EU/EC/EP gives a damn as long as laws are broken to fabricate 'growth'
Jeff Bezos Isn't Just Killing the Washington Post, He's Killing Thousands of News Sites/Newsrooms (in Dozens of Languages) That Rely on It for Many Decades Already
Not just slopfarms; even the Ukraine-based reporters are culled by Bezos, who's looking to please the dictators of the world
Central Staff Committee Confronted António Campinos for Giving His Cocaine-Addicted Friend Over 100,000 Euros to Do Nothing, Just Pretend to be Ill, While Cutting the Salaries of Everybody Else
"On the agenda: Amicale framework & Financial assistance for courses"
How to Win Lawsuits in 5 Simple Steps
Keep issuing threats every week and send 60 kilograms of legal papers to the target
More Than 99% of "AI" Companies Aren't AI, They're Pure BS
We need to discard those stupid debates about "AI" and reject media that gets paid to participate in such overt narrative control (manipulation like The Register MS)
AI Used to Save Lives, Now "AI" is a Grifting Scheme That Burns the Planet and Will Crash the Economy
What the media calls "AI" (it gets paid to call it that) is the same stuff that could instead be dubbed "algorithms"
Living in Freedom When 'False Flag Operations' Like EFF Get Captured by Billionaires to Take Freedom Away
There are many ways to think of Software Freedom
Amutable is a Microsoft Siege Against Freedom in GNU/Linux, Just Like the People Who Brought You 'Secure Boot' Controlled by Microsoft
Do whatever is possible to avoid Amutable and its "products"
Growing Focus on Publication
Over the past ~10 days we always served more than a million Web hits per day
"Going to be a large number of Microsoft layoffs announced soon"
Everybody knows a giant wave of layoffs is coming Microsoft's way
End of the 'GPU Bubble' and NVIDIA Finally Admits It Won't Bail Out Microsoft OpenAI Anymore
circular financing (financial/accounting fraud)
Corrupt Media Won't Hold Accountable Rich People for Role in Pedophilia
Journalistic misconduct or malpractice is a real thing
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, February 05, 2026
IRC logs for Thursday, February 05, 2026
EPO Management ("Alicante Mafia") Not Properly Sharing Information on Scale of Strikes by EPO Staff
disproportionate (double) deductions in salaries against people who participate in strikes, which are protected by law
Gemini Links 06/02/2026: Slop/Microslop, Home Assistant, and Valid Ex Commands
Links for the day
Blackmail evidence: Debian social engineering exposed in ClueCon 2024 talk on politics
Reprinted with permission from Daniel Pocock
Bitcoin crash: opportunity or the end game?
Reprinted with permission from Daniel Pocock
Changes at the Solicitors Regulation Authority (SRA)
SRA is basically a waste of money
Claims That IBM Will Lay Off 20% (or 15%) of Its Workforce This Year Unless It Finds a Way to Push Them All Out by Threats, Shame, Guilt
Where are the articles about IBM layoffs?
IBM Isn't a Serious Company Anymore, It's a Ponzi Scheme Operated by a Clique and It Misuses Companies It Acquires to Prop Up or Legitimise the Scheme
IBM seems like it's nothing but a "Scheme"
Google News Drowning in Slop About "Linux" (Slopfarms Galore)
Google should know better than to link to any of these slopfarms, but today's Google is itself a pusher of slop
Links 05/02/2026: EU Commission Gutting Net Neutrality
Links for the day
Gemini Links 05/02/2026: NixOS Books and Monochrome Emojis
Links for the day
Links 05/02/2026: Canadian Government Uses US LLMs to Override Expert Opinions, NVIDIA Troubles Due to Enablement of Mass Plagiarism ('Piracy') Misleadingly Obscured as "Hey Hi"
Links for the day
Explaining the Letter From JUDGE SYKES FRIXOU, Threatening Me Around the Time GNOME's Nat Friedman Lost His CEO Job at Microsoft GitHub and His Best Friend Got Arrested for Strangulation
this letter (with annotation) is critical
Linuxiac Not Rehabilitated, It's Still Full of LLM Slop (Part of a Trend)
The Web as a resource/source of information is perishing
"Sponsored by Azul" to Write Fake 'Article' About Azul, Quoting Azul Itself
The "journalism" industry [sic] became so utterly corrupt
JuristGate is for sale: three billion Swiss francs for a domain name
Reprinted with permission from Daniel Pocock
Like Microsoft and IBM, the 'Alicante Mafia'-Governed EPO Does PIPs Nowadays (at the EPO, It's "Professional Incompetence Procedure")
So "PIPs" are definitely in the EPO and we saw letters sent to staff
Time for Change, More New Articles, Less Curation
The oligarchy wants to gut the real press and replace media with slop and social control media (or social control media with slop in it, i.e. their own voices, mechanised)
Gemini Links 05/02/2026: Coercion, Antibiotics, and LVDT Project
Links for the day
Almost 1,600 EPO Employees Went on Strike Last Week
There is another strike coming 2.5 weeks from now
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, February 04, 2026
IRC logs for Wednesday, February 04, 2026