Top
Best
New

Posted by Ecno92 12 hours ago

Do not buy RAM, compress(curiousbits.nl)
192 points | 163 commentspage 4
kiicia 9 hours ago|
nice try Ram Altman
distantsounds 5 hours ago||
Hilarious ending to the article. You expect some implementation details with a Getting Started section, instead you get a "check the arch wiki" link.
nchmy 3 hours ago|
Yeah that was disappointing
yummybear 10 hours ago||
"Compressing memory does not come with downsides. It takes a little bit more from your CPU and adds latency to some processes"

Which one is it?

Ecno92 12 hours ago||
Since I am using Claude with parallel sessions in different workspaces I started to run out of RAM.

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.

XYen0n 10 hours ago|
You can enable it yourself, for example using https://github.com/systemd/zram-generator.
Ecno92 9 hours ago||
I did! I am actually the author of the post! ;-)
aa-jv 8 hours ago||
Great article, thanks for sharing the details .. only thing I'd add is that you should put a bit of emphasis on the fact that this is not a one-size fits-all setting - users should very much apply it when appropriate to their latency budgets...
tonymet 1 hour ago||
I was load testing micro VMs with zswap and i was blown away by how much capacity the machine could have. forking thousands of processes, using 2.5x the available ram, and the server still hums along, albeit a bit sluggish. but no timeouts or lockups. still very accessible.

It's a remarkable tech that deserves more attention. Swap is back in style!

baud9600 9 hours ago||
You’d hope with these amazing GPUs today, that some cycles can be used to compress RAM very efficiently. So many parallel cores, surely we can get even better compression from this latent hardware?
BenjiWiebe 5 hours ago|
I'm under the impression that GPU latency is the problem here for on-the-fly de/compression.

There might be gains by having the GPU recompress with a higher compression level in the background though.

tooheavy 5 hours ago||
Compression is fine as long as the CPU doesn't become the bottleneck.
1023bytes 5 hours ago||
Do not buy RAM, download more RAM
fernandogrd 5 hours ago||
Things I did: - Zswap instead of zram. - Unload browser tabs (my own private extension. - Force idle cli AI agents to go to disk swap earlier.
LoganDark 9 hours ago|
Windows doesn't do memory compression if the page file is not enabled. I never particularly saw the point of the page file because I don't enjoy swapping, but it appears that the memory management system disproportionately depends on it to the point where it simply refuses to work properly with it off. So make sure that's turned on if you want memory compression. (Do not let it auto-size or it will happily fill up your whole drive, set it to something reasonable)
vardump 2 hours ago|
Windows needs to have a backing store for every page allocated.

So shouldn’t disable pagefile, unless it’s a disk space issue. Windows probably won’t use it much anyways if you have enough RAM.

LoganDark 52 minutes ago||
I thought the point of memory compression was fitting more pages into the same memory, by compressing their contents when they're not being used. It doesn't make sense that you would still need to have memory for every page, as that prevents you from getting more out of the same memory, doesn't it?

SSDs make swapping less of an issue, but it's still something I'd rather not allow to ever happen, as it's difficult to get swapped-out pages back into memory without exercising every single application on the system.

I thought memory compression was a replacement for swapping entirely, because you don't need to evict from memory, you can just compress it.

More comments...