Comment on RAM is so expensive that stores are selling it at market prices
tal@lemmy.today 11 hours agozram, formerly called compcache, is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression. The block device created with zram can then be used for swap or as general-purpose RAM disk. The two most common uses for zram are for the storage of temporary files (/tmp) and as a swap device. Initially, zram had only the latter function, hence the original name “compcache” (“compressed cache”). Unlike swap, zram only uses 0.1% of the maximum size of the disk when not in use.[1]
Open-source RAM is better.
JasonDJ@lemmy.zip 11 hours ago
Using a RAM drive for swap?
Am I misunderstanding the point of swap?
tal@lemmy.today 11 hours ago
It’s a compressed RAM drive being used as swap backing. The kernel’s already got the functionality to have multiple tiers of priority for storage; this just leverages that.
Kinda like RAM Doubler of yesteryear.
Trainguyrom@reddthat.com 6 hours ago
Zram on Linux is awesome! I’ve used it heavily in both memory constrained systems and systems with 16+GB of memory running very poorly optimized code
Running for example, Cities Skylines with 40GB of mods can easily lead to running memory usage being 20-30GB uncompressed. With zram I can load that same mod load out on a 16GB laptop with no swap and it won’t crash where it would crash for being out of memory before.
Another example is Proxmox with over-provisioned lxc containers. Since it’s still the kernel scheduler running all of the processes in those containers zram can keep them all running nicely even when a heavily modded Minecraft server gets a few players online and starts pushing past memory limits, where before I set it up I’d have some of the Minecraft server processes get killed to free up memory resources without warning or proper logging by Minecraft
tal@lemmy.today 4 hours ago
Thanks for the added insights! I haven’t used it myself, so appreciated.
Linux has a second, similar “compressed memory” feature called zswap. This guy has used both, and thinks that if someone is using a system with NVMe, that zswap is preferable.
linuxblog.io/zswap-better-than-zram/
Based on his take, zram is probably a better choice for that rotational-disk Celeron, but if you’re running Cities: Skylines on newer hardware, I’m wondering if zswap might be more advantageous.