5 ms·
> I chose to enable zram for swap swap is used when you run out of ram. using a ramdisk for swap ... You see how that doesnt make sense?
by mvanbaak 2mo ago
> I chose to enable zram for swap
swap is used when you run out of ram. using a ramdisk for swap ... You see how that doesnt make sense?
- schmeichel 2mo agoZram creates a compressed RAM disk. https://wiki.archlinux.org/title/Zram https://wiki.archlinux.org/title/Zram
- fuzzy2 2mo agoIt's also not the optimal choice in most situations: https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-...
- mtzet 2mo agoThe main point is to use zswap over swap plus zram. The sd card usecase definitely doesnt want swap to disk, compressed or otherwise, so zram or no swap are the options.
- steinuil 2mo agoExactly. The previous install of the system had no swap at all so enabling zram is an improvement.
- mvanbaak 2mo agoMoving swap off of sdcard is indeed a good plan. But since swapping is done when ram is depleted, using a ramdisk for it (which uses ram) is ... exactly what you dont want. Since OP states they have disks attached to the machine as well, the better thing is use a partition there for swap.
- moebrowne 2mo ago> swap is used when you run out of ram This is not correct. Swap is not a RAM overflow. > Swap is not generally about getting emergency memory, it's about making memory reclamation egalitarian and efficient. In fact, using it as "emergency memory" is generally actively harmful. https://chrisdown.name/2018/01/02/in-defence-of-swap.html https://chrisdown.name/2018/01/02/in-defence-of-swap.html
- marysol5 2mo agoIt's more complicated than that, same as PAGING on Windows. It's about offloading some of the less accessed data from RAM onto slower hardware. You can compress the swap, so you can squezze a bit more by using CPU in that tiny amount of read you do.