292 points by Ecno92 about 24 hours ago | 235 comments | View on ycombinator
varenc about 16 hours ago |
Lio about 22 hours ago |
Since the models are effectively highly compressed data already my assumption is that RAM compression won't help improve that much (I'm assuming unified memory here as per the Framework Desktop). A bit like trying to compress a JPEG in a zip file.
Could anyone comment on that?
hedgehog about 16 hours ago |
jakozaur about 21 hours ago |
Yes, macOS has had it enabled by default since OS X Mavericks 10.9, released in October 2013. I’m surprised some desktop Linux distributions still require manual configuration to enable it.
For browser tabs, though, I think a better solution is automatic tab closing, using something like the Tab Wrangler extension for Chrome. Collecting tabs comes naturally; we’re much worse at closing them.
cogman10 about 17 hours ago |
https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-...
flowerlad about 15 hours ago |
[1] https://en.wikipedia.org/wiki/SoftRAM
[2] https://devblogs.microsoft.com/oldnewthing/20211111-00/?p=10...
sammatilda about 22 hours ago |
I am hoping to switch my dad from ubuntu to fedora in a month or so because he has 16 GB ram and this seems like something most people dont know.
nukanse about 21 hours ago |
Waterluvian about 7 hours ago |
Juvination about 17 hours ago |
roosgit about 23 hours ago |
certyfreak about 21 hours ago |
noodlesUK about 13 hours ago |
jmakov about 13 hours ago |
If my understanding is correct, both ZRAM and ZSWAP write uncompressed pages to disk. And both don't pack the pages together meaning even if we'd write compressed pages (let's say they compress 5:1), we'd still write the original size to disk. This is crazy.
trelliumD about 9 hours ago |
cyh555 about 3 hours ago |
myrandomcomment about 17 hours ago |
aktenlage about 20 hours ago |
Isn't that wasteful? The CPU's caches may help a bit, but I would guess first a huge block is going through the decompression, so only the last bits are still in the cache, when the actual usage starts.
Lerc about 17 hours ago |
I find that the ratio of browserish memory use to that of other programs is enough to render the latter insignificant most of the time.
rustyhancock about 21 hours ago |
What's interesting to note is that I've occasionally wondered why isn't the swap partition compressed.
If you have it on an NVMe drive it probably is as is all data! The controller usually transparently does it as it writes to/from NAND.
So the kernel sees uncompressed fixed block pages and the speed boosts happen with data arriving faster when read or written to flash.
2001zhaozhao about 12 hours ago |
manbash about 5 hours ago |
zamalek about 13 hours ago |
I recall reading an article around the time the Windows team added it (back when I still used the OS). Their compression algorithm was typically faster than the latency to the prevailing disk type at the time (SATA SSD, most likely) - at the time it had zero downsides. I'm not sure if that still holds true.
On Linux it generally doesn't: off-the-shelf compression is used, which do not outpace storage access latency.
altcognito about 16 hours ago |
If it avoids hitting the disk I get it, but to some of us, that just means it's time to buy more RAM
72deluxe about 19 hours ago |
Gehinnn about 9 hours ago |
pyaamb about 16 hours ago |
angst about 6 hours ago |
Ecno92 about 24 hours ago |
Instead of buying more RAM, which meant that I should replace my device, I decided to implement zram. This compresses memory. Now I can do more with the same hardware.
In many cloud environments compression is not enabled. I am curious to see if the same gains can be made in such environment.
IronWolve about 16 hours ago |
grandlimelabs about 15 hours ago |
baud9600 about 21 hours ago |
bullish-bearr about 12 hours ago |
po1nt about 10 hours ago |
ChrisRR about 22 hours ago |
It sounds like those are downsides
djha-skin about 12 hours ago |
kiicia about 21 hours ago |
larodi about 11 hours ago |
yummybear about 22 hours ago |
Which one is it?
vjvjvjvjghv about 13 hours ago |
distantsounds about 17 hours ago |
1970-01-01 about 15 hours ago |
lorenzohess about 6 hours ago |
claytongulick about 6 hours ago |
As a teenager, a company called Stacker that made a "RAM doubler" for DOS hired him to write their compression algorithms.
Hearing him talk, I felt like he was some sort of wizard - I wanted to be in that club.
He inspired a 30 year career in software development.
bismanawaz about 15 hours ago |
1023bytes about 16 hours ago |
tooheavy about 17 hours ago |
anizan about 11 hours ago |
anizan about 11 hours ago |
fernandogrd about 17 hours ago |
fred_is_fred about 17 hours ago |
pshirshov about 17 hours ago |
cubefox about 21 hours ago |
tonymet about 13 hours ago |
It's a remarkable tech that deserves more attention. Swap is back in style!
UltraSane about 16 hours ago |
undefined about 21 hours ago |
LoganDark about 21 hours ago |
dmitrygr about 10 hours ago |
dist-epoch about 21 hours ago |
Technically yes, practically on Windows memory compression is not used.
I have Windows 11, 128 GB RAM, and my memory stats show: 42 GB in use, 380 MB compressed.
jauntywundrkind about 21 hours ago |
That's for RDB persistence. https://valkey.io/topics/persistence/
I wonder if there's any similar wins with ram? That some workloads would see net wins from compression. Some cost of cpu, but increasing net throughput significantly.
hinkley about 21 hours ago |
varispeed about 15 hours ago |
As usual, working class is being told to tighten the belts whilst the rich get insanely richer.
Fuck that.
DeathArrow about 21 hours ago |
Still perfectly usable and I won't upgrade until prices come down. Even used prices are terrible now.
mzhaase about 22 hours ago |
> If in doubt, prefer to use zswap. Only use zram if you have a highly specific reason to.
> In terms of architecture:
> zswap sits in front of your disk swap, compresses pages in RAM, and automatically tiers cold data to disk. It integrates directly with the kernel's memory management and distributes pressure gracefully.
> zram is a compressed RAM block device with a hard capacity limit. When you put swap on it and it fills up, there is no automatic eviction, and the kernel has very little leverage to do anything about the situation. The system either OOMs or falls back to lower-priority swap, causing LRU inversion (see below). It only really makes sense for extremely memory-constrained embedded systems, diskless setups, or cases with specific security requirements around keeping private data off persistent storage. Swap on zram is also increasingly unsupported upstream.
ejazarain about 20 hours ago |
messe about 22 hours ago |
https://linuxblog.io/zswap-better-than-zram/
https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-...
VCFundedGenYer about 18 hours ago |
Of course, it would be far better to just not have the memory leak...but in the mean time, macOS memory compression is making the leak nearly a none issue.