3 ms·
Because it's transparently compressed, so you get more RAM out of your RAM at the cost of some latency and CPU usage. This is a good tradeoff on heavily RAM con
by Kliment 7y ago
Because it's transparently compressed, so you get more RAM out of your RAM at the cost of some latency and CPU usage. This is a good tradeoff on heavily RAM constrained workloads like attempting to run Slack clients.
- flatiron 7y agoI’m not sure why they went through all that hassle when there is zswap. That’s what I use for low ram devices.
- deleted 7y ago[deleted]
- Kliment 7y agoIn this case, because the storage device that's there by default is optimized for low power and not high speed, so RAM is dramatically faster. They implemented swap as well but only as a last resort when the compressed RAM runs out.
- zamadatix 7y agoSounds exactly like what zswap does out of the box. "Zswap is a kernel feature that provides a compressed RAM cache for swap pages. Pages which would otherwise be swapped out to disk are instead compressed and stored into a memory pool in RAM. Once the pool is full or the RAM is exhausted, the least recently used (LRU) page is decompressed and written to disk, as if it had not been intercepted." https://wiki.archlinux.org/index.php/Zswap https://wiki.archlinux.org/index.php/Zswap
- ashitlerferad 7y agoFrom that wiki page you linked to: "The difference compared to zram is that zswap works in conjunction with a swap device while zram is a swap device in RAM that does not require a backing swap device."
- mbreese 7y agoThe default storage is an EMMC chip, so they are trying to avoid hitting that for swap completely. With 4GB of RAM, that’s a reasonable goal. If think of you added in an SSD to the machine, then zswap might be more appropriate.