3 ms·
Because it slows down as you use more RAM compression, so you have time to respond and close some apps. Without it you are working at a thousand miles an hour a
by flashback2199 3y ago
Because it slows down as you use more RAM compression, so you have time to respond and close some apps. Without it you are working at a thousand miles an hour and then suddenly, brick wall.
- Karellen 3y ago> Because it slows down as you use more RAM compression, Wait, are you claiming RAM compression uses an adaptive compression factor that compresses more as memory pressure grows? Are you sure that's how it works?
- flashback2199 3y agoIn the case of zram, it reserves a portion of the physical RAM, and when the remaining physical RAM portion runs out, it begins compressing ram into the reserved portion. So the system slows down a bit as this compression starts happening. Nothing really adaptive about it to my knowledge but the result to the user is a noticeable slow down when there is high ram usage, which is a heads-up to me to close some stuff. Without it the system just locks up as soon as physical RAM is exhausted, without any warning, since it's fast up until that moment. Hope this makes sense. I'm not an expert on zram or other Linux RAM compression packages, so can't really answer questions about it beyond that.
- bityard 3y agoAh yes, the old, "you should enable swap so that when your RAM fills up, you know about it when the disk starts thrashing and all I/O grinds to a near-halt." I mean, swap is useful, but that's not what it's for. Same is true for compressed RAM. If you want an alert for low available RAM, it seems like it would be better to write a script for that.
- flashback2199 3y ago> disk starts thrashing and all I/O grinds to a near-halt Nope, neither of those things happen when zram starts compressing ram. Nothing grinds to a near halt until the compressed RAM space is used up, it just slows down a little bit. Btw, compressed RAM via zram isnt swap, it's available as actual ram. It also increases the total amount of ram available. I don't think I need to make arguments in favor of ram compression since Windows and macOS both have ram compression by default.