3 ms·
As I understand it "download more ram" was a stupid advertisement for a real and effective thing. Downloading a utility that uses compressed ram as swap space,
by gpm 4y ago
As I understand it "download more ram" was a stupid advertisement for a real and effective thing. Downloading a utility that uses compressed ram as swap space, allowing for greater effective memory usage.
You can still do this today, on linux, where it isn't the default for some reason. Though downloading anything isn't necessary. Run the following as root.
modprobe zram
echo lz4 >> /sys/block/zram0/comp_algorithm
echo 128G >> /sys/block/zram0/disksize
mkswap --label zram0 /dev/zram0
swapon --priority 100 /dev/zram0
Then go compile something that requires 2x the amount of ram actually in your system and watch it "just work". I recommend cvc5 if you're looking for something that takes way too much ram while compiling (make -j16 got me up to 100GB before I killed it... on a 32GB system): https://cvc5.github.io/docs/cvc5-1.0.2/installation/installation.html https://cvc5.github.io/docs/cvc5-1.0.2/installation/installa...
I suppose "download more crypto" could be a real thing too, it's just called "mining" for some reason.
- cowtools 4y agozram isn't default because it adds additonal CPU overhead and can't always compress data efficiently. Sometimes it is better for a program to just run out of memory and crash than go to swap I suppose it's similar to "download more crypto" mining in the sense that there is a CPU tradeoff.
- gpm 4y agoMy experience without zram has been that running out of ram almost always crashes (without a swap partition) or locks up (with a swap partition) my entire computer. My experience with it has been that running out of ram almost always slowly degrades performance, but keeps the system responsive. I haven't noticed any noticeable CPU overhead when not running out of ram - nor should there be any. It is the default on windows and mac for good reason. I'm a pretty strong believer that nearly all desktop linux users, and most server users, would benefit from it as well.
- reaperducer 4y agoadvertisement for a real and effective thing There used to be a bunch of different RAM compressors. They were very popular. I think one was called "Stacker."