Top
Best
New

Posted by Ecno92 12 hours ago

Do not buy RAM, compress(curiousbits.nl)
196 points | 167 commentspage 5
fred_is_fred 5 hours ago|
What's old is new again! https://apple.fandom.com/wiki/RAM_Doubler
esafak 4 hours ago|
This used to be a whole product category. For hard drives too!

DiskDoubler, Stacker, SuperStor, DoubleDisk...

pshirshov 5 hours ago||
Vectors do not compress.
UltraSane 4 hours ago||
IBM Power systems have hardware RAM compression.
cubefox 9 hours ago||
So why is zswap (basically zram+swap) not enabled by default everywhere?
ChocolateGod 4 hours ago||
zswap works very differently to zram.
aa-jv 9 hours ago||
Because it is a user choice, and there are applications where it is inappropriate. For desktop Linux it should probably be on, as long as its clear to the user - but yeah, for many other Linux use cases its inappropriate.
jrmg 6 hours ago|||
“Because it is a user choice”

That’s true of everything. Default setups make those choices.

cubefox 8 hours ago|||
Maybe it should generally be on and and only switched off when it is inappropriate.
cestith 5 hours ago||
Maybe it should be generally on for desktop-focused distros and generally off for server-focused ones. The distros that focus on doing both well might want to recommend it in the installer when told it's primarily a desktop installation and explain the tradeoffs.

For a server, it really depends on what kind of service you're providing whether it would be helpful. We might want to let server admins, SREs, production engineers, or platform engineers to make an active decision about it.

cubefox 5 hours ago||
I have a hard time imagining cases where swapping or running out of RAM is preferable to RAM compression.
cestith 4 hours ago||
In most cases you'll really want zswap rather than zram anyway.

There are plenty of scenarios in which servers are run with only nominal swap sizes or none at all and systems don't run out of RAM.

Let me size my hypervisor cluster to demand and let the system decide where to place the guests. If the hypervisors are crashing due to full RAM, that's down to planning or budget issues and not a reason to put additional unpredictable latency underneath the guests.

Let me size my SDI to UDP TS video streaming servers to the number and size of streams they'll service. There's not much in their memory pages that's going to ever be idle enough to compress, so why boot the kernel configured to do that? It's just risking extra packet IAT for buying not much benefit.

But in general, yes, zswap would be a good thing compared to swapping to a drive, unless you are mostly swapping things that are really truly idle a long time. Default swappiness on a lot of distros is around 60 by the way, and on servers it's often set closer to 10 or 15.

dist-epoch 9 hours ago||
> If you have a Windows or Mac device you are already using it

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.

sheo 9 hours ago|
You have plenty of RAM free. Compressing at that point is increasing latency for no good reason. Unused RAM is wasted RAM

I'm a Linux user myself, but I think it would start compressing it when there would be less than 25% free

jauntywundrkind 10 hours ago||
In many systems, adding compression makes not just storage better but increases the io you get from a system too. Here's Valkey 9.2 compression figures showing that: https://www.phoronix.com/news/Valkey-9.2

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 9 hours ago||
Okay, Johnny Mnemonic.
varispeed 4 hours ago||
Do not eat, drink water.

As usual, working class is being told to tighten the belts whilst the rich get insanely richer.

Fuck that.

ifloop 2 hours ago|
just download more RAM
DeathArrow 10 hours ago|
I have built my PC with core i7 14700K, RTX 3090,128 GB DDR3, 2TB SSD, 8TB HDD about 3 years ago.

Still perfectly usable and I won't upgrade until prices come down. Even used prices are terrible now.

globular-toast 10 hours ago||
Mine is an i7 4790K with 32GB of RAM and it's more than usable, I find it quite nippy.

The main thing I regret is not maxing out the memory on my server. At first 32Gi seemed more than I'd ever need, but now it's feeling quite anaemic.

theandrewbailey 10 hours ago||
> 128 GB DDR3

Typo DDR5?

DeathArrow 9 hours ago|||
Yes, it was a typo, I use DDR4.
xxs 10 hours ago|||
of course, it supports only that type of memory. 128GB on a desktop 2 ram channel machine is massive, too
theandrewbailey 9 hours ago||
14700K supports both DDR5 and DDR4:

https://www.intel.com/content/www/us/en/products/sku/236783/...

More comments...