Top
Best
New

Posted by Ecno92 12 hours ago

Do not buy RAM, compress(curiousbits.nl)
190 points | 159 commentspage 3
rustyhancock 9 hours ago|
I've used zswap on most of my systems and generally find it beneficial especially as (de)compression can be very fast these days.

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.

mkesper 4 hours ago||
Where did you get that info? Sounds suspicious.
deltoidmaximus 2 hours ago||
I didn't think controllers generally did any compression but I remember once that on old sandforce controllers if you did something like write all zeros it wouldn't actually overwrite anything instead just mapping to another block of zeros. Which sounded more like on device dedupping than compression.
close04 5 hours ago||
> I've used zswap on most of my systems and generally find it beneficial

I started using zswap recently but didn't have the time yet to measure the benefit. Does it benefit machines with low amounts of RAM and wimpy CPU (like a RPi3)?

> The controller usually transparently does it as it writes to/from NAND.

In the consumer SSD space the last controllers I know did on-the-fly compression were SandForce [1], probably 15 years ago, when minimizing writes and saving the little capacity available was imperative. I don't think any other desktop SSDs do this now. A bit more common in enterprise models like ScaleFlux CSD.

[1] https://en.wikipedia.org/wiki/SandForce#Products

pyaamb 4 hours ago||
I wonder what the theoretical limits are of semantic compression for LLM input/output (eg. "Can you please send me the final report by Friday?" -> "Send final report by Friday." -> sr(FINAL, DEADLINE=FRIDAY)) that can still be recovered back to English
NegativeLatency 4 hours ago|
https://github.com/microsoft/LLMLingua one such library I’m aware of

Tried porting it to swift, was hoping it would make mobile local models more useful for a project I was working on but it was hurting the accuracy too much. Can be very task dependent on how much you can compress. https://github.com/nburns/llmlingua-swift

My specific use case was using a LLM on segments of labeled data from a different faster model as a final pass.

grandlimelabs 3 hours ago||
Make sure to stress-test compression and decompression for whatever you're doing before you go jumping into relying on it, though.
IronWolve 4 hours ago||
I remember the compression rage back on my amiga, had both ram and file compression, since you had to get as much room as you could with limited ram and a floppy.
1970-01-01 3 hours ago||
This feels like the kind of thing that leads to 0day. Compression can defeat security. Delta frames. Compression bombs.

https://www.youtube.com/watch?v=4icQwducz68

https://www.youtube.com/watch?v=IXkX2ojrKZQ

bismanawaz 3 hours ago||
I was wondering if its the agents itself or the browsers that they open fill up the RAM?
72deluxe 7 hours ago||
Having viewed that page, I cannot fathom how Firefox is using 27GB of RAM in his screenshot?!
alpaca128 5 hours ago||
I've seen a single YouTube browser process use 8GB on my desktop, so I'm not that surprised. YT eats up whatever is available if you leave some tabs open for long enough, fortunately about:processes exists.
Sopel 5 hours ago||
from my experience it would require roughly 100 active youtube tabs
djha-skin 27 minutes ago||
This guy already had 32GB RAM. I know that's "standard" or whatever but it's surprisingly difficult to afford when you already have an 8GB laptop at home that still works on Linux. Would be interesting to see someone trick out a low-powered 4GB one, I would find that very interesting.
ChrisRR 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

It sounds like those are downsides

Ecno92 8 hours ago||
I believe I have written this not in the best way. (I have uploaded a slightly improved version)

I did not really notice a large performance impact.

Unless you are in an environment where compute performance is critical, I think this is something interesting to try.

Rohansi 9 hours ago|||
It's basically in-memory swap. If you have swap then you already have the added latency (but worse) and I/O usage instead of CPU. Like swap, the downsides only come into play under high memory pressure.
aa-jv 8 hours ago|||
They are downsides in cases where an application has to escalate a critical fault as quickly as possible - indeed where every nanosecond counts - and a process waiting for page restoration is going to be delayed even an intolerable amount.

It should be a user switch and probably will become one in most Linux desktop distributations, I would wager. However, I would not enable it - I run Ubuntu Studio for every last little bit of latency it gives me in a realtime audio-capture application, and on those systems were it to become default-on by way of distro update, I'd be kinda miffed.

xxs 9 hours ago|||
That's a terrible statement. Perhaps it can apply to certain setups where compression (and decompression) shows decent results, in lots of applications it'd be a massive downgrade.
Rohansi 9 hours ago|||
zram does not compress all of your RAM. It only compresses inactive blocks of memory that would be eligible for swap, if you had swap enabled.
aa-jv 8 hours ago|||
The distinction is in the distribution - is the Linux bootable for an end user or is it for a rack-mount industrial application - since anyway the kernel configuration has to be involved to have zswap effectively applied at kernel runtime.
Stitch4223 9 hours ago|||
They are not selling it well.

It’s like saying that in order to breathe you have to use your nose or mouth. Which is bad if you want to retain the oxygen that is inside your lungs.

There are always scenario’s where memory compression is an outright bad idea. Just like trying to breathe under water.

MadameMinty 9 hours ago|||
"does not come without downsides" + "does come with downsides" race condition
vjvjvjvjghv 1 hour ago|
Looks like I need to find my old SoftRAM floppy disk. Maybe somebody can come up with something that saves memory that's not used much to disk?
More comments...