Title is a bit misleading, and I think intentionally, which kinda irks me. It isn’t a 400x speedup of RAM by means of compression. If I understood correctly, it’s 400x speedup compared to disk read for swap.
Please correct me if I’m wrong here. I’d love some positive news from the IT world that isn’t depressive. (edit: I implied this wasn’t. It is. I’m just not sure of the actual impact)
It’s a little better than your read. The ~400x speedup is in comparison to using ZRAM, which, in very brief terms, compresses memory by creating an in-memory compressed block device and assigning that as your swap space. So your “swap” is actually a compressed chunk of RAM, not on disk.
This was significantly slower than normal memory access because page faulting when looking up something in memory then fetching from swap was, itself, expensive. Regardless of how fast that swap was. When your swap is on a storage device that overhead is comparatively tiny, but when it’s just another chunk of memory suddenly it’s what you’re spending most of your time on.
Fuck yea, RAM swap? I bought both my laptop and desktop when RAM was cheap, and got more memory than I needed. I can safely allocate like 12GB to CRAM!
The win from CRAM is that it is not swap, and operates using mostly normal RAM semantics. If it works as advertised you should be able to allocate most (all?!) of your RAM as CRAM.
I would guess this is only useful in servers, as for day to day use you ideally want the lowest latency you can for responsiveness. That said, if there’s a way you can specify which type processes can use, that may be useful in some cases
I’m not sure if this is misleading at all. If anything, they should have mentioned compared to ZRAM. Title is incomplete, but I don’t think it is intentionally misleading here. It just looks like they expect the reader to know CRAM is a replacement for ZRAM. The new compression method CRAM with over 400x speedup is compared to ZRAM method:
A new compression model, called CRAM, offers a different path to compression that avoids swap entirely by keeping the compressed data in memory, and it offers up to 452x the performance of ZRAM.
Because CRAM is stored in RAM and treated as RAM, with full cacheline/byte access, it can be accessed in a read-only fashion with little delay; just the cost of hardware-offloaded compression. As a result, CRAM “runs at DRAM speed,” as the creator says in the slide above. While the graph already looks impressive, it’s a logarithmic scale; CRAM, in the worst case, is doing 489 million operations per second versus ZRAM’s 1.1 million. It’s barely comparable.
Even when you enable writes, CRAM is still much faster than ZRAM; 5.4x in the worst tested case of 20% writes. That’s a huge drop from the 452x read-only case, but keep your context; a 5.4x speedup is still titanic.
Is writes enabled CRAM / ZRAM common? If so, then the post title is definitely misleading.
Let me use my Raspberry Pi 3b as a practical example of what @vithigar@lemmy.ca was explaining. I run PiHole + Unbound on the Raspberry Pi 3b, with 1GB of ram. The main killer for a little Pi 3b is reading and writing to the SD card. We want to avoid that as much as possible. Block lists get updated weekly, so that’s no big deal, but there is still a lot of traffic information that is being kept track of. The solution is to load all of that into zram. As you can imagine, on a slow and resource constrained system like a Pi 3b, any performance enhancement has a huge impact. A 452x performance increase over ZRAM on a system that mostly lives on ZRAM is massive.
I am not entirely sure about this but I imagine that this is also massive news for live operating systems like Tails and Kali Live.
Title is a bit misleading, and I think intentionally, which kinda irks me. It isn’t a 400x speedup of RAM by means of compression. If I understood correctly, it’s 400x speedup compared to disk read for swap.
Please correct me if I’m wrong here. I’d love some positive news from the IT world that isn’t depressive. (edit: I implied this wasn’t. It is. I’m just not sure of the actual impact)
It’s a little better than your read. The ~400x speedup is in comparison to using ZRAM, which, in very brief terms, compresses memory by creating an in-memory compressed block device and assigning that as your swap space. So your “swap” is actually a compressed chunk of RAM, not on disk.
This was significantly slower than normal memory access because page faulting when looking up something in memory then fetching from swap was, itself, expensive. Regardless of how fast that swap was. When your swap is on a storage device that overhead is comparatively tiny, but when it’s just another chunk of memory suddenly it’s what you’re spending most of your time on.
Fuck yea, RAM swap? I bought both my laptop and desktop when RAM was cheap, and got more memory than I needed. I can safely allocate like 12GB to CRAM!
The win from CRAM is that it is not swap, and operates using mostly normal RAM semantics. If it works as advertised you should be able to allocate most (all?!) of your RAM as CRAM.
I would guess this is only useful in servers, as for day to day use you ideally want the lowest latency you can for responsiveness. That said, if there’s a way you can specify which type processes can use, that may be useful in some cases
Depends on the workload. This probably would not be great for gaming or audio production, but it might be for video editing and local LLMs
And for gluttonous browsers and browser-based apps
I’m not sure if this is misleading at all. If anything, they should have mentioned compared to ZRAM. Title is incomplete, but I don’t think it is intentionally misleading here. It just looks like they expect the reader to know CRAM is a replacement for ZRAM. The new compression method CRAM with over 400x speedup is compared to ZRAM method:
Is writes enabled CRAM / ZRAM common? If so, then the post title is definitely misleading.
Let me use my Raspberry Pi 3b as a practical example of what @vithigar@lemmy.ca was explaining. I run PiHole + Unbound on the Raspberry Pi 3b, with 1GB of ram. The main killer for a little Pi 3b is reading and writing to the SD card. We want to avoid that as much as possible. Block lists get updated weekly, so that’s no big deal, but there is still a lot of traffic information that is being kept track of. The solution is to load all of that into zram. As you can imagine, on a slow and resource constrained system like a Pi 3b, any performance enhancement has a huge impact. A 452x performance increase over ZRAM on a system that mostly lives on ZRAM is massive.
I am not entirely sure about this but I imagine that this is also massive news for live operating systems like Tails and Kali Live.